This receiver for SID (sudden ionospheric disturbance) monitoring consists of a Raspberry Pi (RPi) board running linux and my receiver software in python. The hardware section lists the minimal items needed for the system itself. In this setup, the RPi computer is not connected to a keyboard, mouse, or monitor. Another computer (the logging computer) is instead used to log into the RPi through X11 windows and your home wireless or wired network. One talks to the RPi through terminal screens. Graphical output from the programs running on the RPi can be displayed on the logging computer via X11. The logging computer does not need to be linux. It only needs to have an X11 server and an ssh client running on it. On windows these can be xming and putty, respectively.
The hardware section describes the hardware I am using, and the setup section gives the steps to set up linux and other software on the RPi. It has taken a lot of fiddling to get the RPi up and running, and I am hoping that being specific about hardware and software these instructions might shorten the path for those of you who like myself are not particularly linux savvy.
Later sections explain how to run sidmon in the background, and to run it as a service. The latter ensures that sidmon restarts when the RPi boots, which prevents missing blocks of time after power dropouts. Finally there is info on power consumption, noise from switching power supplies, running on a battery with or without a solar panel, and remote siting.
Minimal additional hardware is required for getting an RPi up and running over a wireless or wired network. This configuration does not use a mouse or keyboard, but is instead controlled via ssh on a linux or windows computer (use ssh on linux, or, e.g., putty on a windows computer).
touch /media/<username>/boot/ssh
ssh -XC pi@<ipaddress>The password is raspberry. From a windows computer with putty installed, use:
putty -XC pi@<ipaddress>The switches enable X11 port forwarding and compuression.
sudo echo <newcomputername> > /etc/hostname
sudo usermod -a -G sudo <username> sudo usermod -a -G dialout <username> sudo usermod -a -G audio <username>
ssh-copy-id <username>@<ipaddress>
sudo apt-get update sudo apt-get install -y software-properties-common sudo apt-add-repository -y universe sudo apt-get install -y git sudo apt-get install -y python3 python3-pip python3-dev python3-venv sudo apt-get install -y python3-numpy python3-matplotlib python3-scipy sudo apt-get install -y libasound2-dev sudo apt-get install -y alsa-utils sudp pip3 install pyalsaaudio sudo apt-get install -y pulseaudioThe last may not be necessary.
https://pypi.org/project/pyalsaaudio/#filesto a suitable directory, such as ~/Downloads, unpack, build, and install.
cd ~/Downloads tar -xf <tarfilename> cd <unpackeddirectory> python3 setup.py build sudo python3 setup.py installTest by loading in python.
$ python3 >>> import alsaaudio >>> exit()
arecord -LWith an Xonar U5, among many device entries it should show
... plughw:CARD=U5,DEV=0 ASUS XONAR U5, USB Audio Hardware device with all software conversions ...
alsamixer
$ tar -xf sidmon.tar.gzNote that python files having to do with plotting data were developed starting from the SuperSID distribution. They are modified significantly and are not interchangeable with the originals.
When run on a local area network (LAN) behind a modem, devices are ordinarily dynamically assigned IP addresses by the modem in the private domain, usually 192.168.1.x. A static (fixed) IP address on the LAN is a convenience in that it obviates the need to determine the RPi's IP address every time it obtains a new lease. Your modem can be configured to provide one through its configuration menus. To do this first determine your RPi's (or other sidmon host's) MAC address by entering on the sidmon host the command
ifconfig wlan0 # for wireless interface, or ifconfig eth0 # for ethernet interface, or ifconfig -a # for all interfacesOne of the interfaces will be the wireless or wired interface you are using. Note the MAC address of the form hh:hh:hh:hh:hh:hh associated with that interface, where 'h' refers to a hexadecimal character. Log into your modem and navigate to the page used to assign static DHCP addresses. On my ZyXEL DSL modem it is under Network Settings -> Static DHCP. Add a new entry and enter the MAC address you noted. Then choose a new static address in the DHCP address range configured for the modem and enter that address in its place on that configuration page. Make sure that that IP address does not conflict with a device currently on your network.
When running from a terminal, logging off or other disruption of the terminal session will kill sidmon. To avoid this problem, it is convenient to run sidmon in the backgound without connection to a terminal. Running without a terminal session is simple with nohup.
nohup src/sidmon.py <options> &When run this way the user can log off without stopping the program. The sidmon -lp switch should not be specified so that no live plot is generated. Make a note of the process ID so that the process can be stopped with the kill command later. Alternatively, the process ID can be learned later using the ps command. The process by the name python is likely the correct one.
ps -U pi PID TTY TIME CMD 428 ? 00:00:00 systemd 431 ? 00:00:00 (sd-pam) 1363 ? 1-10:36:32 python 4059 ? 00:00:00 sshd 4062 pts/0 00:00:01 bash 4169 pts/0 00:00:00 ps
Note in the earlier command that the path to the python interpreter might be different than shown on other machines.
vi /etc/init.d/sidmonand after Provides: in the file enter that name.
... Provides: sidmon ...
... dir="/home/<username>/<path>" cmd="src/sidmon.py -t 4.5" user="<username>" ...where <username> is the user name under which sidmon will be run, and <path> is the relative path to the sidmon root directory. There are also places to change the files to which stdout, stderr are redirected, and a file for the process ID. You might wish to enter locations for those files more convenient than the defaults in the template.
sudo chmod +x /etc/init.d/sidmon sudo chown root:root /etc/init.d/sidmon
sudo update-rc.d sidmon defaults sudo update-rc.d sidmon enable
alias sidmon='/etc/init.d/sidmon'There are four commands. Manually start the program as a service with
sidmon startcheck the status using
sidmon statusrestart the service (stop then restart) with
sidmon restartand stop the service with
sidmon stop
sudo shutdown now
lsb_release -a # or uname -a
curl <url> -o outputfile
sudo apt-get install geanyFast and works over X11.