×
INDI Library v1.8.6 Released (21 Aug 2020)

August 2020 release of INDI Library v1.8.6 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54284
Hi community,

Yesterday, I received my Pi4 and other stuff needed to get up and running.
I decided to write down what I did step by step hoping that it will help someone else.
I wrote the guide on a level so anyone should be able to follow (even people with no Linux experience).

I will start with the required steps and then I will add more posts with optional steps that I used to improve my setup.

Guide: StellarMate OS on Raspberry Pi4
1. Prepare Raspbery Pi 4. I decided to put it inside a Flirc heatsink case. I bought a small USB-C to Micro USB adapter so I can use the same cable as I used to power my old Raspberry Pi 3.
2. Download StellarMate OS and follow the Installation guide on this link to put it on an SD card with Etcher:
www.stellarmate.com/products/stellarmate-os.html
3. Insert MicroSD card into the Pi4 and power it up.
4. Wait a few minutes and use any other device to connect to the WiFi hotspot named stellarmate (default hotspot password is stellar@mate)
5. Now you can either use:
a. Any VNC client from any device to connect to hostname stellarmate (default password is smate). I used UltraVNC Viewer from a Windows PC
b. KStars client on any device to remote control your astro gear attached to the Pi4

As I mentioned earlier these are the only required steps needed to get the StellarMate OS up and running.
If you are happy with the way it works you don't have to follow any of the optional steps that I will post next.
The following user(s) said Thank You aliljenb, vegarg

Please Log in or Create an account to join the conversation.

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54285
Here is a list of the most important hardware that I bought (other models may work just as well).

REQUIRED: Raspberry Pi 4 Model B with 4GB RAM
www.amazon.co.uk/Raspberry-Pi-ARM-Cortex...o-HDMI/dp/B07TC2BK1X

REQUIRED: MicroSD card for the Pi4
www.amazon.co.uk/SanDisk-Extreme-microSD...rmance/dp/B07FCMBLV6

REQUIRED: Flirc Aluminium Heatsink Case for Pi4
www.amazon.co.uk/Flirc-Raspberry-Pi-Case-Silver/dp/B07WG4DW52

SEMI-OPTIONAL: Powered USB 3.0 Hub is recommended to ensure that the Pi4 has enough power and don't have to share with other devices. I use this one that works very well with Pi4
www.amazon.co.uk/TP-LINK-UH700-7-Port-Ad...USB3-0/dp/B00P115F4E

SEMI-OPTIONAL: Any kind of powersource with 5V/3A output. I use a Powerbank with 5V/3A Quick Charge port but the standard Pi Power Supply can replace this item and the cable below
www.avxperten.dk/powerbank/powerbank-300...-deltaco-pb-1069.asp

SEMI-OPTIONAL: Any power cable that supports 3A and fits either the USB-C port in the Pi4 or the Micro USB port in the optional adapter below (with the other end fitting your power supply)
www.amazon.co.uk/UGREEN-Charging-Samsung...raided/dp/B07PPY9N62

Please Log in or Create an account to join the conversation.

4 months 2 days ago 4 months 2 days ago by stefanr.
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54286
Here is a list of the optional hardware that I bought (other models may work just as well)

OPTIONAL: Adapter that allows to power Pi4 with the same cable as Pi3
www.amazon.co.uk/Adapter-Anker-Converts-...meBook/dp/B01AHKYIRS

OPTIONAL: USB WiFi dongle to improve WiFi signal strength
www.amazon.co.uk/gp/product/B073J3HXZH

OPTIONAL: Replacement antenna for USB WiFi dongle to improve WiFi signal strength even more
www.amazon.co.uk/gp/product/B0716ST3Y4

OPTIONAL: SSD to USB3 Adapter to connect an SSD Harddrive to Pi4
www.amazon.co.uk/gp/product/B07N48N5GR

OPTIONAL:SSD Harddrive
www.amazon.co.uk/gp/product/B07YFF8879

Please Log in or Create an account to join the conversation.

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54287
And here are the last optional items that I could not get in the above message due to spam filter

OPTIONAL: I use a 12V power supply like this to power the USB hub and other gear in the field
www.astroshop.eu/battery-packs/bresser-m...ion-100-watt/p,63756

OPTIONAL: I use DC 5.50 x 2.10 mm extension cable with a male to male adapter to connect the USB hub and other gear to the 12V power supply
www.av-cables.dk/dc-forlaengerkabel/dc-f...5-50-x-2-10-3-m.html and www.av-cables.dk/dc-stik/dc-han-han-stik-5-50-x-2-10-mm.html

