Raspberry Pi Zero 2W

Yesterday the new Raspberry Pi Zero 2W was announced (New product: Raspberry Pi Zero 2 W on sale now at $15 - Raspberry Pi).
It has specs almost equal to the original Pi3, so i thought it is worth checking to see if it is able to run SatNOGS. It seems yes !

Fortunately I managed to order one (limited to 1 per order for now) yesterday and received it today.

Flashed the current release of SatNOGS raspberry image, booted it, quickly configured it and connected an rtl-sdr that was lying around, no antenna yet and scheduled an obs.
Everything went smooth and it ended up uploading a waterfall to the network !

During the acquisition (2.048MSPS, FM demodulator) CPU load was always around 90-110%. That is the CPU load of a single core, but the new Zero is a quad-core (original Zero is single-core).
After the acquisition the satnogs-client continued to run at ~100% for a little time, probably to process the waterfall, before the load dropped.
It seems the new Zero 2W is perfectly capable of running a SatNOGS station ! Some more testing will be done on other demods to check the load.

One potential downside is its unique USB port. So it will need WiFi for network connection, unless an USB switch is used to have an Ethernet dongle in addition to the SDR. But for portable use that won’t be a huge issue if you can use your phone as a hotspot.

But initial testing looks very promising ! A SatNOGS station as a keyring !

9 Likes

Thanks for the initial report @hb9fxx !
Link to your station?

1 Like

I repurposed my ‘station in a docker on my laptop’ station for this: SatNOGS Network - Ground Station HB9FXX Experimental
Currently unplugged… will plug it again in tonight at home.

1 Like

Pi Zero 2W is now running with a little antenna on SatNOGS Network - Ground Station HB9FXX - Experimental - Raspberry Pi Zero 2W

Just had a little VHF/UHF vertical (Diamond MR-77) around that is on it now, so don’t expect much birds to be caught. Also as LNA it is a Nooelec Sawbird+ NOAA so frequency range is limited to ~137MHz.

After quite a few obs i see one problem. There are regularly obs where audio data is there but the waterfall is missing. Sometimes both are missing.
To be investigated. Could also be just networking issues as the wifi might not be that good. I’ll check the logs some more.

But most of the time it works well. Should give it a better antenna for more tests.

3 Likes

I also have a pi zero 2w running on station 704. It’s been up for a couple weeks now and it seems to be doing pretty well. It was a drop-in replacement for the 3b+ I had on there and worked immediately after I put the sd card from the 3b+ into it (!).

And after about 1 in 10 reboots, I get wavy lines in the waterfalls. Haven’t had a chance to chase that down fully, but another reboot clears it out.

A couple days ago, I set up swap space on the machine to match the RAM in the 3b+ in case that’s what was throwing it off. Not sure if that was the problem or not, yet. Suspected OS was killing one of the satnogs client processes during very long decodes.

I’m pretty optimistic about the zero 2w. Thanks for your early report, @hb9fxx . That’s what encouraged me to try!

2 Likes

Mine is still up fine but still on a ‘terrestrial’ antenna, so not likely to catch something spacey.

Major issue is it seems to suffer of artifact upload issues. Have to investigate if it is a Pi2W limitation or just because of poor wifi connection. I put it indoor where is should have good enough wifi, but maybe not enough. Or the onboard wifi antenna is really bad. Still need some more investigation.

