<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://globalmeteornetwork.org//wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lancer</id>
	<title>Global Meteor Network - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://globalmeteornetwork.org//wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lancer"/>
	<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Special:Contributions/Lancer"/>
	<updated>2026-04-15T03:59:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=545</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=545"/>
		<updated>2023-01-24T19:13:59Z</updated>

		<summary type="html">&lt;p&gt;Lancer: /* Create startscripts to run RMS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer-1.0-0 python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui-1.0-0 libqt5gstreamerutils-1.0-0 g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk gstreamer1.0-tools gstreamer1.0-plugins-base-apps gstreamer1.0-rtsp gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-python3-plugin-loader gstreamer1.0-opencv gstreamer1.0-pulseaudio gstreamer1.0-libav gstreamer1.0-plugins-rtp gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  cd ~&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
  pip3 install opencv-python&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is running a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installing CMN Binviewer ==&lt;br /&gt;
To view the binary files of RMS you can use the Binviewer program from the Croation Meteor Network. Best practise is to install this under your normal user account (&#039;&#039;[Yourname]&#039;&#039;). In the default Raspbian installation you have read access to the files of other users. If you want to open files you can browse to /home/rms/RMS_data. Since data is read only, you run no risk of disturbing your RMS installation. You need to run the graphic desktop environment for this though. Alternatively you can setup the Binviewer on another computer and transfer the files there. If you want to run Samba to get the files from the Raspberry, be careful though. RMS may store over 5000 files in one directory. Samba will create a heavy system load when opening the directories. It is better to copy the files locally using secure copy (&#039;&#039;scp&#039;&#039;). If you want to install CMN Binviewer locally (not on the Raspberry) then look here: [https://github.com/CroatianMeteorNetwork/cmn_binviewer]&lt;br /&gt;
&lt;br /&gt;
To install on the Rasberry under your own account, first log in. Then do:&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/cmn_binviewer.git&lt;br /&gt;
  virtualenv --system-site-packages -p python3 ~/vBinviewer&lt;br /&gt;
  source ~/vBinviewer/bin/activate&lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Then create the startscript for CMN Binviewer:&lt;br /&gt;
  sudo nano ~/vBinviewer/CMN_Binviewer&lt;br /&gt;
&lt;br /&gt;
And paste these contents in it:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  source ~/vBinviewer/bin/activate  &lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  python CMN_binViewer.py&lt;br /&gt;
&lt;br /&gt;
And to create a link to the script from the Desktop:&lt;br /&gt;
  ln -s ~/vBinviewer/CMN_Binviewer ~/Desktop/CMN_Binviewer&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=544</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=544"/>
		<updated>2023-01-23T21:57:56Z</updated>

		<summary type="html">&lt;p&gt;Lancer: /* Create the virtual Python environment for RMS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer-1.0-0 python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui-1.0-0 libqt5gstreamerutils-1.0-0 g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk gstreamer1.0-tools gstreamer1.0-plugins-base-apps gstreamer1.0-rtsp gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-python3-plugin-loader gstreamer1.0-opencv gstreamer1.0-pulseaudio gstreamer1.0-libav gstreamer1.0-plugins-rtp gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  cd ~&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
  pip3 install opencv-python&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installing CMN Binviewer ==&lt;br /&gt;
To view the binary files of RMS you can use the Binviewer program from the Croation Meteor Network. Best practise is to install this under your normal user account (&#039;&#039;[Yourname]&#039;&#039;). In the default Raspbian installation you have read access to the files of other users. If you want to open files you can browse to /home/rms/RMS_data. Since data is read only, you run no risk of disturbing your RMS installation. You need to run the graphic desktop environment for this though. Alternatively you can setup the Binviewer on another computer and transfer the files there. If you want to run Samba to get the files from the Raspberry, be careful though. RMS may store over 5000 files in one directory. Samba will create a heavy system load when opening the directories. It is better to copy the files locally using secure copy (&#039;&#039;scp&#039;&#039;). If you want to install CMN Binviewer locally (not on the Raspberry) then look here: [https://github.com/CroatianMeteorNetwork/cmn_binviewer]&lt;br /&gt;
&lt;br /&gt;
To install on the Rasberry under your own account, first log in. Then do:&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/cmn_binviewer.git&lt;br /&gt;
  virtualenv --system-site-packages -p python3 ~/vBinviewer&lt;br /&gt;
  source ~/vBinviewer/bin/activate&lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Then create the startscript for CMN Binviewer:&lt;br /&gt;
  sudo nano ~/vBinviewer/CMN_Binviewer&lt;br /&gt;
&lt;br /&gt;
And paste these contents in it:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  source ~/vBinviewer/bin/activate  &lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  python CMN_binViewer.py&lt;br /&gt;
&lt;br /&gt;
And to create a link to the script from the Desktop:&lt;br /&gt;
  ln -s ~/vBinviewer/CMN_Binviewer ~/Desktop/CMN_Binviewer&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=543</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=543"/>
		<updated>2023-01-23T18:57:05Z</updated>

		<summary type="html">&lt;p&gt;Lancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer-1.0-0 python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui-1.0-0 libqt5gstreamerutils-1.0-0 g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk gstreamer1.0-tools gstreamer1.0-plugins-base-apps gstreamer1.0-rtsp gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-python3-plugin-loader gstreamer1.0-opencv gstreamer1.0-pulseaudio gstreamer1.0-libav gstreamer1.0-plugins-rtp gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  cd ~&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installing CMN Binviewer ==&lt;br /&gt;
To view the binary files of RMS you can use the Binviewer program from the Croation Meteor Network. Best practise is to install this under your normal user account (&#039;&#039;[Yourname]&#039;&#039;). In the default Raspbian installation you have read access to the files of other users. If you want to open files you can browse to /home/rms/RMS_data. Since data is read only, you run no risk of disturbing your RMS installation. You need to run the graphic desktop environment for this though. Alternatively you can setup the Binviewer on another computer and transfer the files there. If you want to run Samba to get the files from the Raspberry, be careful though. RMS may store over 5000 files in one directory. Samba will create a heavy system load when opening the directories. It is better to copy the files locally using secure copy (&#039;&#039;scp&#039;&#039;). If you want to install CMN Binviewer locally (not on the Raspberry) then look here: [https://github.com/CroatianMeteorNetwork/cmn_binviewer]&lt;br /&gt;
&lt;br /&gt;
To install on the Rasberry under your own account, first log in. Then do:&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/cmn_binviewer.git&lt;br /&gt;
  virtualenv --system-site-packages -p python3 ~/vBinviewer&lt;br /&gt;
  source ~/vBinviewer/bin/activate&lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Then create the startscript for CMN Binviewer:&lt;br /&gt;
  sudo nano ~/vBinviewer/CMN_Binviewer&lt;br /&gt;
&lt;br /&gt;
And paste these contents in it:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  source ~/vBinviewer/bin/activate  &lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  python CMN_binViewer.py&lt;br /&gt;
&lt;br /&gt;
And to create a link to the script from the Desktop:&lt;br /&gt;
  ln -s ~/vBinviewer/CMN_Binviewer ~/Desktop/CMN_Binviewer&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=542</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=542"/>
		<updated>2023-01-23T18:04:14Z</updated>

		<summary type="html">&lt;p&gt;Lancer: /* Install packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer-1.0-0 python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui-1.0-0 libqt5gstreamerutils-1.0-0 g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk gstreamer1.0-tools gstreamer1.0-plugins-base-apps gstreamer1.0-rtsp gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-python3-plugin-loader gstreamer1.0-opencv gstreamer1.0-pulseaudio gstreamer1.0-libav gstreamer1.0-plugins-rtp gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installing CMN Binviewer ==&lt;br /&gt;
To view the binary files of RMS you can use the Binviewer program from the Croation Meteor Network. Best practise is to install this under your normal user account (&#039;&#039;[Yourname]&#039;&#039;). In the default Raspbian installation you have read access to the files of other users. If you want to open files you can browse to /home/rms/RMS_data. Since data is read only, you run no risk of disturbing your RMS installation. You need to run the graphic desktop environment for this though. Alternatively you can setup the Binviewer on another computer and transfer the files there. If you want to run Samba to get the files from the Raspberry, be careful though. RMS may store over 5000 files in one directory. Samba will create a heavy system load when opening the directories. It is better to copy the files locally using secure copy (&#039;&#039;scp&#039;&#039;). If you want to install CMN Binviewer locally (not on the Raspberry) then look here: [https://github.com/CroatianMeteorNetwork/cmn_binviewer]&lt;br /&gt;
&lt;br /&gt;
To install on the Rasberry under your own account, first log in. Then do:&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/cmn_binviewer.git&lt;br /&gt;
  virtualenv --system-site-packages -p python3 ~/vBinviewer&lt;br /&gt;
  source ~/vBinviewer/bin/activate&lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Then create the startscript for CMN Binviewer:&lt;br /&gt;
  sudo nano ~/vBinviewer/CMN_Binviewer&lt;br /&gt;
&lt;br /&gt;
And paste these contents in it:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  source ~/vBinviewer/bin/activate  &lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  python CMN_binViewer.py&lt;br /&gt;
&lt;br /&gt;
And to create a link to the script from the Desktop:&lt;br /&gt;
  ln -s ~/vBinviewer/CMN_Binviewer ~/Desktop/CMN_Binviewer&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=541</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=541"/>
		<updated>2023-01-23T17:18:31Z</updated>

		<summary type="html">&lt;p&gt;Lancer: /* Install packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer-1.0-0 python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui-1.0-0 libqt5gstreamerutils-1.0-0 g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk gstreamer1.0-tools gstreamer1.0-plugins-base-apps gstreamer1.0-rtsp gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-python3-plugin-loader gstreamer1.0-videosink gstreamer1.0-opencv gstreamer1.0-pulseaudio gstreamer1.0-libav gstreamer1.0-plugins-rtp gstreamer1.0-x gstreamer1.0-alsa &lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installing CMN Binviewer ==&lt;br /&gt;
To view the binary files of RMS you can use the Binviewer program from the Croation Meteor Network. Best practise is to install this under your normal user account (&#039;&#039;[Yourname]&#039;&#039;). In the default Raspbian installation you have read access to the files of other users. If you want to open files you can browse to /home/rms/RMS_data. Since data is read only, you run no risk of disturbing your RMS installation. You need to run the graphic desktop environment for this though. Alternatively you can setup the Binviewer on another computer and transfer the files there. If you want to run Samba to get the files from the Raspberry, be careful though. RMS may store over 5000 files in one directory. Samba will create a heavy system load when opening the directories. It is better to copy the files locally using secure copy (&#039;&#039;scp&#039;&#039;). If you want to install CMN Binviewer locally (not on the Raspberry) then look here: [https://github.com/CroatianMeteorNetwork/cmn_binviewer]&lt;br /&gt;
&lt;br /&gt;
To install on the Rasberry under your own account, first log in. Then do:&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/cmn_binviewer.git&lt;br /&gt;
  virtualenv --system-site-packages -p python3 ~/vBinviewer&lt;br /&gt;
  source ~/vBinviewer/bin/activate&lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Then create the startscript for CMN Binviewer:&lt;br /&gt;
  sudo nano ~/vBinviewer/CMN_Binviewer&lt;br /&gt;
&lt;br /&gt;
And paste these contents in it:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  source ~/vBinviewer/bin/activate  &lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  python CMN_binViewer.py&lt;br /&gt;
&lt;br /&gt;
And to create a link to the script from the Desktop:&lt;br /&gt;
  ln -s ~/vBinviewer/CMN_Binviewer ~/Desktop/CMN_Binviewer&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=540</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=540"/>
		<updated>2023-01-23T16:18:48Z</updated>

		<summary type="html">&lt;p&gt;Lancer: Fix package list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer-1.0-0 python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui-1.0-0 libqt5gstreamerutils-1.0-0 g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 gstreamer1.0* libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installing CMN Binviewer ==&lt;br /&gt;
To view the binary files of RMS you can use the Binviewer program from the Croation Meteor Network. Best practise is to install this under your normal user account (&#039;&#039;[Yourname]&#039;&#039;). In the default Raspbian installation you have read access to the files of other users. If you want to open files you can browse to /home/rms/RMS_data. Since data is read only, you run no risk of disturbing your RMS installation. You need to run the graphic desktop environment for this though. Alternatively you can setup the Binviewer on another computer and transfer the files there. If you want to run Samba to get the files from the Raspberry, be careful though. RMS may store over 5000 files in one directory. Samba will create a heavy system load when opening the directories. It is better to copy the files locally using secure copy (&#039;&#039;scp&#039;&#039;). If you want to install CMN Binviewer locally (not on the Raspberry) then look here: [https://github.com/CroatianMeteorNetwork/cmn_binviewer]&lt;br /&gt;
&lt;br /&gt;
To install on the Rasberry under your own account, first log in. Then do:&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/cmn_binviewer.git&lt;br /&gt;
  virtualenv --system-site-packages -p python3 ~/vBinviewer&lt;br /&gt;
  source ~/vBinviewer/bin/activate&lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Then create the startscript for CMN Binviewer:&lt;br /&gt;
  sudo nano ~/vBinviewer/CMN_Binviewer&lt;br /&gt;
&lt;br /&gt;
And paste these contents in it:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  source ~/vBinviewer/bin/activate  &lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  python CMN_binViewer.py&lt;br /&gt;
&lt;br /&gt;
And to create a link to the script from the Desktop:&lt;br /&gt;
  ln -s ~/vBinviewer/CMN_Binviewer ~/Desktop/CMN_Binviewer&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=539</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=539"/>
		<updated>2023-01-21T17:12:36Z</updated>

		<summary type="html">&lt;p&gt;Lancer: Add CMN_Binviewer instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev python-imaging-tk libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui libqt5gstreamerutils g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 gstreamer1.0* libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Installing CMN Binviewer ==&lt;br /&gt;
To view the binary files of RMS you can use the Binviewer program from the Croation Meteor Network. Best practise is to install this under your normal user account (&#039;&#039;[Yourname]&#039;&#039;). In the default Raspbian installation you have read access to the files of other users. If you want to open files you can browse to /home/rms/RMS_data. Since data is read only, you run no risk of disturbing your RMS installation. You need to run the graphic desktop environment for this though. Alternatively you can setup the Binviewer on another computer and transfer the files there. If you want to run Samba to get the files from the Raspberry, be careful though. RMS may store over 5000 files in one directory. Samba will create a heavy system load when opening the directories. It is better to copy the files locally using secure copy (&#039;&#039;scp&#039;&#039;). If you want to install CMN Binviewer locally (not on the Raspberry) then look here: [https://github.com/CroatianMeteorNetwork/cmn_binviewer]&lt;br /&gt;
&lt;br /&gt;
To install on the Rasberry under your own account, first log in. Then do:&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/cmn_binviewer.git&lt;br /&gt;
  virtualenv --system-site-packages -p python3 ~/vBinviewer&lt;br /&gt;
  source ~/vBinviewer/bin/activate&lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  pip install -r requirements.txt&lt;br /&gt;
&lt;br /&gt;
Then create the startscript for CMN Binviewer:&lt;br /&gt;
  sudo nano ~/vBinviewer/CMN_Binviewer&lt;br /&gt;
&lt;br /&gt;
And paste these contents in it:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  source ~/vBinviewer/bin/activate  &lt;br /&gt;
  cd cmn_binviewer&lt;br /&gt;
  python CMN_binViewer.py&lt;br /&gt;
&lt;br /&gt;
And to create a link to the script from the Desktop:&lt;br /&gt;
  ln -s ~/vBinviewer/CMN_Binviewer ~/Desktop/CMN_Binviewer&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=538</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=538"/>
		<updated>2023-01-21T16:50:28Z</updated>

		<summary type="html">&lt;p&gt;Lancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Work in progress - TODO: Installation of CMN viewer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev python-imaging-tk libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui libqt5gstreamerutils g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 gstreamer1.0* libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen python3-six python3-numpy python3-imageio libgstreamer-plugins-base1.0-dev libwebkit2gtk-4.0-dev libwebkit2gtk-4.0-37 dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl1.2-dev  libnotify-dev freeglut3 freeglut3-dev libghc-gtk3-dev python-tk&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=537</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=537"/>
		<updated>2023-01-20T17:31:26Z</updated>

		<summary type="html">&lt;p&gt;Lancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Work in progress - TODO: Installation of CMN viewer&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL &amp;gt; /etc/sudoers.d/011_user_nopasswd&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev python-imaging-tk libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui libqt5gstreamerutils g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 gstreamer1.0* libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=536</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=536"/>
		<updated>2023-01-20T17:16:04Z</updated>

		<summary type="html">&lt;p&gt;Lancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Work in progress&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev python-imaging-tk libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui libqt5gstreamerutils g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 gstreamer1.0* libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
Raspbian is runnign a program named &#039;&#039;cron&#039;&#039; to execute tasks at certain times. The script above needs to be started every 10 minutes. That way RMS is (re-)started automatically. By creating the file &#039;&#039;/tmp/RESTART_RMS&#039;&#039; RMS can be stopped and restarted 10 minutes later. The effect of this is that RMS is updated.&lt;br /&gt;
  sudo nano /etc/crontab&lt;br /&gt;
&lt;br /&gt;
And add the following lines before the last line:&lt;br /&gt;
  */10 *  * * *   rms /usr/local/bin/RMS.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  22 12   * * *   rms touch /tmp/RESTART_RMS&lt;br /&gt;