Soon I will post the OPTIONAL steps I followed to improve my setup.

Please Log in or Create an account to join the conversation.

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54288
OPTIONAL: Disable the hotspot and connect the StellarMate to your home WiFi:

1. Right click the WiFi icon in the top of the screen -> Edit Connections...
2. Click the big plus in the bottom -> Choose Wi-Fi
3. On the Wi-Fi tab fill out the SSID of your home WiFi and change mode to Client. I set Band to 2.4 GHz, channel to default and Device to wlan0.
4. On the general tab ensure that "Connect automatically with priority" is selected and fill out a priority. I gave it priority 10 to make sure it will be the first choice when attempting to connect automatically after boot.
5. On the Wi-Fi Security tab select the security mode and password for your home WiFi. I selected WPA & WPA2 PErsonal and typed in my password.
6. In the top select a connection name or leave it as default if you want to and Click Save
7. Select stellarmate in the list -> click the big Minus in the bottom to delete the stellarmate hotspot
8. Now you will loose connection because the stellarmate hotspot that you are connected to does not exist anymore. Close your VNC client and wait for a few minutes
9. Now connect to your home WiFi with any device and connect to the StellarMate via your preferred VNC Client again (hostname stellarmate)
10. Now you can remote control StellarMate again and this time it has internet connection

Please Log in or Create an account to join the conversation.

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54289
OPTIONAL: Update the StellarMate software (Internet connection required):

1. Start the terminal via VNC
2. sudo apt-get update
3. sudo apt-get upgrade
4. Answer Yes when needed


OPTIONAL: Synchronize the time on the StellarMate with an internet time server (internet connection required):

1. Figure out the name of your current timezone with a command like this (change "Copenhagen" to the name of a big city near you or the name of the continent you live on)
timedatectl list-timezones | grep Copenhagen
2. Set the timezone on the StellarMate with this command (change the name of the timezone to your timezone):
sudo timedatectl set-timezone Europe/Copenhagen
3. Enable synchronization via internet time server with this command:
sudo timedatectl set-ntp true
4. Wait a few seconds and observe that the time on the StellarMate is now correct.

Please Log in or Create an account to join the conversation.

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54290
OPTIONAL: Getting the powered USB hub up and running

1 Connect the hub to one of the USB3 ports of the Pi4
2. Power up the hub
3. Now every device you attach to the hub will be powered by the hub's power source so it does not take power from the Pi4. Because of this it is recommended to connect all USB devices to the hub instead of the PI4's USB ports.

Please Log in or Create an account to join the conversation.

4 months 2 days ago 3 months 3 weeks ago by stefanr.
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54291
OPTIONAL: Getting the external USB WiFi adapter up and running

1. Connect the USB WiFi adapter to the powered USB hub
2. Click the WiFi icon in the top of the screen
3. Now you have 2 WiFi adapters in here. Under the external WiFi adapter click on your home WiFi and provide the password
4. Now you are connected to your home WiFi via the external WiFi adapter.


OPTIONAL: Getting another external USB WiFi adapter up and running
I also bought this Flybiz USB3 WiFi adapter to get USB3 speeds
www.amazon.co.uk/gp/product/B07S23DBBY/

1. Connect the USB WiFi adapter to the powered USB hub
2. Navigate to the /usr/src folder
cd /usr/src
3. Download the driver:
sudo git clone github.com/EntropicEffect/rtl8822bu.git
4. Edit the makefile:
cd rtl8822bu
sudo nano Makefile
5. Update lines 100 and 101 to this and save the file:
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_RPI = y
6. Build and install the driver:
sudo make
sudo make install
7. Reboot
sudo reboot
8. Click the WiFi icon in the top of the screen
9 Now you have a new WiFi adapter in here. Under the external WiFi adapter click on your home WiFi and provide the password
10. Now you are connected to your home WiFi via the external WiFi adapter.

Here is the output from speedtest-cli afterwards:
Ping: 6.965 ms
Download: 132.26 Mbit/s
Upload: 133.52 Mbit/s


OPTIONAL: Setup a quick FTP server for easy file transfer between StellarMate and other devices

