MountOne | 100MM Software.

Don't Panic!

This guide is 99% images.

Index.

Imaging The Raspberry Pi OS (64-bit).

We'll be starting with a fresh Raspberry Pi OS Desktop install, Not the lite version. You can of course do the lite version if you want to, but you'll need to adapt the instructions to match.

I use the Raspberry Pi Imager to write the OS to an SD card, and to set initial login details.

Make sure to select the Raspberry PI OS (64-bit).

I like to input a hostname MountOne to make finding the system on the network easier. You can also inpt Wi-Fi details here too. I recommend doing so.

Make sure to enable SSH so you can login remotely without the need to connect a monitor, keyboard and mouse.

When the imager has finished writting to the SD card, remove it from your PC and insert it into the Raspberry Pi and turn on the power.

First Power-On.

PuTTY is a terminal program that we shall be using to open an SSH connection to the Raspberry Pi.

Download PuTTY. Install PuTTY. Open PuTTY.

In the 'Host Name (or IP address)' box, put in 

MountOne.local

Then click Open.

Login with the details you setup during the imaging process.

We'll now need to update the install.

sudo apt update &&  sudo apt full-upgrade

This can take anything from a few seconds to a hour to run, depending on your connection, and how up to date the install is.

Once  it has finished, reboot.

sudo reboot

PuTTY will tell you it has unexpectedly lost connection.

Reconnect again by restarting the session (click on the two terminals in the top  left), and then login again. make sure you get the login details correct.

Clone The SD Card To The M.2 HAT.

This is an optional step, if you don't have an SSD, go to the next step.

I am using Jeff Geerling's fork of rpi-clone to perform the cloning. Because it works. I have modified the steps to better align with our needs.

Go home.

cd ~

Make a directory for our software stack.

mkdir Projects

Change to that directory.

cd Projects

Download the rpi-clone repository

git clone https://github.com/geerlingguy/rpi-clone.git

Change to the rpi-clone directory

cd rpi-clone

Copy the files to /usr/local/sbin

sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

Clone the SD Card.

sudo rpi-clone nvme0n1

When it has finished doing its thing, shutdown, don't reboot, the Pi.

sudo halt

Power off the Pi and remove the SD Card.

When the SD Card has been removed, power the Pi back up again.

If everything has gone to plan, you should be able to log back in again.

Raspi-Config.

Before we begin the install proper, we need to do a bit of house-keeping. Log back in and open The Raspberry Pi Software Configuration Tool.

sudo raspi-config

From here we will adjust a few system settings.

From the System Options menu enable Auto Login.

From the Interface Options menu enable RPi Connect.

Enable I2C.

For the Serial Port disable the login shell over serial.

And enable the serial port hardware.

From the Advanced Options menu, Expand Filesystem, expand the file system to make available any unused space on the SSD or SD Card.

Reboot the system and log back in again.

GPIO Highjacker.

To enable all the I/O on the GPIO Highjacker we need to edit config.txt.

sudo nano /boot/firmware/config.txt

Scroll to the bottom of the file and below the [all] section paste in:

# Disable HAT EEPROM on GPIO0/1 so they can be repurposed
#dtoverlay=i2c0

# free primary UART from BT/console
dtoverlay=disable-bt
enable_uart=1

# map the UARTs to your chosen header GPIOs
dtoverlay=uart0
#dtoverlay=uart1
dtoverlay=uart2
dtoverlay=uart3
dtoverlay=uart4

Ctrl-x and then y to save.  Then reboot.

You will now have UART0, UART2, UART3, UART4 & i2c available on the GPIO Highjacker. 

Verify everything with: 

pinctrl get 1-40

GPSD.

GPSD is a daemon that manages the GPS, if you have one installed.

sudo apt-get install gpsd-clients gpsd -y

This will take but a few minutes to install.

Next, we need to change the configuration so the daemon knows where to look.

sudo nano /etc/default/gpsd

Find the line DEVICES="" and change it to DEVICES="/dev/serial0"

Then ctrl-x and y to save and exit. Then reboot.

sudo reboot

After logging back in again we need to enable the daemon and set it to autostart on power-up.

sudo systemctl enable gpsd.socket && sudo systemctl start gpsd.socket
sudo gpsd /dev/serial0 -F /var/run/gpsd.sock

 

You can check all is well,

cat /dev/serial0

Ctrl-c to stop the stream.

INDI & KStars Install.

We are going to use nou's astro-soft-build to download, configure, compile, and install INDI Core Library, INDI 3rd Party Drivers, KStars and a load of other software.

This takes a long time > 1 hour. I advise you follow  the instructions on their repository after changing to the Projects directory.

cd ~/Projects

Perform the stable install.