&lt;br /&gt;
This will run the script as user RMS.&lt;br /&gt;
&lt;br /&gt;
If you want to see what the script is doing, you can attach your session to it.&lt;br /&gt;
&lt;br /&gt;
First become the user &#039;&#039;rms&#039;&#039;&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
The attach your session by issuing the command:&lt;br /&gt;
  screen -r&lt;br /&gt;
&lt;br /&gt;
If you want to exit press ctrl-a and then d. Then exit the user &#039;&#039;rms&#039;&#039; with &#039;&#039;exit&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=535</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=535"/>
		<updated>2023-01-20T17:04:37Z</updated>

		<summary type="html">&lt;p&gt;Lancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Work in progress&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev python-imaging-tk libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui libqt5gstreamerutils g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 gstreamer1.0* libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir Desktop (might already exist)&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;br /&gt;
&lt;br /&gt;
And exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Setting up RMS ==&lt;br /&gt;
&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; with:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Configure git so that the script can stash changes in the repo and update the code:&lt;br /&gt;
  git config --global user.email &amp;quot;rms@gmn.uwo.ca&amp;quot;&lt;br /&gt;
  git config --global user.name &amp;quot;RMS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ready the RMS software with (you should already be in the directory &#039;&#039;/source/RMS&#039;&#039;):&lt;br /&gt;
  python setup.py install&lt;br /&gt;
  ./Scripts/GenerateDesktopLinks.sh&lt;br /&gt;
&lt;br /&gt;
Now find your coordinates on the globe. Your location needs to be known very accurately (to 5 decimal places). Use GPS for this or an accurate map. Put this information in the &#039;&#039;.config&#039;&#039; file in the RMS directory.&lt;br /&gt;
  nano .config&lt;br /&gt;
&lt;br /&gt;
Also, change the configuration of the camera.&lt;br /&gt;
&lt;br /&gt;
Now run RMS for the first time.&lt;br /&gt;
  ./Scripts/RMS_FirstRun.sh&lt;br /&gt;
&lt;br /&gt;
If you have no station-ID yet. Request one with the instructions shown on screen and then abort the script by pressing the Ctrl-C key combination. Start again when you have your Station-ID in your config file.&lt;br /&gt;
&lt;br /&gt;
When RMS runs successfully, stop RMS. In the next chapter a script will be created to automatically start and update RMS and restart RMS when it is not running for some reason.&lt;br /&gt;
&lt;br /&gt;
Exit the &#039;&#039;rms&#039;&#039; account&lt;br /&gt;
&lt;br /&gt;
== Create startscripts to run RMS ==&lt;br /&gt;
&lt;br /&gt;
Create a script to (re-)start RMS automatically. Create a new script file by doing:&lt;br /&gt;
  sudo nano /usr/local/bin/RMS.sh&lt;br /&gt;
&lt;br /&gt;
and put the following contents in it and save:&lt;br /&gt;
  #!/usr/bin/bash&lt;br /&gt;
  MYHOME=/home/rms&lt;br /&gt;
  RESTART=/tmp/RESTART_RMS&lt;br /&gt;
  STARTAT=/tmp/START_RMS&lt;br /&gt;
  # Set environment variables&lt;br /&gt;
  export HOME=${MYHOME}&lt;br /&gt;
  export PATH=${MYHOME}/vRMS/bin:${MYHOME}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&lt;br /&gt;
  source ${MYHOME}/vRMS/bin/activate&lt;br /&gt;
  # Check if FirstRun is running and start if not&lt;br /&gt;
  ps -ef | grep -v grep | grep RMS_FirstRun.sh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? -eq 0 ]&lt;br /&gt;
  then&lt;br /&gt;
    # Check if restart token is set&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      # Nicely kill FirstRun first&lt;br /&gt;
      FRPID=`ps -ef | grep -v grep | grep -vi screen | grep RMS_FirstRun.sh | head -n1 | tr -s &#039; &#039; | cut -f 2 -d &#039; &#039;`&lt;br /&gt;
      kill -11 $FRPID&lt;br /&gt;
      echo $FRPID &amp;gt; ${STARTAT}&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
      # Will be restarted at the next run&lt;br /&gt;
    fi&lt;br /&gt;
  else&lt;br /&gt;
    date &amp;gt; ${STARTAT}&lt;br /&gt;
    screen -d -m ${MYHOME}/source/RMS/Scripts/RMS_FirstRun.sh&lt;br /&gt;
    if [ -f ${RESTART} ]&lt;br /&gt;
    then&lt;br /&gt;
      rm ${RESTART}&lt;br /&gt;
    fi&lt;br /&gt;
  fi&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=534</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=534"/>
		<updated>2023-01-20T16:46:22Z</updated>

		<summary type="html">&lt;p&gt;Lancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Work in progress&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
== Install packages ==&lt;br /&gt;
Before installing any new packages lets first make sure all current software is up to date&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get upgrade -y&lt;br /&gt;
&lt;br /&gt;
The first command updates the copy of the package list and the second upgrades any outdated packages (The -y options means you wont have to confirm the upgrade). It is a wise thing to do this at least on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
Next install additional packages which are needed by RMS. This command will install even mopre packages that you specify. This is because some packages depend on others. And some packages won&#039;t be installed, because they are already present.&lt;br /&gt;
  sudo apt-get install -y cmake git mplayer python3 python3-dev python3-tk python3-pip libblas-dev libatlas-base-dev liblapack-dev at-spi2-core libopencv-dev python-imaging-tk libffi-dev libssl-dev socat ntp libxml2-dev libxslt-dev imagemagick ffmpeg qt5-qmake python3-pyqt5 libqt5gstreamer python3-pyqt5.qtmultimedia qtgstreamer-plugins-qt5 libqt5gstreamer-dev libqt5gstreamerui libqt5gstreamerutils g++ g++-10 gcc-10 gcc-10-base gcc-7-base gcc-8-base gcc-9-base gfortran gfortran-10 gstreamer1.0* libgstreamer-opencv1.0-0 python3-opencv python3-opencv-apps  ros-opencv-apps opencv-data opencv-doc libopencv* python3-setuptools python3-scipy cython3 cython3-dbg python3-pytest-cython python3-astropy* python3-paramiko python3-matplotlib* libcfitsio9 libwcs7 python3-pyqtgraph python3-git python3-pil git git-man wxpython-tools wx3.0-headers wx-common python3-wxgtk4.0 libwxgtk3.0-gtk3-dev libwxgtk3.0-gtk3-0v5 libwxbase3.0-dev libwxbase3.0-0v5 screen&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