1. Install FTP server:
sudo apt-get install vsftpd
2. Edit configuration file:
sudo nano /etc/vsftpd.conf
3. Find these lines and remove the # in front of them:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
4. Add these lines to the end of the file:
user_sub_token=$USER
local_root=/home/$USER/ftp
5. Add necessary folders:
mkdir ~/ftp
mkdir ~/ftp/files
6. Change permission of the ftp folder:
chmod a-w ~/ftp
7. Restart the service to reload the configuration:
sudo service vsftpd restart
8. Now you can use any FTP client from any device to download any files in the ~/ftp folder of the stellarmate (connect to hostname stellarmate on port 21 with username stellarmate and default password smate)

This is especially useful if you need to download movie or image files captured with FireCapture or Ekos and saved on the StellarMate.

Please Log in or Create an account to join the conversation.

4 months 2 days ago 4 months 2 days ago by stefanr.
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54292
OPTIONAL: Install FireCapture to supplement KStars/Ekos with great planetary astrophotography
1. In order to install FireCapture, download the Raspberry Pi version from:
www.firecapture.de/
2. Unpack the file:
sudo tar -xzf ~/Downloads/FireCapture_v2.6_armhf.tar.gz --directory /usr/share/
3. Set permissions on the folder:
sudo chmod 777 -R /usr/share/FireCapture_v2.6_armhf/
4. Edit the start.sh script:
sudo nano /usr/share/FireCapture_v2.6_armhf/start.sh
5. Change heap to
heap=1024
6. Hit CTRL + X to exit and Y (when prompted to save) then Enter to confirm your change.
7. Afterwards FireCapture can be started with these commands:
cd /usr/share/FireCapture_v2.6_armhf/
. ./start.sh


OPTIONAL: Make a shortcut on the desktop to start FireCapture
1. Create a new desktop shortcut
sudo nano /home/stellarmate/Desktop/FireCapture.desktop
2. Add these lines to the file:
[Desktop Entry]
Name=FireCapture
Version=2.6
Comment=FireCapture
Exec=/usr/share/FireCapture_v2.6_armhf/start.sh
Icon=/usr/share/FireCapture_v2.6_armhf/icon.png
Terminal=true
Type=Application
Categories=Education
3. Hit CTRL + X to exit and Y (when prompted to save) then Enter to confirm your change.
4. Make the script executable:
sudo chmod +x /usr/share/FireCapture_v2.6_armhf/start.sh
5. Edit the script:
sudo nano /usr/share/FireCapture_v2.6_armhf/start.sh
6. add this line in the beginning of the script:
cd /usr/share/FireCapture_v2.6_armhf
7. Hit CTRL + X to exit and Y (when prompted to save) then Enter to confirm your change.
8. Now you can double click the new FireCature shortcut on the desktop to start the program

If you get the error message "Failed to execute child process "xterm"" when you try to start FireCapture from the desktop shortcut, then one solution is to run this command to create a symbolic link:
sudo ln -s /usr/bin/lxterminal /usr/bin/xterm
And then activate the desktop shortcut again afterwards.
The following user(s) said Thank You rishigarrod, limburg11, ouioui01

Please Log in or Create an account to join the conversation.

4 months 2 days ago 4 months 2 days ago by stefanr.
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54293
OPTIONAL: Getting the external SSD harddrive up and running

1. Insert the harddrive stick into the plugable USB 3.0 harddrive connector
2. Connect the USB3 cable to the powered USB hub
3. Run this command and find the SSD harddrive in the list
sudo fdisk -l
4. My disk is located at /dev/sda. I found it in the list using the size and the model name.
5. Use this command to edit the disk’s partition table (Remember to adjust the path if your SSD drive is located somewhere else):
sudo fdisk /dev/sda
6. Enter the following options when prompted: n, p, 1, <enter>, <enter>, w
7. Use this command to format the partition:
sudo mkfs -t ext4 /dev/sda1
8. Use this command to create a directory to use as the filesystem mount:
sudo mkdir /ssd
9. Use this command to mount the partition:
sudo mount /dev/sda1 /ssd


OPTIONAL: Configure the Pi4 to mount the SSD on boot (Warning: If this is done wrong you loose all data on the sd card)

1. Use this command to get the Partition UUID:
sudo blkid /dev/sda1
2. Use this command to edit the fstab file:
sudo nano /etc/fstab
3. Add your SSD drive to the file. For me the added line looks like this (Remember to change 1st and 2nd parameter to match your ssd details):
PARTUUID=19efd0bd-01 /ssd ext4 defaults,nofail 0 0
4. reload the fstab file without rebooting with this command:
sudo mount -a
5. Observe that the SSD is mounted with this command:
df -h


OPTIONAL: Make the Pi4 run almost everything from the SSD Harddrive