When it has completed, reboot, and log back in again.

Raspberry Pi HQ Camera.

We need to setup the camera in config.txt

sudo nano /boot/firmware/config.txt

Look for camera_auto_detect=1 and change it to camera_auto_detect=0

Now we need to set the camera, goto the bottom of the file and look for the [all] section, we edited it earlier while setting up the GPIO Highjacker. Scroll to the bottom and add

#enable cameras
dtoverlay=imx477,cam0

Ctrl-x and then y to save and exit. Then reboot.

To check the camera is detected

rpicam-hello --list-cameras

indi_pylibcamera.

To use the Raspberry Pi HQ Camera with INDI we need to install a driver. The driver we will be using is indi_pylibcamera.

Follow their instructions to install the driver | https://github.com/scriptorron/indi_pylibcamera

I like to name the driver so it is easy to identify in EKOS.

nano ~/.indi_pylibcamera/indi_pylibcamera.ini

At the top find DeviceName=pylibcamera Main and change it to Devicename=IMX477

Ctrl-x and y to save and exit.

INDI Server.

To be able to use KStars & EKOS either as a local or remote client, we need to setup INDI Server as a service which loads the required drivers automatically on power-up.

To begin we shall create a new service file

sudo nano /etc/systemd/system/indi.service

Into that file paste

[Unit]
Description=INDI Server
Requires=multi-user.target
After=multi-user.target

[Service]
User=mountone
ExecStart=indiserver indi_pylibcamera indi_gpsd indi_lx200_OnStep
Type=idle

[Install]
WantedBy=default.target

Ctrl-x and y to save and exit.

Now we need a symbolic link to connects to the indi_pylibcamera executable

sudo ln -s /home/mountone/venv_indi_pylibcamera/bin/indi_pylibcamera /usr/bin/indi_pylibcamera

Now we can enable the INDI service

sudo systemctl daemon-reload
sudo systemctl enable indi.service --now

We can check the service is running

sudo systemctl status indi.service

Reboot and recheck everything is still working.

RPi Connect.

This step is not required if you are going to run Kstars client-side.

Register your Pi for remote access. 

rpi-connect signin

Follow the instructions and open a remote desktop connection to the Raspberry Pi and check it works ok.

Connect To The 100MM Astrograph.

KStars will be preinstalled on the Raspberry Pi. If you are opening a remote desktop, it will be in the Education section of the main menu.

In both cases, locally & remote, the configuration will be the same. KStars includes Ekos. Ekos will be used to configure and control the astrograph. KStars User Manual.

Configure KStars & Ekos.

If you are working remote, download and install KStars (download).

Open KStars.

Click on the Ekos ion in the top right.

We need to configure Ekos, click next.

We are going to setup Ekos as if it were a remote system, even if running Kstars on the Raspberry Pi. We do this because Ekos will try to start INDI server locally if we don't.

We're using neither StellarMate nor AtikBase. Click Other.

Enter in the hostname you chose for the astrograph and select No for INDI Web Manager.

Choose a name for the profile.

Nothing to do here, click Save.

Click the black triangle Play button to connect to the astrograph (it needs to be turned on, obviously).

A load of new windows will pop up. Click on Telescope & Lenses in the Optical Trains window.

I delete the sample options and add in the details for the 100MM Lens.

  • Vendor : Hexaxes
  • Model : 100MM
  • Aperture : 28.6mm
  • Focal Length : 100mm

Close this window when finished.

Select the options for the Optical  Train.

  • Mount : LX200 OnStep
  • Camera : IMX477
  • Scope/Lens : Hexaxes 100MM 100@F/3.5
  • Focuser : LX200 OnStep

Close the window when finished.

Set the Connection Port for LX200 OnStep in the Connection tab.

  • /dev/ttyAMA4

Back at the Main Control tab, click Connect. 

If everything has worked, you should see all the options populate the tab.

The camera should also be accessible on the IMX477 tab.

Assuming you have the telescope setup pointing at the Polar Axis, click the Set button to align KStars and the telescope to north.

This will be different if you are running the mount in ALT/AZM mode as the telescope should be pointed north at the horizon.

This can of course be done for testing without the telescope being outside and polar aligned.

You can confirm this by closing Ekos and looking around in KStars.

Open Ekos again and we can confirm if the camera is working or not.

Set the exposure to something low if you are just doing testing as I am. Click the Preview button, the status indicator should change to green and say Capturing.

When the capture is complete, if you are remote, it will take a few seconds to download.

The preview image will open in a FITS viewer. In this case the image was captured shortly before 1300 and so the sun was up. The astrograph was also pointing at a wall, from inside.

For best results, take the astrograph outside.

Continue to the 100MM First Light Documentation.

Back to Main Documentation.