Some of the later tasks also require a Rust compiler. This is not available in the Raspbian package repository and needs to be installed by hand in the &#039;&#039;rms&#039;&#039; account.&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  curl https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
And proceed with installation. Verify correct installation with:&lt;br /&gt;
  sudo -i -u rms rustc --version&lt;br /&gt;
&lt;br /&gt;
While you are here download the RMS software as well:&lt;br /&gt;
  mkdir source&lt;br /&gt;
  cd source&lt;br /&gt;
  git clone https://github.com/CroatianMeteorNetwork/RMS.git&lt;br /&gt;
&lt;br /&gt;
and exit the &#039;&#039;rms&#039;&#039; account:&lt;br /&gt;
  exit&lt;br /&gt;
&lt;br /&gt;
Finally, install the Python virtual environment tool with:&lt;br /&gt;
  sudo pip3 install virtualenv&lt;br /&gt;
&lt;br /&gt;
== Create the virtual Python environment for RMS ==&lt;br /&gt;
Become the user &#039;&#039;rms&#039;&#039; (you can exit the user &#039;&#039;rms&#039;&#039; with the command &#039;&#039;exit&#039;&#039;)&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
&lt;br /&gt;
Create the virtual environment:&lt;br /&gt;
  virtualenv vRMS&lt;br /&gt;
&lt;br /&gt;
Activate the virtual environment:&lt;br /&gt;
  source ~/vRMS/bin/activate&lt;br /&gt;
&lt;br /&gt;
And activate it on re-login:&lt;br /&gt;
  echo source ~/vRMS/bin/activate &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
  echo cd ~/source/RMS &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
Now install the nescessary Python modules. This takes a while:&lt;br /&gt;
  pip3 install -U pip setuptools&lt;br /&gt;
  pip3 install Pillow&lt;br /&gt;
  pip3 install gitpython cython pyephem astropy paramiko&lt;br /&gt;
  pip3 install matplotlib&lt;br /&gt;
  pip3 install imreg_dft&lt;br /&gt;
  pip3 install configparser==4.0.2&lt;br /&gt;
  pip3 install numpy==1.23.5&lt;br /&gt;
  pip3 install imageio==2.6.1&lt;br /&gt;
  pip3 install scipy==1.6.0&lt;br /&gt;
  pip3 install pyfits&lt;br /&gt;
  pip3 install pyqtgraph&lt;br /&gt;
  pip3 install pyqt5 --config-settings --confirm-license= --verbose&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=533</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=533"/>
		<updated>2023-01-20T16:20:30Z</updated>

		<summary type="html">&lt;p&gt;Lancer: Adding&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Work in progress&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
* ADSB receiver&lt;br /&gt;
* NTP server&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 cpu usage.png]]&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
[[File:Pi4 memory usage.png]]&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;br /&gt;
&lt;br /&gt;
== Connecting to the network ==&lt;br /&gt;
There are several option to setup networking connections. The best way would be to connect the camera and the Raspberry to a switch. If you have no wired network available you could connect the camera to the Raspberry directy and then connect the Raspberry to the main network over Wifi.&lt;br /&gt;
&lt;br /&gt;
=== If you want to connect the camera to your Pi directly ===&lt;br /&gt;
If you want to do this you have to setup a DHCP service on the Raspberry. You can find the proper way to configure the camera in the manual to build one. Make sure to use and address range different from your main network.&lt;br /&gt;
&#039;&#039;(Note: These instructions were copied over from the original manual)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. First, install the DHCP server:&lt;br /&gt;
  sudo apt-get install -y isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
2. Edit the DHCP configuration file:&lt;br /&gt;
  sudo nano /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