The theoretical maximum for the SD card reader on Pi4 is 50MBps and with USB3.0 the theoretical maximum is 640MBps.
Often it is "only" possible to achieve around 200MBps with a SSD drive on Pi4, but that is still much better than the SD card.
Everything will load 4-5 times faster with an SSD and platesolve will also be lightning fast when done with Astrometry.net setting set to Offline via Kstars on the Pi4 or when done with Astrometry.net setting set to Remote via KStars on another device.
When the Astrometry.net setting is set to Online it will still be very slow, so don't use that.

1. Ensure that the SSD drive is mounted (it is if you followed the previous steps)
2. Copy files from your root folder to the SSD with this command:
sudo rsync -avx / /ssd
3. Open the /boot/cmdline.txt file for editing
sudo nano /boot/cmdline.txt
4. Paste the following text at the end of the first (and likely only) line of cmdline.txt (Remember to change the PARTUUID to the one matching your SSD partition. See information above on how to get it)
root=PARTUUID=19efd0bd-01 rootfstype=ext4 rootwait
5. Hit CTRL + X to exit and Y (when prompted to save) then Enter to confirm your change.
6. Now the Pi4 will see /dev/sda1 (provided that that is your external drive partition) as your primary storage drive. From here on both the microSD card and the external SSD must be connected in order to boot.
7. Reboot the Pi4. It won't boot unless the external drive is connected as long as this text is in the cmdline.txt file.
You must remove the line from the file if you want to boot without the SSD connected.
8. Use this command to verify that /dev/root now matches the size of your SSD instead of the size of your microSD card
df -h
The following user(s) said Thank You tseckler, rishigarrod, limburg11

Please Log in or Create an account to join the conversation.

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54294
That is all for now. This is how my StellarMate OS is currently configured on Raspberry Pi4.
Everything seems to work just fine.

Here are a few useful commands:

See the curent temperature:
vcgencmd measure_temp

See connected USB devices:
lsusb

See mounted filesystems:
df -h


And a WiFi test I did

WiFi Signal Strength Test (Only tested 2.4 GHz):

I used these commands to get the WiFi Link Quality
iwconfig wlan0 | grep -i --color quality
iwconfig wlan1 | grep -i --color quality


First Location:
This is the worst possible location outside the house on the other side of 2 solid brick walls and around 25 meters away from the nearest accesspoint inside the house.

Built-in Raspberry Pi4 WiFi:
Link Quality=50/70 Signal level=-60 dBm

External Ralink RT5370 USB WiFi (with stock antenna):
Link Quality=55/70 Signal level=-55 dBm

External Ralink RT5370 USB WiFi (With replaced antenna):
Link Quality=57/70 Signal level=-53 dBm


Second location:
This my usual observation spot outside the house on the other side of a single solid brick wall and around 10 meters away from the nearest accesspoint inside the house.

Built-in Raspberry Pi4 WiFi:
Link Quality=55/70 Signal level=-55 dBm

External Ralink RT5370 USB WiFi (with stock antenna):
Link Quality=69/70 Signal level=-41 dBm

External Ralink RT5370 USB WiFi (With replaced antenna):
Link Quality=70/70 Signal level=-39 dBm


Conclusion:
See an explanation of the dBm values in the table on this link:
eyesaas.com/wi-fi-signal-strength/

There is an obvious improvement of using the External Ralink RT5370 USB WiFi over the Built-in Raspberry Pi4 WiFi.
The improvement is biggest in a location that don't have too bad WiFi coverage.

There is only a small improvement in signal strength of using the replacement 5dBi antenna over the stock 2 dBi antenna.
So I could keep using the small antenna and I would not reccomend buying a replacement antenna.
However, now that I have it, I will continue using it.
The following user(s) said Thank You jabian

Please Log in or Create an account to join the conversation.

4 months 2 days ago
stefanr
Senior Boarder
Senior Boarder
Posts: 43
Karma: 1
More
Topic Author
Guide: StellarMate OS on Raspberry Pi4 step by step with tips and tricks #54295
Thanks for reading this far down.
I hope that my posts are useful to someone in the future.
Let me know if you had any use of it.

And also let me know if you have any suggestions for ways to do the same things a lot easier.
And feel free to post your own OPTIONAL steps in this thread that I and others can use to improve our Raspberry Pi4 setup even further.
The following user(s) said Thank You knro, rishigarrod, jabian, OrionM42

Please Log in or Create an account to join the conversation.

Time to create page: 1.535 seconds