Has anyone yet managed to setup the PiZero 2W for their SatNOGS station?
I have got so far with this using Buster but failed over the last (maybe) hurdle!
The output from running the status request gives:
$ systemctl status satnogs-client
● satnogs-client.service - SatNOGS client
Loaded: loaded (/etc/systemd/system/satnogs-client.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-12-10 09:54:42 GMT; 1h 50min ago
Main PID: 316 (satnogs-client)
Tasks: 22 (limit: 871)
CGroup: /system.slice/satnogs-client.service
└─316 /var/lib/satnogs/bin/python3 /var/lib/satnogs/bin/satnogs-client

Dec 10 11:14:32 pizero satnogs-client[316]: observer.observe()
Dec 10 11:14:32 pizero satnogs-client[316]: File “/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/observer/observer.py”, line 209, in observe
Dec 10 11:14:32 pizero satnogs-client[316]: waterfall = Waterfall(self.observation_waterfall_file)
Dec 10 11:14:32 pizero satnogs-client[316]: File “/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/waterfall.py”, line 105, in init
Dec 10 11:14:32 pizero satnogs-client[316]: self.data = _get_waterfall(datafile_path)
Dec 10 11:14:32 pizero satnogs-client[316]: File “/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/waterfall.py”, line 80, in _get_waterfall
Dec 10 11:14:32 pizero satnogs-client[316]: waterfall = _read_waterfall(datafile_path)
Dec 10 11:14:32 pizero satnogs-client[316]: File “/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/waterfall.py”, line 36, in _read_waterfall
Dec 10 11:14:32 pizero satnogs-client[316]: ‘timestamp’: np.fromfile(datafile, dtype=’|S32’, count=1)[0],
Dec 10 11:14:32 pizero satnogs-client[316]: IndexError: index 0 is out of bounds for axis 0 with size 0
My RPi’s 3 and 4 are running perfectly. So could it be a peculiarity to PiZero having the quad-core 64-bit ARM Cortex-A53 processor and/or a shortage of RAM?
Are there any suggestions as to what is causing this and, hopefully, a possible fix?
Will Bullseye be the fix?

My success came from yanking the SD card out of my rpi 3b+ and putting it into the rpi zero 2. Maybe you’ll have luck duplicating one of the cards you have running successfully from another rpi, putting it into the rpi zero 2 and starting from there with a reconfigure. Just a suggestion. Station 704 is still doing pretty well with the rpi zero 2.

I started out using a Pi4, and have had reasonably good results. I have switched over to a Pi Zero 2W, and things seem to be about the same. I still wonder if anyone has been able to see, over time, whether the 3B or 4 provide better decoding or SNR with the SDR than the Zero 2W? I don’t know what the normal CPU demands of Satnog are on the Pi, so hoping for some guidance.

Thanks.

Today I tried to convert my satnogs station from a pi4 to a pi0 2W, and the result was not good:

Jan 15 12:02:27 satnogs satnogs-client[790]: gr-satellites: Observation: 10932365, Norad: 26931, Name: PCSAT_NO-44, Script: satnogs_afsk1200_ax25.py
Jan 15 12:02:27 satnogs satnogs-client[790]: gr-satellites: Starting observation 10932365
Jan 15 12:02:28 satnogs satnogs-client[354]: satnogsclient.scheduler.tasks - INFO - Trying to GET observation jobs from the network
Jan 15 12:02:33 satnogs satnogs-client[790]: gr-satellites: running at 48000 sps
Jan 15 12:02:33 satnogs satnogs-client[354]: satnogsclient.observer.observer - INFO - Start rotctrl thread.
Jan 15 12:02:33 satnogs satnogs-client[354]: satnogsclient.observer.worker - INFO - Tracking initiated
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_init called
Jan 15 12:02:33 satnogs satnogs-client[354]: initrots4_dummy: _init called
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_register (1)
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_register (2)
Jan 15 12:02:33 satnogs satnogs-client[354]: dummy_rot_init called
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_open called
Jan 15 12:02:33 satnogs satnogs-client[354]: dummy_rot_open called
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_get_position called
Jan 15 12:02:33 satnogs satnogs-client[354]: dummy_rot_get_position called
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_get_position: got az=0.00, el=0.00
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_set_position called az=327.96 el=12.55
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_set_position: south_zero=0
Jan 15 12:02:33 satnogs satnogs-client[354]: rot_set_position: range problem az=327.96(min=-180.00,max=180.00), el=12.549073(min=0.00,max=90.000000)
Jan 15 12:02:33 satnogs satnogs-client[354]: satnogsclient.observer.observer - INFO - Start rigctrl thread.
Jan 15 12:02:33 satnogs satnogs-client[354]: satnogsclient.observer.worker - INFO - Tracking initiated
Jan 15 12:02:33 satnogs satnogs-client[354]: rig_init: rig does not have rx_range!!
Jan 15 12:02:33 satnogs satnogs-client[354]: network_open: hoststr=127.0.0.1, portstr=4532
Jan 15 12:02:34 satnogs satnogs-client[354]: satnogsclient.observer.observer - INFO - Start gnuradio thread.
Jan 15 12:02:38 satnogs satnogs-client[829]: Found Rafael Micro R820T tuner
Jan 15 12:02:38 satnogs satnogs-client[829]: [INFO] Opening Generic RTL2832U :: 77771111153705700...
Jan 15 12:02:38 satnogs satnogs-client[829]: Found Rafael Micro R820T tuner
Jan 15 12:02:39 satnogs satnogs-client[829]: [R82XX] PLL not locked!
Jan 15 12:02:39 satnogs satnogs-client[829]: [INFO] Using format CF32.
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::buffer::allocate_buffer: failed to allocate buffer of size 748 KB
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::vmcircbuf_sysv_shm: shmat (3): Invalid argument
Jan 15 12:02:39 satnogs satnogs-client[829]: gr::buffer::allocate_buffer: failed to allocate buffer of size 748 KB
Jan 15 12:02:39 satnogs satnogs-client[829]: Traceback (most recent call last):
Jan 15 12:02:39 satnogs satnogs-client[829]:   File "/usr/bin/satnogs_afsk1200_ax25.py", line 581, in <module>
Jan 15 12:02:39 satnogs satnogs-client[829]:     main()
Jan 15 12:02:39 satnogs satnogs-client[829]:   File "/usr/bin/satnogs_afsk1200_ax25.py", line 575, in main
Jan 15 12:02:39 satnogs satnogs-client[829]:     tb.start()
Jan 15 12:02:39 satnogs satnogs-client[829]:   File "/usr/lib/python3/dist-packages/gnuradio/gr/top_block.py", line 111, in start
Jan 15 12:02:39 satnogs satnogs-client[829]:     top_block_start_unlocked(self._impl, max_noutput_items)
Jan 15 12:02:39 satnogs satnogs-client[829]:   File "/usr/lib/python3/dist-packages/gnuradio/gr/runtime_swig.py", line 4832, in top_block_start_unlocked
Jan 15 12:02:39 satnogs satnogs-client[829]:     return _runtime_swig.top_block_start_unlocked(r, max_noutput_items)
Jan 15 12:02:39 satnogs satnogs-client[829]: RuntimeError: std::bad_alloc
Jan 15 12:02:42 satnogs satnogs-client[354]: satnogsclient.observer.observer - INFO - Tracking stopped.
Jan 15 12:02:42 satnogs satnogs-client[354]: netrigctl_close: done status=Command completed successfully
Jan 15 12:02:42 satnogs satnogs-client[354]: satnogsclient.observer.worker - INFO - Tracking stopped.
Jan 15 12:02:45 satnogs satnogs-client[354]: satnogsclient.observer.worker - INFO - Tracking stopped.
Jan 15 12:02:45 satnogs satnogs-client[354]: satnogsclient.observer.observer - INFO - Observation Finished
Jan 15 12:02:45 satnogs satnogs-client[354]: satnogsclient.observer.observer - INFO - Executing post-observation script.
Jan 15 12:02:45 satnogs satnogs-client[851]: gr-satellites: Observation: 10932365, Norad: 26931, Name: PCSAT_NO-44, Script: satnogs_afsk1200_ax25.py
Jan 15 12:02:45 satnogs satnogs-client[851]: gr-satellites: Stopping observation 10932365

I guess it doesn’t have enough RAM. I switched back to the Pi4.

yeah, I think 1GB is the minimum for running the current client.

If you enjoy messing around with Linux, and have time to spare, you could experiment with zswap and swap to maybe get it to run anyway.

It would be more of a learning journey than productive though.

I used to spend hours on this type of rabbit holes. Enjoyed it and learned a lot. But with kids, life has other priorities (and maybe rightfully so).

2 Likes