We need to add a fixed address for the camera, so append this at the end of the file:&lt;br /&gt;
&lt;br /&gt;
  subnet 192.168.42.0 netmask 255.255.255.0 {&lt;br /&gt;
    authoritative;&lt;br /&gt;
    pool {&lt;br /&gt;
  	  range 192.168.42.10 192.168.42.10;&lt;br /&gt;
    }&lt;br /&gt;
    option broadcast-address 192.168.42.255;&lt;br /&gt;
    default-lease-time 600;&lt;br /&gt;
    max-lease-time 7200;&lt;br /&gt;
    option domain-name &amp;quot;local&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
This will assign a fixed IP address 192.168.42.10 to the camera.&lt;br /&gt;
&lt;br /&gt;
3. Edit the DCHP server configuration so it will only listen to the ethernet interface. Open the file:&lt;br /&gt;
  sudo nano /etc/default/isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
and edit the line with INTERFACESv4 by adding &amp;quot;eth0&amp;quot;:&lt;br /&gt;
  INTERFACESv4=&amp;quot;eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Next, we need to give the ethernet interface the proper subnet. Open:&lt;br /&gt;
  sudo nano /etc/dhcpcd.conf&lt;br /&gt;
&lt;br /&gt;
and add this at the end of the file:&lt;br /&gt;
  interface eth0&lt;br /&gt;
  static ip_address=192.168.42.1/24&lt;br /&gt;
&lt;br /&gt;
This will give the ethernet interface a static IP address.&lt;br /&gt;
&lt;br /&gt;
5. Finally, the DHCP server will try to run before the ethernet interface is up, which will produce an error. We can tell it to try again, until it is successful. Run the following commands:&lt;br /&gt;
  sudo cp /run/systemd/generator.late/isc-dhcp-server.service /etc/systemd/system&lt;br /&gt;
  sudo nano /etc/systemd/system/isc-dhcp-server.service&lt;br /&gt;
&lt;br /&gt;
Edit the [Service] section:&lt;br /&gt;
* set &#039;&#039;Restart=on-failure&#039;&#039;&lt;br /&gt;
* add &#039;&#039;RestartSec=5&#039;&#039; to instruct systemd to wait 5 seconds before restarting a failed service.&lt;br /&gt;
&lt;br /&gt;
Add the [Install] section which is missing, and add the follow line to it:&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Run the commands:&lt;br /&gt;
  sudo systemctl daemon-reload&lt;br /&gt;
  sudo systemctl disable isc-dhcp-server&lt;br /&gt;
  sudo systemctl enable isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
6. Reboot so to test the configuration:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
&lt;br /&gt;
Make sure the camera is connected to the Pi’s ethernet interface, and that a fixed IP address of 192.168.42.10 is set on the camera.&lt;br /&gt;
&lt;br /&gt;
7. Now, if you run &#039;&#039;arp -a&#039;&#039;, you will be able to see the IP camera:&lt;br /&gt;
? (192.168.42.10) at 00:12:16:b6:79:db [ether] on eth0&lt;br /&gt;
If not, check the status of the DHCP server service:&lt;br /&gt;
  sudo service isc-dhcp-server status&lt;br /&gt;
&lt;br /&gt;
The service should be active.&lt;br /&gt;
&lt;br /&gt;
== Preparation of the Raspberry Pi to run RMS ==&lt;br /&gt;
If the Raspberry is already running. Check if your filesystem is using the full disk. To do this log in to the Pi and run the command:&lt;br /&gt;
  df -h&lt;br /&gt;
The size of &#039;&#039;/dev/root&#039;&#039; should be near your disk size. If it is not, you still need to expand the filesystem. Use raspi-config for this task.&lt;br /&gt;
  sudo raspi-config&lt;br /&gt;
- &#039;&#039;Choose “Advanced Options” (6) and then “Expand Filesystem” (A1)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
While you are in raspi-config also set GPU memory to 256&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Performance options” (4) and then “GPU Memory” (P2)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And set the timezone to UTC&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;Choose “Localisation options” (5) and then “None of the above” and then “UTC”&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save your settings and exit raspi-config without rebooting the Pi&lt;br /&gt;
&lt;br /&gt;
If your Raspberry has 2GB of memory or less, you can enable swap by editing (&#039;&#039;sudo nano /etc/dphys-swapfile&#039;&#039;) the file &#039;&#039;/etc/dphys-swapfile&#039;&#039; and set&lt;br /&gt;
  CONF_SWAPSIZE=1024&lt;br /&gt;
&lt;br /&gt;
Save the file and do:&lt;br /&gt;
  service dphys-swapfile restart&lt;br /&gt;
&lt;br /&gt;
Reboot the pi&lt;br /&gt;
  sudo shutdown -r now&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create user accounts ==&lt;br /&gt;
&lt;br /&gt;
After reboot, login as user &#039;&#039;pi&#039;&#039; and create an account to run RMS and an account for yourself. You could also use the &#039;&#039;pi&#039;&#039; account, but using non-default usernames is a best (security) practise.&lt;br /&gt;
  sudo useradd -m [your name] -g pi -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,render,netdev,spi,i2c,gpio,lpadmin&lt;br /&gt;
  sudo passwd [yourname]&lt;br /&gt;
  sudo echo [yourname] ALL=(ALL) NOPASSWD: ALL&lt;br /&gt;
  sudo useradd -m rms&lt;br /&gt;
  sudo passwd -l rms&lt;br /&gt;
&lt;br /&gt;
Now you have an account on your name equal to the &#039;&#039;pi&#039;&#039; account and a locked &#039;&#039;rms&#039;&#039; account. we don’t need interactive logon for &#039;&#039;rms&#039;&#039; so blocking it is a wise thing to do.&lt;br /&gt;
&lt;br /&gt;
Now log out of the Pi and login under your own account. Then do:&lt;br /&gt;
  sudo passwd -l pi&lt;br /&gt;
&lt;br /&gt;
By default the &#039;&#039;/tmp&#039;&#039; directory is used for temporary file storage. This directory is located in the working memory of the Pi and not on disk. As such, there is not enough space available in this directory to do the installation. So we need to use another location. &lt;br /&gt;
&lt;br /&gt;
Become user &#039;&#039;rms&#039;&#039; and use another directory for temporary file storage:&lt;br /&gt;
  sudo su - rms&lt;br /&gt;
  mkdir tmp&lt;br /&gt;
  echo export TMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  echo export TEMP=/home/rms/tmp &amp;gt;&amp;gt; .profile&lt;br /&gt;
  exit&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=File:Pi4_memory_usage.png&amp;diff=532</id>
		<title>File:Pi4 memory usage.png</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=File:Pi4_memory_usage.png&amp;diff=532"/>
		<updated>2023-01-20T15:43:35Z</updated>

		<summary type="html">&lt;p&gt;Lancer: Memory usage on a Raspberry Pi with 4GB on a clear night&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Memory usage on a Raspberry Pi with 4GB on a clear night&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=File:Pi4_cpu_usage.png&amp;diff=531</id>
		<title>File:Pi4 cpu usage.png</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=File:Pi4_cpu_usage.png&amp;diff=531"/>
		<updated>2023-01-20T15:41:04Z</updated>

		<summary type="html">&lt;p&gt;Lancer: CPU usage of a Raspberry Pi4 on a clear night&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CPU usage of a Raspberry Pi4 on a clear night&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=530</id>
		<title>Pi4 with Raspbian Bullseye</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Pi4_with_Raspbian_Bullseye&amp;diff=530"/>
		<updated>2023-01-20T15:39:05Z</updated>

		<summary type="html">&lt;p&gt;Lancer: Initial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Work in progress&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi is excellent in the role of RMS station. It has just enough processing power with proper external connections. The task of RMS station can be combined with other tasks, as long as they are not too heavy. Possible examples:&lt;br /&gt;
1. ADSB receiver&lt;br /&gt;
2. NTP server&lt;br /&gt;
&lt;br /&gt;
Memory usage, on average, stays below 1GB so any model would suffice. If your have more memory you could do without a swap partition. This is especially useful if the station uses a flash card as storage. The RMS station task causes a lot of read/write actions. The best way would be to add an external USB3 disk. Any disk would do. External power for the disk should not be necessary, as long as relatively small SSD disks are used.&lt;br /&gt;
&lt;br /&gt;
If you decide to add an SSD disk to the Raspberry, see these instructions to boot from SSD by default. [https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb]&lt;br /&gt;
&lt;br /&gt;
The easiest way to run an RMS station is by using the standard RMS image. If you want to have more control, because the Pi will be doing other things as well, or want to have more control over versions used you can build your own. With the latest version of Raspbian, this is not a hard task. You can start by flashing either the default or the lite version of Raspbian Bullseye to your flash card or USB disk.&lt;br /&gt;
&lt;br /&gt;
This howto assumes you are logged into the Pi with SSH (secure shell). You can also connect monitor and keyboard or use VNC to connect to the Raspberry (enable VNC using raspi-config).&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Main_Page&amp;diff=529</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Main_Page&amp;diff=529"/>
		<updated>2023-01-20T15:35:09Z</updated>

		<summary type="html">&lt;p&gt;Lancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Global Meteor Network&#039;s wiki page!&lt;br /&gt;
&lt;br /&gt;
The Global Meteor Network (GMN) is a world wide organization of amateur and professional astronomers alike, whose goal is to observe the night sky using low-light video cameras and produce meteor trajectories in a coordinated manner. Here you will find information on the purpose and structure of the GMN, assembling and operating your own meteor camera, contributing to the development of RMS the GMN software, as well as information on how your observations as a citizen scientist can contribute to the further understanding of our solar system&#039;s formation and evolution. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;If you have come here to find out how to build and setup a camera from scratch, jump ahead to [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#How_do_I_obtain_a_camera.3F this] section !&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global Meteor Network Overview ==&lt;br /&gt;
&lt;br /&gt;
===  [https://globalmeteornetwork.org/?page_id=141 Our mission] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=363 A brief history of the Global Meteor Network] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://www.youtube.com/watch?v=MAGq-XqD5Po Video introduction - Overview of the Global Meteor Network (IMC2020)] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://youtu.be/oM7lfQ4nmyw Video overview - Meteor tracking and the GMN from Astro Imaging Channel presentation] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/data/ Some &#039;live&#039; GMN data products] ===&lt;br /&gt;
&lt;br /&gt;
== Meteor Detection Station ==&lt;br /&gt;
&lt;br /&gt;
=== What is an RMS GMN station? ===&lt;br /&gt;
: A RMS-based GMN station that is the subject of this Wiki consists of a Raspberry Pi (RPi) single board computer, a low light level security video camera, and the RMS software package. The camera is securely mounted in a weatherproof housing, pointed at the sky, and connected to the RPi with a POE (Power Over Ethernet) cable. The RPi is connected to the Internet via WiFi, and to be a part of GMN network, you’ll need a fairly powerful Raspberry Pi (RPi 3B+, RPi 4 or better) and a reasonably fast Internet connection. The internet connection is primarily required to enable data upload to a central server each morning as well as provide automatic updates for the RMS software. &lt;br /&gt;
&lt;br /&gt;
: Nightly, the RPi starts recording video from the camera shortly after local sunset continuously compressing and storing the video data locally. Each morning before sunrise, after capture is complete, the RPi analyzes the video and extracts your nightly station’s meteor observations. These extracted video “clips” of detected meteors are then archived and uploaded to a server. The clips can total hundreds of megabytes on a “busy” night (e.g., in a heavy meteor shower, or a night with a lot of false detections--progress is being made on the detection software). The server finds meteors which were observed with more than one station and this enables the server to triangulate the meteor trails in 3D and calculate the orbits of the meteors.&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/CroatianMeteorNetwork/RMS/blob/master/README.md  What do I need?] ===&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need a Raspberry Pi with the software on, and a camera kit.  We strongly recommend the Pi4 model. The software will run on a Pi3 but it is much slower. &lt;br /&gt;
&lt;br /&gt;
=== How do I obtain a camera? ===&lt;br /&gt;
There are two options:&lt;br /&gt;
&lt;br /&gt;
==== Buy a Camera ====&lt;br /&gt;
You can buy a camera and Pi prebuilt and ready to install. These are available from a couple of suppliers. The Croatian Meteor Network sell prebuilt cameras as explained on [https://globalmeteornetwork.org/?page_id=136 this page]. Alternatively, if you&#039;re in the UK, you can obtain cameras from the [https://ukmeteornetwork.co.uk/ UK Meteor Network] &lt;br /&gt;
&lt;br /&gt;
==== Build your own from scratch ====&lt;br /&gt;
This requires some basic DIY skills and some familiarity with the Raspberry PI, but don&#039;t be put off. The instructions are comprehensive and if you get stuck, you can ask for advice in the [https://groups.io/g/globalmeteornetwork groups.io] forum.  &lt;br /&gt;
&lt;br /&gt;
Click on this link if you want to &#039;&#039;&#039;[[Build_A_Camera|build a camera from scratch]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve built the camera, You can  &#039;&#039;&#039;[https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#Flash_a_pre-built_image flash a Prebuilt image]&#039;&#039;&#039; onto an SD card to set up the Pi with the software required to capture meteors and upload data to the network. Although the primary choice for Raspberry Pi 4 is still a microSD card, you may wish to consider &#039;&#039;&#039;using a USB flash disk, USB-attached SSD or USB-attached HDD&#039;&#039;&#039; as a boot device. Click [https://globalmeteornetwork.org/wiki/index.php?title=Booting_from_a_USB_device Booting from a USB device] to know more.&lt;br /&gt;
&lt;br /&gt;
=== Can I use a commercial all-sky camera? ===&lt;br /&gt;
&lt;br /&gt;
: Generally no due to the lack of sensitivity. [https://globalmeteornetwork.org/?p=163 But see this recent experiment]&lt;br /&gt;
&lt;br /&gt;
== Operating and maintaining your GMN station ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
: Please note that GMS is a nascent operation and you may share some growing pains if you choose to be involved -- we&#039;re still working out some bugs and making improvements here, which may be an opportunity to help if you have programming skills! ;-) So note that the workload of day-to-day operation can be non-zero, and might take a little bit of your time.&lt;br /&gt;
&lt;br /&gt;
: Ideally, you&#039;ll want to monitor your RMS RPi system(s) daily to look for freezes or glitches or other problems... like birds nesting or soiling the camera window, people accidentally unplugging the power cord, mice (or cats or dogs!) chewing on the camera Ethernet cable, etc.&lt;br /&gt;
&lt;br /&gt;
: Although we are getting close, this is not a &amp;quot;power up and forget about it&amp;quot; system yet.&lt;br /&gt;
: However, by its very nature, the GMS network is inhabited by a lot of people who are willing to help newcomers getting started. So, here are some clues for daily operation of your RMS camera.&lt;br /&gt;
&lt;br /&gt;
=== So what does the meteor camera do over the course of 24 hours? ===&lt;br /&gt;
&lt;br /&gt;
: The RMS Python based system calculates the sundown to sunrise interval and schedules video camera capture all night long. Depending on the video camera and capabilities of the RPi, the camera captures 25 or more frames per second between evening and morning twilight. During the continuous image capture, the station begins processing captured image data, doing a pre-screening to target frames with a suitable number of stars (usually around 20) that makes it worth looking for meteor detections. Once data capture has finished, the station switches into processing all the promising frames for detections, then refining the astrometric accuracy of every positive detection. Using the station platepar (plate parameters) calibration file, processing iterates to find the best astrometry and photometry solution for each detected meteor. Once this process has analyzed each detection, summary files are created. &lt;br /&gt;
: These summary files include text file data presentation in several widely accepted formats (CAMS and UFOorbit), as well as graphic plots of detection frequencies throughout the night, a set of thumbnail images of detections, a set of thumbnail images of data captured throughout the night, a single image with all detections stacked together, plots of photometry, astrometry, and camera pointing drift in arc minutes throughout the course of the night as the mount or building flexes, a flat file for correcting images, and a plot of all detections showing any identified radiants. Finally all results are combined into a single compressed archive, which is automatically uploaded each morning to the central server. Optionally, you can create a mp4 movie showing a time lapse of the night’s captured images.&lt;br /&gt;
: Each morning you can review the result files on the RPi, and copy anything you want to your computer or tablet.&lt;br /&gt;
&lt;br /&gt;
===Archiving data and backing up configuration ===&lt;br /&gt;
&lt;br /&gt;
: Your primary scientific data is automatically uploaded to the central server every morning when data processing is done. However once it has done this, RMS will purge out the oldest data to free up space for the next night&#039;s run. &lt;br /&gt;
&lt;br /&gt;
: So, you may want to copy some of the data to a PC, NAS or cloud for further analysis of your own. The data you should consider backing up are the contents of &#039;&#039;&#039;~/RMS_data/ArchivedFiles&#039;&#039;&#039;, which holds the individual files and data that RMS determined were probably meteors. Full detail on how to nbare beyond the scope of the GMN Wiki, but tools such as robocopy (for Windows) and rsync(for Linux/MacOS) are ideal. These tools can &#039;mirror&#039; data across a network. If you want help configuring these, ask in the Globalmeteornetwork group on groups.io.&lt;br /&gt;
&lt;br /&gt;
: We&#039;ve also built some automated tools that can help to back up any additional data to a thumb drive inserted into the RPi. Please ask in the group about these.&lt;br /&gt;
&lt;br /&gt;
=== Viewing the data ===&lt;br /&gt;
&lt;br /&gt;
: To view the data, you can use CMN_binViewer software[https://github.com/CroatianMeteorNetwork/cmn_binviewer] which is already installed in the RMS SD image. &lt;br /&gt;
: There is also a Windows version[https://github.com/CroatianMeteorNetwork/cmn_binviewer/releases] you can install.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Important note&#039;&#039;&#039; : You can also open the images in astronomical FITS viewers such as FITS Liberator or Pixinsight, though the results may be surprising. For example in FITS Liberator, the image will be &#039;&#039;&#039;upside down&#039;&#039;&#039;. This is an artefact of how the software reads the image. In space, there&#039;s no &#039;up&#039; or &#039;down&#039; and so the FITS specification does not dictate whether the pixel (0,0) is at the bottom left or top left, or indeed one of the other corners. Some software, notably FITS Liberator, treats the top left as the origin and so terrestrial images will be displayed mirrored vertically.&lt;br /&gt;
&lt;br /&gt;
=== Tools and Utilities ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.realvnc.com/en/connect/download/viewer/ RealVNC] or [https://anydesk.com/en AnyDesk] remote connect tool allows station access from anywhere. Access from outside your network is enabled by use of an OpenVPN connection address available to meteor stations. Alternatively, with VNC and Teamviewer, you can create an account and team on their websites, and then remotely access your station. &lt;br /&gt;
* Samba data directory access, allows you to copy data results directly from your RPi to your computer or tablet.&lt;br /&gt;
* [https://github.com/CroatianMeteorNetwork/cmn_binviewer CMN_binViewer] can be used to view standard fits image files containing meteor detections. It runs on the RPi, and is also available under Windows.&lt;br /&gt;
* [https://sonotaco.com/soft/e_index.html UFO Orbit] allows you to process data from multiple stations and generate unified radiants of two or more stations seeing the same meteor. It can plot the shared object ground path, orbital characteristics, and can output a summary file of all objects seen by more than one station, which can be used for further analysis.&lt;br /&gt;
* RMS software can be installed under Windows to allow much of the RMS python-based code to be executed on your computer, so it can be run against meteor station data you have transferred to your computer from the RPi.&lt;br /&gt;
* You can run RMS Python jobs on the RPi to sample the image files captured all night long and condense them into a mp4 movie. This creates a sometimes mesmerizing summary that can run for over 2 minutes in length for winter time data.&lt;br /&gt;
&lt;br /&gt;
== Configuring and installing your camera ==&lt;br /&gt;
&lt;br /&gt;
=== [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick start guide] ===&lt;br /&gt;
&lt;br /&gt;
=== [[Focusing_your_camera | Focusing your IP camera]] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://www.youtube.com/watch?v=N2sq1hBwcAA Video tutorial - Configuring your IMX291 IP camera] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://docs.google.com/document/d/1TPotXcRstHz-XWIQYIW71xkRYy7Ca1UCoEiZsqdk9zw/edit?usp=sharing Different ways of connecting the camera] ===&lt;br /&gt;
&lt;br /&gt;
== What can I do with my GMN station? ==&lt;br /&gt;
&lt;br /&gt;
=== [https://www.youtube.com/watch?v=MOjb3qxDlX4 Video Tutorial - Using SkyFit2 to perform astrometric and photometric calibration + Manually reducing observations of fireballs and computing their trajectories] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=310 Generating a Google Earth KML file to show your station&#039;s field of view] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=253 Using UFO Orbit program to estimate meteor trajectories] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=221 Urban meteor observing] ===&lt;br /&gt;
&lt;br /&gt;
== RMS Software Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Flash a pre-built image ===&lt;br /&gt;
&lt;br /&gt;
Pre-built Images are available with the RMS software pre-installed on Raspbian. Raspbian is the operating system typically used on the Raspberry Pi. &lt;br /&gt;
&lt;br /&gt;
A 128 GB microSD card is preferred, although smaller 64 GB cards will also work. The image is flashed to the microSD card using the Etcher utility for Windows (32 or 64-bit), MacOS or Linux (64-bit), which can be found [https://www.balena.io/etcher/ here]&lt;br /&gt;
&lt;br /&gt;
If you are considering using a USB flash disk, USB-attached SSD or USB-attached HDD as a boot device, click [https://globalmeteornetwork.org/wiki/index.php?title=Booting_from_a_USB_device Booting from a USB device] to know more.&lt;br /&gt;
&lt;br /&gt;
When you first boot up the Pi make sure you have a keyboard, monitor and mouse attached as you will be taken through a setup process by the RMS software. &lt;br /&gt;
&lt;br /&gt;
The current publicly released images of RMS are: &lt;br /&gt;
[https://www.dropbox.com/s/sa9csd4m3jr1vqo/RMS_image_20191203.zip?dl=1 RPi3B+ ]&lt;br /&gt;
and &lt;br /&gt;
[https://www.dropbox.com/s/3pwwenty43dazq4/RMS_RPi4_image_20210626.zip?dl=1 RPi4 ]. &lt;br /&gt;
&lt;br /&gt;
Please see the [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick Start Guide] about how to flash them to an SD card.&lt;br /&gt;
&lt;br /&gt;
Notes: &lt;br /&gt;
* The earlier versions of the Raspberry Pi, the 1 and 2, are not powerful enough to run RMS software.&lt;br /&gt;
&lt;br /&gt;
* the pre-installed RMS software images incorporate an auto-updating feature, so that the RMS software is updated to the current release whenever your Raspberry Pi RMS is booted. This way, your station is always running the most recent set of updates. &lt;br /&gt;
&lt;br /&gt;
* For installations into other Linux or windows environments, executing the command &#039;&#039;git pull&#039;&#039; will update to the most recent RMS release.&lt;br /&gt;
&lt;br /&gt;
* The code was designed to run on a RPi, but it will also run an some Linux distributions. We have tested it on Linux Mint 18 and Ubuntu 16. For information on installing into other Linux releases, check portions of the section listed below for installing on RPi, and also check installation instructions found on [https://github.com/CroatianMeteorNetwork/RMS GitHub]&lt;br /&gt;
&lt;br /&gt;
== [OPTIONAL] Install the software from scratch  ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: if you&#039;re setting up a Raspberry Pi you should use the prebuilt image as this comes with all necessary software installed and is ready to use.&#039;&#039;&#039;. If you really really &#039;&#039;&#039;really&#039;&#039;&#039; do want to install on the RPi from scratch, you can follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
=== Install for Raspberry Pi 4 ===&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://docs.google.com/document/d/19ImeNqBTD1ml2iisp5y7CjDrRV33wBeF9rtx3mIVjh4/edit?usp=sharing here]&lt;br /&gt;
&lt;br /&gt;
Install on a [[Pi4 with Raspbian Bullseye]]&lt;br /&gt;
&lt;br /&gt;
===  Install for Raspberry Pi 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We no longer recommend the Pi3, as it doesn&#039;t have the performance or memory to handle busy meteor showers. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://docs.google.com/document/d/1ChaXx6WkuGfcQ_f5yRbwUOOMxEgIJrjq932UZE6cRjE/edit here].&lt;br /&gt;
&lt;br /&gt;
=== Install for Linux ===&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://globalmeteornetwork.org/wiki/index.php?title=Installation_for_Linux here]&lt;br /&gt;
&lt;br /&gt;
=== Linux GUI and multi-Camera support ===&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://docs.google.com/document/d/e/2PACX-1vTh_CtwxKu3_vxB6YpEoctLpsn5-v677qJgWsYi6gEr_QKacrfrfIz4lFM1l-CZO86t1HwFfk3P5Nb6/pub here]&lt;br /&gt;
&lt;br /&gt;
=== Installation for Windows ===&lt;br /&gt;
Data capture does not work under windows. However you can use the other tools on your PC, where its much quicker to run SkyFit2 to calibrate your camera to the sky, or you want to use BatchFFToImage to convert data to jpeg format to share on Social Media. &lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;[[Windows_Installation|here]]&#039;&#039;&#039; for detailed instructions. The instructions were tested on Windows 10 64-bit, but should work on any Windows version where git and Anaconda are available. &lt;br /&gt;
&lt;br /&gt;
Aside: If you are a Windows whizz, please feel free to investigate why data capture doesn&#039;t work!&lt;br /&gt;
&lt;br /&gt;
=== Installation for MacOS ===&lt;br /&gt;
As with Windows, installation for MacOS is useful if you want to analyse the data offline. If you do want to install it, please follow the instructions &#039;&#039;&#039;[[MacOS_Install | here]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Data analysis with SkyFit2 ==&lt;br /&gt;
&lt;br /&gt;
SkyFit2 is a program within the RMS library which supports analyzing optical meteor data in most optical formats that are in use today, including videos in any popular video format (mp4, avi, mkv), a sequence of static images, or a single image with shutter breaks.&lt;br /&gt;
&lt;br /&gt;
This [https://www.youtube.com/watch?v=MOjb3qxDlX4 video tutorial] explains how to using SkyFit2 to perform astrometric and photometric calibration on GMN data and manually reduce observations of fireballs, including computing their trajectories.&lt;br /&gt;
&lt;br /&gt;
A more general and detailed description of SkyFit2 is given at the &#039;&#039;&#039;[[SkyFit2|SkyFit2]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
=== What should I back up when re-flashing an SD card or a USB disk? ===&lt;br /&gt;
&lt;br /&gt;
: The .config, platepar and mask files that are in the RMS source directory, plus the whole contents of the hidden directory /home/pi/.ssh. &lt;br /&gt;
&lt;br /&gt;
If your SD card or a USB disk fails or becomes corrupted, the config files can be fetched from the server as they are uploaded every day together with the data. However the contents of .ssh are essential for connection to the server, so you must also save these. Once you set up a new SD card or a USB disk, return the files in their original location.&lt;br /&gt;
&lt;br /&gt;
=== What are the values in FTPdetectinfo_*  file designated as hnr mle bin Pix/fm Rho Phi? ===&lt;br /&gt;
&lt;br /&gt;
:  Some of these values are not used in RMS (hnr mle bin), but they are in CAMS, so they are here to conform to the standard. Thus they are all zeros. The others are:&lt;br /&gt;
&lt;br /&gt;
: - Pix/fm - Average angular speed of the meteor in pixels per frame.&lt;br /&gt;
&lt;br /&gt;
: - Rho, Phi - Parameters that define the line of the meteor in polar coordinates, see [https://en.wikipedia.org/wiki/Hough_transform#Theory here] for more details. Rho is the distance of the line from the centre of the image, and phi is the angle of the line as measured from the positive direction of the Y axis (basically a line going from the center of the image to the top of the image), the positive angles are measured clockwise (I think, the CAMS standard might define these parameters a bit differently, the Y axis is flipped).&lt;br /&gt;
&lt;br /&gt;
: The intensity is the sum of all pixel intensities of the meteor on a given frame. Let&#039;s say I represent an area around the meteor on a given frame like this, where the numbers are pixel intensities on an 8-bit image (so they can range from 0 to 255):&lt;br /&gt;
&lt;br /&gt;
: [[File:Intensity_sum.png |Intensity_sum.png ]]&lt;br /&gt;
&lt;br /&gt;
: and the pixels values inside the red boundary represent the meteor blob on the frame, the intensity would be the sum of all numbers inside the red boundary.&lt;br /&gt;
: This value is later used to compute the magnitude. The magnitude is computed as: mag = -2.5*log10(intensity sum) + photometric_offset. The photometric offset is estimated in SkyFit by fitting the line with slope -2.5 through pairs of known magnitudes of stars and logartihms of their pixel intensity sum. The photometric offset is basically the intercept of that line. The constant slope of -2.5 comes from the [https://en.wikipedia.org/wiki/Apparent_magnitude#Calculations definition of stellar magnitudes.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GMN data policy ==&lt;br /&gt;
&lt;br /&gt;
The Global Meteor Network produces several levles of data products:&lt;br /&gt;
* Level 1 - The lowest level data (i.e. as close to &amp;quot;raw&amp;quot; as possible) are the FF image and FR video files saved to the RPi by the capture code and the fireball detector.&lt;br /&gt;
* Level 2 - The meteor detector uses these data to extract positional and brightness information of individual meteors (FTPdetectinfo file), and images are also used for astrometric and photometric calibration (platepar file).  Meteor and star detections are used to generate a range of plots suchs as the single-station shower association graph, camera drift graph, etc. The calibrated meteors measurements get uploaded to the GMN server together with the raw images of individual meteors.&lt;br /&gt;
* Level 3 - The software on the server correlates individual observations and computes multi-station meteor trajectories which are published daily on the GMN [https://globalmeteornetwork.org/data/ data website]. This data is made public under the [https://creativecommons.org/licenses/by/4.0/ CC BY 4.0 license].&lt;br /&gt;
&lt;br /&gt;
Operators of individual GMN stations exclusivery own the Level 1 and Level 2 data their stations produce. In practice, this means that they are free to share this data with other meteor networks if they wish to do so. The data that gets uploaded to the GMN server will not be shared publicly nor with other parties without the operator&#039;s consent, but may be used internally by the GMN coordinators to manually produce other data products (e.g. trajectory of a meteorite dropping fireball, analysis of a meteor shower). All station operators will be credited for their data in all GMN publications.&lt;br /&gt;
&lt;br /&gt;
== IstraStream ==&lt;br /&gt;
&lt;br /&gt;
=== [http://istrastream.com/rms-gmn/ IstraStream GMN status website] ===&lt;br /&gt;
&lt;br /&gt;
: The IstraStream.com is an independent hosting site which is part of our world wide GMN. It is primarily a host for data from cameras sold by IstraStream, but other station operators can request that their data be included.&lt;br /&gt;
To enable the IstraStream upload, the &amp;lt;b&amp;gt;external_script_run&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;external_script_path&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;reboot_after_processing&amp;lt;/b&amp;gt; parameters have to be changed. This is how the config file should look:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; External script&lt;br /&gt;
; An external script will be run after RMS finishes the processing for the night, it will be passed three arguments:&lt;br /&gt;
; captured_night_dir, archived_night_dir, config - captured_night dir is the full path to the captured folder of the night&lt;br /&gt;
; the second one is the archived, and config is an object holding the values in this config file.&lt;br /&gt;
; ---------------&lt;br /&gt;
; Enable running an external script at the end of every night of processing&lt;br /&gt;
external_script_run: true&lt;br /&gt;
; Run the external script after auto reprocess. &amp;quot;auto_reprocess&amp;quot; needs to be turned on for this to work.&lt;br /&gt;
auto_reprocess_external_script_run: false&lt;br /&gt;
; Full path to the external script&lt;br /&gt;
external_script_path: /home/pi/source/RMS/iStream/iStream.py&lt;br /&gt;
; Name of the function in the external script which will be called&lt;br /&gt;
external_function_name: rmsExternal&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Daily reboot&lt;br /&gt;
; ---------------&lt;br /&gt;
; Reboot the computer daily after the processing and upload is done&lt;br /&gt;
reboot_after_processing: false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, send an e-mail to [mailto:info@istrastream.com info@istrastream.com] with your:&lt;br /&gt;
* Station_ID&lt;br /&gt;
* Location or Name (if not secret)&lt;br /&gt;
* Lens type/size&lt;br /&gt;
&lt;br /&gt;
For example, &amp;quot;CA0001; Elginfield Observatory, Ontario, Canada; 4mm&amp;quot;. The IstraStream crew will enable the weblog page within a few days.&lt;br /&gt;
&lt;br /&gt;
Finally, this document explains what every plot on the IstraStream weblog means:&lt;br /&gt;
&lt;br /&gt;
=== [https://docs.google.com/document/d/132aHGn0QPzhpVN2s2n6FT6rJn39LAsPkchWJqXQb8Qk/edit?usp=sharing IstraStream Plots Explanation] ===&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?page_id=43 Contact the Global Meteor Network] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://groups.io/g/globalmeteornetwork Join the Global Meteor Network Forum] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/markmac99/ukmon-pitools/wiki UK Meteor Network Wiki]===&lt;br /&gt;
This wiki has numerous FAQs and tips on maintaining, monitoring and managing your system, and several explainers such as how to calibrate and create a mask, how to copy data and so forth. &lt;br /&gt;
&lt;br /&gt;
=== GMN talks ===&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=wDdrG_FCyGk 2022 Global Meteor Network Meeting Session 1 (February, 2022)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=j_75CDPzjI4 2022 Global Meteor Network Meeting Session 2 (February, 2022)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=f6x9_WCVphY GMN talk at the European Space Agency&#039;s Fireball Workshop (June, 2021)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=QXBTLPnPDWs GMN Workshop (February, 2021)] - [https://www.dropbox.com/sh/ia9vagug5lxm8k9/AAB_i_1jcWThUdAHO_2gF_Ksa?dl=0 Link to slides]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=MAGq-XqD5Po Overview of the GMN - IMC2020 (September, 2020)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=oM7lfQ4nmyw Overview of the GMN, Astro Imaging Channel presentation (May, 2020)]&lt;br /&gt;
&lt;br /&gt;
=== GMN related publications ===&lt;br /&gt;
&lt;br /&gt;
: [https://academic.oup.com/mnras/advance-article/doi/10.1093/mnras/stab2557/6368869 Moorhead, A. V., Clements, T., &amp;amp; Vida, D. (2021). Meteor shower radiant dispersions in Global Meteor Network data. Monthly Notices of the Royal Astronomical Society.]&lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/abs/2107.12335 Vida, D., Šegon, D., Gural, P. S., Brown, P. G., McIntyre, M. J., Dijkema, T. J., Pavletić, L., Kukić, P., Mazur, M.J., Eschman, P., Roggemans, P., Merlak, A., &amp;amp; Zubović, D. (2021). The Global Meteor Network–Methodology and first results. Monthly Notices of the Royal Astronomical Society, 506(4), 5046-5074.]&lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/abs/2003.05458/ Moorhead, A. V., Clements, T. D., &amp;amp; Vida, D. (2020). Realistic gravitational focusing of meteoroid streams. Monthly Notices of the Royal Astronomical Society, 494(2), 2982-2994.] &lt;br /&gt;
&lt;br /&gt;
: [https://globalmeteornetwork.org/wordpress/wp-content/uploads/2018/11/Kukic-et-al-2018-Rolling-shutter.pdf  Kukić, P., Gural, P., Vida, D., Šegon, D. &amp;amp; Merlak, A. (2018) Correction for meteor centroids observed using rolling shutter cameras. WGN, Journal of the International Meteor Organization, 46:5, 154-118.]&lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_sun_skirter_final.pdf  Vida, D., Mazur, M. J., Šegon, D., Kukić, P., &amp;amp; Merlak, A. (2018). Compressive strength of a skirting Daytime Arietid-first science results from low-cost Raspberry Pi-based meteor stations. WGN, Journal of the International Meteor Organization, 46, 113-118.] &lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/pdf/1911.02979.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - I. Theory. arXiv:1911.02979v4 [astro-ph.EP] 21 Apr 2020]&lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/pdf/1911.11734.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - II. Results. arXiv:1911.11734v1 [astro-ph.EP] 26 Novr 2019]&lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_first_results-final.pdf Vida, D., Mazur, M. J., Šegon, D., Zubović, D., Kukić, P., Parag, F., &amp;amp; Macan, A. (2018). First results of a Raspberry Pi based meteor camera system. WGN, Journal of the International Meteor Organization, 46, 71-78.] &lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Vida_IMC2016_proceedings_final.pdf Vida, D., Zubović, D., Šegon, D., Gural, P., &amp;amp; Cupec, R. (2016). Open-source meteor detection software for low-cost single-board computers. In Proceedings of the International Meteor Conference (IMC2016), Egmond, The Netherlands (pp. 2-5).] &lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Zubovic_IMC2015_priceedings_final.pdf Zubović, D., Vida, D., Gural, P., &amp;amp; Šegon, D. (2015). Advances in the development of a low-cost video meteor station. In Proceedings of the International Meteor Conference, Mistelbach, Austria (pp. 27-30).]&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
	<entry>
		<id>https://globalmeteornetwork.org//wiki/index.php?title=Main_Page&amp;diff=528</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://globalmeteornetwork.org//wiki/index.php?title=Main_Page&amp;diff=528"/>
		<updated>2023-01-20T15:34:11Z</updated>

		<summary type="html">&lt;p&gt;Lancer: Add links for Raspbian Bullseye install&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the Global Meteor Network&#039;s wiki page!&lt;br /&gt;
&lt;br /&gt;
The Global Meteor Network (GMN) is a world wide organization of amateur and professional astronomers alike, whose goal is to observe the night sky using low-light video cameras and produce meteor trajectories in a coordinated manner. Here you will find information on the purpose and structure of the GMN, assembling and operating your own meteor camera, contributing to the development of RMS the GMN software, as well as information on how your observations as a citizen scientist can contribute to the further understanding of our solar system&#039;s formation and evolution. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;If you have come here to find out how to build and setup a camera from scratch, jump ahead to [https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#How_do_I_obtain_a_camera.3F this] section !&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global Meteor Network Overview ==&lt;br /&gt;
&lt;br /&gt;
===  [https://globalmeteornetwork.org/?page_id=141 Our mission] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=363 A brief history of the Global Meteor Network] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://www.youtube.com/watch?v=MAGq-XqD5Po Video introduction - Overview of the Global Meteor Network (IMC2020)] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://youtu.be/oM7lfQ4nmyw Video overview - Meteor tracking and the GMN from Astro Imaging Channel presentation] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/data/ Some &#039;live&#039; GMN data products] ===&lt;br /&gt;
&lt;br /&gt;
== Meteor Detection Station ==&lt;br /&gt;
&lt;br /&gt;
=== What is an RMS GMN station? ===&lt;br /&gt;
: A RMS-based GMN station that is the subject of this Wiki consists of a Raspberry Pi (RPi) single board computer, a low light level security video camera, and the RMS software package. The camera is securely mounted in a weatherproof housing, pointed at the sky, and connected to the RPi with a POE (Power Over Ethernet) cable. The RPi is connected to the Internet via WiFi, and to be a part of GMN network, you’ll need a fairly powerful Raspberry Pi (RPi 3B+, RPi 4 or better) and a reasonably fast Internet connection. The internet connection is primarily required to enable data upload to a central server each morning as well as provide automatic updates for the RMS software. &lt;br /&gt;
&lt;br /&gt;
: Nightly, the RPi starts recording video from the camera shortly after local sunset continuously compressing and storing the video data locally. Each morning before sunrise, after capture is complete, the RPi analyzes the video and extracts your nightly station’s meteor observations. These extracted video “clips” of detected meteors are then archived and uploaded to a server. The clips can total hundreds of megabytes on a “busy” night (e.g., in a heavy meteor shower, or a night with a lot of false detections--progress is being made on the detection software). The server finds meteors which were observed with more than one station and this enables the server to triangulate the meteor trails in 3D and calculate the orbits of the meteors.&lt;br /&gt;
&lt;br /&gt;
===[https://github.com/CroatianMeteorNetwork/RMS/blob/master/README.md  What do I need?] ===&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need a Raspberry Pi with the software on, and a camera kit.  We strongly recommend the Pi4 model. The software will run on a Pi3 but it is much slower. &lt;br /&gt;
&lt;br /&gt;
=== How do I obtain a camera? ===&lt;br /&gt;
There are two options:&lt;br /&gt;
&lt;br /&gt;
==== Buy a Camera ====&lt;br /&gt;
You can buy a camera and Pi prebuilt and ready to install. These are available from a couple of suppliers. The Croatian Meteor Network sell prebuilt cameras as explained on [https://globalmeteornetwork.org/?page_id=136 this page]. Alternatively, if you&#039;re in the UK, you can obtain cameras from the [https://ukmeteornetwork.co.uk/ UK Meteor Network] &lt;br /&gt;
&lt;br /&gt;
==== Build your own from scratch ====&lt;br /&gt;
This requires some basic DIY skills and some familiarity with the Raspberry PI, but don&#039;t be put off. The instructions are comprehensive and if you get stuck, you can ask for advice in the [https://groups.io/g/globalmeteornetwork groups.io] forum.  &lt;br /&gt;
&lt;br /&gt;
Click on this link if you want to &#039;&#039;&#039;[[Build_A_Camera|build a camera from scratch]]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve built the camera, You can  &#039;&#039;&#039;[https://globalmeteornetwork.org/wiki/index.php?title=Main_Page#Flash_a_pre-built_image flash a Prebuilt image]&#039;&#039;&#039; onto an SD card to set up the Pi with the software required to capture meteors and upload data to the network. Although the primary choice for Raspberry Pi 4 is still a microSD card, you may wish to consider &#039;&#039;&#039;using a USB flash disk, USB-attached SSD or USB-attached HDD&#039;&#039;&#039; as a boot device. Click [https://globalmeteornetwork.org/wiki/index.php?title=Booting_from_a_USB_device Booting from a USB device] to know more.&lt;br /&gt;
&lt;br /&gt;
=== Can I use a commercial all-sky camera? ===&lt;br /&gt;
&lt;br /&gt;
: Generally no due to the lack of sensitivity. [https://globalmeteornetwork.org/?p=163 But see this recent experiment]&lt;br /&gt;
&lt;br /&gt;
== Operating and maintaining your GMN station ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
: Please note that GMS is a nascent operation and you may share some growing pains if you choose to be involved -- we&#039;re still working out some bugs and making improvements here, which may be an opportunity to help if you have programming skills! ;-) So note that the workload of day-to-day operation can be non-zero, and might take a little bit of your time.&lt;br /&gt;
&lt;br /&gt;
: Ideally, you&#039;ll want to monitor your RMS RPi system(s) daily to look for freezes or glitches or other problems... like birds nesting or soiling the camera window, people accidentally unplugging the power cord, mice (or cats or dogs!) chewing on the camera Ethernet cable, etc.&lt;br /&gt;
&lt;br /&gt;
: Although we are getting close, this is not a &amp;quot;power up and forget about it&amp;quot; system yet.&lt;br /&gt;
: However, by its very nature, the GMS network is inhabited by a lot of people who are willing to help newcomers getting started. So, here are some clues for daily operation of your RMS camera.&lt;br /&gt;
&lt;br /&gt;
=== So what does the meteor camera do over the course of 24 hours? ===&lt;br /&gt;
&lt;br /&gt;
: The RMS Python based system calculates the sundown to sunrise interval and schedules video camera capture all night long. Depending on the video camera and capabilities of the RPi, the camera captures 25 or more frames per second between evening and morning twilight. During the continuous image capture, the station begins processing captured image data, doing a pre-screening to target frames with a suitable number of stars (usually around 20) that makes it worth looking for meteor detections. Once data capture has finished, the station switches into processing all the promising frames for detections, then refining the astrometric accuracy of every positive detection. Using the station platepar (plate parameters) calibration file, processing iterates to find the best astrometry and photometry solution for each detected meteor. Once this process has analyzed each detection, summary files are created. &lt;br /&gt;
: These summary files include text file data presentation in several widely accepted formats (CAMS and UFOorbit), as well as graphic plots of detection frequencies throughout the night, a set of thumbnail images of detections, a set of thumbnail images of data captured throughout the night, a single image with all detections stacked together, plots of photometry, astrometry, and camera pointing drift in arc minutes throughout the course of the night as the mount or building flexes, a flat file for correcting images, and a plot of all detections showing any identified radiants. Finally all results are combined into a single compressed archive, which is automatically uploaded each morning to the central server. Optionally, you can create a mp4 movie showing a time lapse of the night’s captured images.&lt;br /&gt;
: Each morning you can review the result files on the RPi, and copy anything you want to your computer or tablet.&lt;br /&gt;
&lt;br /&gt;
===Archiving data and backing up configuration ===&lt;br /&gt;
&lt;br /&gt;
: Your primary scientific data is automatically uploaded to the central server every morning when data processing is done. However once it has done this, RMS will purge out the oldest data to free up space for the next night&#039;s run. &lt;br /&gt;
&lt;br /&gt;
: So, you may want to copy some of the data to a PC, NAS or cloud for further analysis of your own. The data you should consider backing up are the contents of &#039;&#039;&#039;~/RMS_data/ArchivedFiles&#039;&#039;&#039;, which holds the individual files and data that RMS determined were probably meteors. Full detail on how to nbare beyond the scope of the GMN Wiki, but tools such as robocopy (for Windows) and rsync(for Linux/MacOS) are ideal. These tools can &#039;mirror&#039; data across a network. If you want help configuring these, ask in the Globalmeteornetwork group on groups.io.&lt;br /&gt;
&lt;br /&gt;
: We&#039;ve also built some automated tools that can help to back up any additional data to a thumb drive inserted into the RPi. Please ask in the group about these.&lt;br /&gt;
&lt;br /&gt;
=== Viewing the data ===&lt;br /&gt;
&lt;br /&gt;
: To view the data, you can use CMN_binViewer software[https://github.com/CroatianMeteorNetwork/cmn_binviewer] which is already installed in the RMS SD image. &lt;br /&gt;
: There is also a Windows version[https://github.com/CroatianMeteorNetwork/cmn_binviewer/releases] you can install.&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;Important note&#039;&#039;&#039; : You can also open the images in astronomical FITS viewers such as FITS Liberator or Pixinsight, though the results may be surprising. For example in FITS Liberator, the image will be &#039;&#039;&#039;upside down&#039;&#039;&#039;. This is an artefact of how the software reads the image. In space, there&#039;s no &#039;up&#039; or &#039;down&#039; and so the FITS specification does not dictate whether the pixel (0,0) is at the bottom left or top left, or indeed one of the other corners. Some software, notably FITS Liberator, treats the top left as the origin and so terrestrial images will be displayed mirrored vertically.&lt;br /&gt;
&lt;br /&gt;
=== Tools and Utilities ===&lt;br /&gt;
&lt;br /&gt;
* [https://www.realvnc.com/en/connect/download/viewer/ RealVNC] or [https://anydesk.com/en AnyDesk] remote connect tool allows station access from anywhere. Access from outside your network is enabled by use of an OpenVPN connection address available to meteor stations. Alternatively, with VNC and Teamviewer, you can create an account and team on their websites, and then remotely access your station. &lt;br /&gt;
* Samba data directory access, allows you to copy data results directly from your RPi to your computer or tablet.&lt;br /&gt;
* [https://github.com/CroatianMeteorNetwork/cmn_binviewer CMN_binViewer] can be used to view standard fits image files containing meteor detections. It runs on the RPi, and is also available under Windows.&lt;br /&gt;
* [https://sonotaco.com/soft/e_index.html UFO Orbit] allows you to process data from multiple stations and generate unified radiants of two or more stations seeing the same meteor. It can plot the shared object ground path, orbital characteristics, and can output a summary file of all objects seen by more than one station, which can be used for further analysis.&lt;br /&gt;
* RMS software can be installed under Windows to allow much of the RMS python-based code to be executed on your computer, so it can be run against meteor station data you have transferred to your computer from the RPi.&lt;br /&gt;
* You can run RMS Python jobs on the RPi to sample the image files captured all night long and condense them into a mp4 movie. This creates a sometimes mesmerizing summary that can run for over 2 minutes in length for winter time data.&lt;br /&gt;
&lt;br /&gt;
== Configuring and installing your camera ==&lt;br /&gt;
&lt;br /&gt;
=== [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick start guide] ===&lt;br /&gt;
&lt;br /&gt;
=== [[Focusing_your_camera | Focusing your IP camera]] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://www.youtube.com/watch?v=N2sq1hBwcAA Video tutorial - Configuring your IMX291 IP camera] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://docs.google.com/document/d/1TPotXcRstHz-XWIQYIW71xkRYy7Ca1UCoEiZsqdk9zw/edit?usp=sharing Different ways of connecting the camera] ===&lt;br /&gt;
&lt;br /&gt;
== What can I do with my GMN station? ==&lt;br /&gt;
&lt;br /&gt;
=== [https://www.youtube.com/watch?v=MOjb3qxDlX4 Video Tutorial - Using SkyFit2 to perform astrometric and photometric calibration + Manually reducing observations of fireballs and computing their trajectories] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=310 Generating a Google Earth KML file to show your station&#039;s field of view] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=253 Using UFO Orbit program to estimate meteor trajectories] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?p=221 Urban meteor observing] ===&lt;br /&gt;
&lt;br /&gt;
== RMS Software Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Flash a pre-built image ===&lt;br /&gt;
&lt;br /&gt;
Pre-built Images are available with the RMS software pre-installed on Raspbian. Raspbian is the operating system typically used on the Raspberry Pi. &lt;br /&gt;
&lt;br /&gt;
A 128 GB microSD card is preferred, although smaller 64 GB cards will also work. The image is flashed to the microSD card using the Etcher utility for Windows (32 or 64-bit), MacOS or Linux (64-bit), which can be found [https://www.balena.io/etcher/ here]&lt;br /&gt;
&lt;br /&gt;
If you are considering using a USB flash disk, USB-attached SSD or USB-attached HDD as a boot device, click [https://globalmeteornetwork.org/wiki/index.php?title=Booting_from_a_USB_device Booting from a USB device] to know more.&lt;br /&gt;
&lt;br /&gt;
When you first boot up the Pi make sure you have a keyboard, monitor and mouse attached as you will be taken through a setup process by the RMS software. &lt;br /&gt;
&lt;br /&gt;
The current publicly released images of RMS are: &lt;br /&gt;
[https://www.dropbox.com/s/sa9csd4m3jr1vqo/RMS_image_20191203.zip?dl=1 RPi3B+ ]&lt;br /&gt;
and &lt;br /&gt;
[https://www.dropbox.com/s/3pwwenty43dazq4/RMS_RPi4_image_20210626.zip?dl=1 RPi4 ]. &lt;br /&gt;
&lt;br /&gt;
Please see the [https://docs.google.com/document/u/1/d/1MTL85YMYH33u8OZ9Tl0JjSZXcLn8mOmNrCOC0I28Drw/edit Quick Start Guide] about how to flash them to an SD card.&lt;br /&gt;
&lt;br /&gt;
Notes: &lt;br /&gt;
* The earlier versions of the Raspberry Pi, the 1 and 2, are not powerful enough to run RMS software.&lt;br /&gt;
&lt;br /&gt;
* the pre-installed RMS software images incorporate an auto-updating feature, so that the RMS software is updated to the current release whenever your Raspberry Pi RMS is booted. This way, your station is always running the most recent set of updates. &lt;br /&gt;
&lt;br /&gt;
* For installations into other Linux or windows environments, executing the command &#039;&#039;git pull&#039;&#039; will update to the most recent RMS release.&lt;br /&gt;
&lt;br /&gt;
* The code was designed to run on a RPi, but it will also run an some Linux distributions. We have tested it on Linux Mint 18 and Ubuntu 16. For information on installing into other Linux releases, check portions of the section listed below for installing on RPi, and also check installation instructions found on [https://github.com/CroatianMeteorNetwork/RMS GitHub]&lt;br /&gt;
&lt;br /&gt;
== [OPTIONAL] Install the software from scratch  ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: if you&#039;re setting up a Raspberry Pi you should use the prebuilt image as this comes with all necessary software installed and is ready to use.&#039;&#039;&#039;. If you really really &#039;&#039;&#039;really&#039;&#039;&#039; do want to install on the RPi from scratch, you can follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
=== Install for Raspberry Pi 4 ===&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://docs.google.com/document/d/19ImeNqBTD1ml2iisp5y7CjDrRV33wBeF9rtx3mIVjh4/edit?usp=sharing here]&lt;br /&gt;
Install on a [[Pi4 with Raspbian Bullseye]]&lt;br /&gt;
&lt;br /&gt;
===  Install for Raspberry Pi 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;We no longer recommend the Pi3, as it doesn&#039;t have the performance or memory to handle busy meteor showers. &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://docs.google.com/document/d/1ChaXx6WkuGfcQ_f5yRbwUOOMxEgIJrjq932UZE6cRjE/edit here].&lt;br /&gt;
&lt;br /&gt;
=== Install for Linux ===&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://globalmeteornetwork.org/wiki/index.php?title=Installation_for_Linux here]&lt;br /&gt;
&lt;br /&gt;
=== Linux GUI and multi-Camera support ===&lt;br /&gt;
&lt;br /&gt;
Detailed instructions [https://docs.google.com/document/d/e/2PACX-1vTh_CtwxKu3_vxB6YpEoctLpsn5-v677qJgWsYi6gEr_QKacrfrfIz4lFM1l-CZO86t1HwFfk3P5Nb6/pub here]&lt;br /&gt;
&lt;br /&gt;
=== Installation for Windows ===&lt;br /&gt;
Data capture does not work under windows. However you can use the other tools on your PC, where its much quicker to run SkyFit2 to calibrate your camera to the sky, or you want to use BatchFFToImage to convert data to jpeg format to share on Social Media. &lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;[[Windows_Installation|here]]&#039;&#039;&#039; for detailed instructions. The instructions were tested on Windows 10 64-bit, but should work on any Windows version where git and Anaconda are available. &lt;br /&gt;
&lt;br /&gt;
Aside: If you are a Windows whizz, please feel free to investigate why data capture doesn&#039;t work!&lt;br /&gt;
&lt;br /&gt;
=== Installation for MacOS ===&lt;br /&gt;
As with Windows, installation for MacOS is useful if you want to analyse the data offline. If you do want to install it, please follow the instructions &#039;&#039;&#039;[[MacOS_Install | here]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Data analysis with SkyFit2 ==&lt;br /&gt;
&lt;br /&gt;
SkyFit2 is a program within the RMS library which supports analyzing optical meteor data in most optical formats that are in use today, including videos in any popular video format (mp4, avi, mkv), a sequence of static images, or a single image with shutter breaks.&lt;br /&gt;
&lt;br /&gt;
This [https://www.youtube.com/watch?v=MOjb3qxDlX4 video tutorial] explains how to using SkyFit2 to perform astrometric and photometric calibration on GMN data and manually reduce observations of fireballs, including computing their trajectories.&lt;br /&gt;
&lt;br /&gt;
A more general and detailed description of SkyFit2 is given at the &#039;&#039;&#039;[[SkyFit2|SkyFit2]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
=== What should I back up when re-flashing an SD card or a USB disk? ===&lt;br /&gt;
&lt;br /&gt;
: The .config, platepar and mask files that are in the RMS source directory, plus the whole contents of the hidden directory /home/pi/.ssh. &lt;br /&gt;
&lt;br /&gt;
If your SD card or a USB disk fails or becomes corrupted, the config files can be fetched from the server as they are uploaded every day together with the data. However the contents of .ssh are essential for connection to the server, so you must also save these. Once you set up a new SD card or a USB disk, return the files in their original location.&lt;br /&gt;
&lt;br /&gt;
=== What are the values in FTPdetectinfo_*  file designated as hnr mle bin Pix/fm Rho Phi? ===&lt;br /&gt;
&lt;br /&gt;
:  Some of these values are not used in RMS (hnr mle bin), but they are in CAMS, so they are here to conform to the standard. Thus they are all zeros. The others are:&lt;br /&gt;
&lt;br /&gt;
: - Pix/fm - Average angular speed of the meteor in pixels per frame.&lt;br /&gt;
&lt;br /&gt;
: - Rho, Phi - Parameters that define the line of the meteor in polar coordinates, see [https://en.wikipedia.org/wiki/Hough_transform#Theory here] for more details. Rho is the distance of the line from the centre of the image, and phi is the angle of the line as measured from the positive direction of the Y axis (basically a line going from the center of the image to the top of the image), the positive angles are measured clockwise (I think, the CAMS standard might define these parameters a bit differently, the Y axis is flipped).&lt;br /&gt;
&lt;br /&gt;
: The intensity is the sum of all pixel intensities of the meteor on a given frame. Let&#039;s say I represent an area around the meteor on a given frame like this, where the numbers are pixel intensities on an 8-bit image (so they can range from 0 to 255):&lt;br /&gt;
&lt;br /&gt;
: [[File:Intensity_sum.png |Intensity_sum.png ]]&lt;br /&gt;
&lt;br /&gt;
: and the pixels values inside the red boundary represent the meteor blob on the frame, the intensity would be the sum of all numbers inside the red boundary.&lt;br /&gt;
: This value is later used to compute the magnitude. The magnitude is computed as: mag = -2.5*log10(intensity sum) + photometric_offset. The photometric offset is estimated in SkyFit by fitting the line with slope -2.5 through pairs of known magnitudes of stars and logartihms of their pixel intensity sum. The photometric offset is basically the intercept of that line. The constant slope of -2.5 comes from the [https://en.wikipedia.org/wiki/Apparent_magnitude#Calculations definition of stellar magnitudes.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GMN data policy ==&lt;br /&gt;
&lt;br /&gt;
The Global Meteor Network produces several levles of data products:&lt;br /&gt;
* Level 1 - The lowest level data (i.e. as close to &amp;quot;raw&amp;quot; as possible) are the FF image and FR video files saved to the RPi by the capture code and the fireball detector.&lt;br /&gt;
* Level 2 - The meteor detector uses these data to extract positional and brightness information of individual meteors (FTPdetectinfo file), and images are also used for astrometric and photometric calibration (platepar file).  Meteor and star detections are used to generate a range of plots suchs as the single-station shower association graph, camera drift graph, etc. The calibrated meteors measurements get uploaded to the GMN server together with the raw images of individual meteors.&lt;br /&gt;
* Level 3 - The software on the server correlates individual observations and computes multi-station meteor trajectories which are published daily on the GMN [https://globalmeteornetwork.org/data/ data website]. This data is made public under the [https://creativecommons.org/licenses/by/4.0/ CC BY 4.0 license].&lt;br /&gt;
&lt;br /&gt;
Operators of individual GMN stations exclusivery own the Level 1 and Level 2 data their stations produce. In practice, this means that they are free to share this data with other meteor networks if they wish to do so. The data that gets uploaded to the GMN server will not be shared publicly nor with other parties without the operator&#039;s consent, but may be used internally by the GMN coordinators to manually produce other data products (e.g. trajectory of a meteorite dropping fireball, analysis of a meteor shower). All station operators will be credited for their data in all GMN publications.&lt;br /&gt;
&lt;br /&gt;
== IstraStream ==&lt;br /&gt;
&lt;br /&gt;
=== [http://istrastream.com/rms-gmn/ IstraStream GMN status website] ===&lt;br /&gt;
&lt;br /&gt;
: The IstraStream.com is an independent hosting site which is part of our world wide GMN. It is primarily a host for data from cameras sold by IstraStream, but other station operators can request that their data be included.&lt;br /&gt;
To enable the IstraStream upload, the &amp;lt;b&amp;gt;external_script_run&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;external_script_path&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;reboot_after_processing&amp;lt;/b&amp;gt; parameters have to be changed. This is how the config file should look:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; External script&lt;br /&gt;
; An external script will be run after RMS finishes the processing for the night, it will be passed three arguments:&lt;br /&gt;
; captured_night_dir, archived_night_dir, config - captured_night dir is the full path to the captured folder of the night&lt;br /&gt;
; the second one is the archived, and config is an object holding the values in this config file.&lt;br /&gt;
; ---------------&lt;br /&gt;
; Enable running an external script at the end of every night of processing&lt;br /&gt;
external_script_run: true&lt;br /&gt;
; Run the external script after auto reprocess. &amp;quot;auto_reprocess&amp;quot; needs to be turned on for this to work.&lt;br /&gt;
auto_reprocess_external_script_run: false&lt;br /&gt;
; Full path to the external script&lt;br /&gt;
external_script_path: /home/pi/source/RMS/iStream/iStream.py&lt;br /&gt;
; Name of the function in the external script which will be called&lt;br /&gt;
external_function_name: rmsExternal&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Daily reboot&lt;br /&gt;
; ---------------&lt;br /&gt;
; Reboot the computer daily after the processing and upload is done&lt;br /&gt;
reboot_after_processing: false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, send an e-mail to [mailto:info@istrastream.com info@istrastream.com] with your:&lt;br /&gt;
* Station_ID&lt;br /&gt;
* Location or Name (if not secret)&lt;br /&gt;
* Lens type/size&lt;br /&gt;
&lt;br /&gt;
For example, &amp;quot;CA0001; Elginfield Observatory, Ontario, Canada; 4mm&amp;quot;. The IstraStream crew will enable the weblog page within a few days.&lt;br /&gt;
&lt;br /&gt;
Finally, this document explains what every plot on the IstraStream weblog means:&lt;br /&gt;
&lt;br /&gt;
=== [https://docs.google.com/document/d/132aHGn0QPzhpVN2s2n6FT6rJn39LAsPkchWJqXQb8Qk/edit?usp=sharing IstraStream Plots Explanation] ===&lt;br /&gt;
&lt;br /&gt;
== For More Information ==&lt;br /&gt;
&lt;br /&gt;
=== [https://globalmeteornetwork.org/?page_id=43 Contact the Global Meteor Network] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://groups.io/g/globalmeteornetwork Join the Global Meteor Network Forum] ===&lt;br /&gt;
&lt;br /&gt;
=== [https://github.com/markmac99/ukmon-pitools/wiki UK Meteor Network Wiki]===&lt;br /&gt;
This wiki has numerous FAQs and tips on maintaining, monitoring and managing your system, and several explainers such as how to calibrate and create a mask, how to copy data and so forth. &lt;br /&gt;
&lt;br /&gt;
=== GMN talks ===&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=wDdrG_FCyGk 2022 Global Meteor Network Meeting Session 1 (February, 2022)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=j_75CDPzjI4 2022 Global Meteor Network Meeting Session 2 (February, 2022)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=f6x9_WCVphY GMN talk at the European Space Agency&#039;s Fireball Workshop (June, 2021)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=QXBTLPnPDWs GMN Workshop (February, 2021)] - [https://www.dropbox.com/sh/ia9vagug5lxm8k9/AAB_i_1jcWThUdAHO_2gF_Ksa?dl=0 Link to slides]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=MAGq-XqD5Po Overview of the GMN - IMC2020 (September, 2020)]&lt;br /&gt;
&lt;br /&gt;
: [https://www.youtube.com/watch?v=oM7lfQ4nmyw Overview of the GMN, Astro Imaging Channel presentation (May, 2020)]&lt;br /&gt;
&lt;br /&gt;
=== GMN related publications ===&lt;br /&gt;
&lt;br /&gt;
: [https://academic.oup.com/mnras/advance-article/doi/10.1093/mnras/stab2557/6368869 Moorhead, A. V., Clements, T., &amp;amp; Vida, D. (2021). Meteor shower radiant dispersions in Global Meteor Network data. Monthly Notices of the Royal Astronomical Society.]&lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/abs/2107.12335 Vida, D., Šegon, D., Gural, P. S., Brown, P. G., McIntyre, M. J., Dijkema, T. J., Pavletić, L., Kukić, P., Mazur, M.J., Eschman, P., Roggemans, P., Merlak, A., &amp;amp; Zubović, D. (2021). The Global Meteor Network–Methodology and first results. Monthly Notices of the Royal Astronomical Society, 506(4), 5046-5074.]&lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/abs/2003.05458/ Moorhead, A. V., Clements, T. D., &amp;amp; Vida, D. (2020). Realistic gravitational focusing of meteoroid streams. Monthly Notices of the Royal Astronomical Society, 494(2), 2982-2994.] &lt;br /&gt;
&lt;br /&gt;
: [https://globalmeteornetwork.org/wordpress/wp-content/uploads/2018/11/Kukic-et-al-2018-Rolling-shutter.pdf  Kukić, P., Gural, P., Vida, D., Šegon, D. &amp;amp; Merlak, A. (2018) Correction for meteor centroids observed using rolling shutter cameras. WGN, Journal of the International Meteor Organization, 46:5, 154-118.]&lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_sun_skirter_final.pdf  Vida, D., Mazur, M. J., Šegon, D., Kukić, P., &amp;amp; Merlak, A. (2018). Compressive strength of a skirting Daytime Arietid-first science results from low-cost Raspberry Pi-based meteor stations. WGN, Journal of the International Meteor Organization, 46, 113-118.] &lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/pdf/1911.02979.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - I. Theory. arXiv:1911.02979v4 [astro-ph.EP] 21 Apr 2020]&lt;br /&gt;
&lt;br /&gt;
: [https://arxiv.org/pdf/1911.11734.pdf Vida, D., Gural, P., Brown, P., Campbell-Brown, M., Wiegert, P. (2019) Estimating trajectories of meteors: an observational Monte Carlo approach - II. Results. arXiv:1911.11734v1 [astro-ph.EP] 26 Novr 2019]&lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/2018_WGN___RMS_first_results-final.pdf Vida, D., Mazur, M. J., Šegon, D., Zubović, D., Kukić, P., Parag, F., &amp;amp; Macan, A. (2018). First results of a Raspberry Pi based meteor camera system. WGN, Journal of the International Meteor Organization, 46, 71-78.] &lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Vida_IMC2016_proceedings_final.pdf Vida, D., Zubović, D., Šegon, D., Gural, P., &amp;amp; Cupec, R. (2016). Open-source meteor detection software for low-cost single-board computers. In Proceedings of the International Meteor Conference (IMC2016), Egmond, The Netherlands (pp. 2-5).] &lt;br /&gt;
&lt;br /&gt;
: [https://gmn.duckdns.org/wordpress/wp-content/uploads/2018/11/Zubovic_IMC2015_priceedings_final.pdf Zubović, D., Vida, D., Gural, P., &amp;amp; Šegon, D. (2015). Advances in the development of a low-cost video meteor station. In Proceedings of the International Meteor Conference, Mistelbach, Austria (pp. 27-30).]&lt;/div&gt;</summary>
		<author><name>Lancer</name></author>
	</entry>
</feed>