Satnogs client can no longer open its flowcharts

I’ve finally brought my station back online, but so far every single observation it attempts fails instantly before even starting. Every time it is related to the specific flowchart for the satellite;

Aug 27 17:23:29 raspberrypi satnogs-client[2061]: Found Rafael Micro R820T tuner
Aug 27 17:23:30 raspberrypi satnogs-client[2061]: Exact sample rate is: 250000.000414 Hz
Aug 27 17:23:30 raspberrypi satnogs-client[2061]: [R82XX] PLL not locked!
Aug 27 17:23:30 raspberrypi satnogs-client[2061]: [INFO] Using format CF32.
Aug 27 17:23:30 raspberrypi satnogs-client[2061]: Traceback (most recent call last):
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:   File "/usr/bin/satnogs_noaa_apt_decoder.py", line 484, in <module>
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:     main()
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:   File "/usr/bin/satnogs_noaa_apt_decoder.py", line 467, in main
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:     tb = top_block_cls(antenna=options.antenna, bb_freq=options.bb_freq, bw=options.bw, dc_removal=options.dc_removal, decoded_data_file_path=options.decoded_dat
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:   File "/usr/bin/satnogs_noaa_apt_decoder.py", line 129, in __init__
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:     self.satnogs_doppler_compensation_0 = satnogs.doppler_compensation(samp_rate_rx, rx_freq, lo_offset, 4*4160*4, 1, 0)
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:   File "/usr/lib/python3/dist-packages/satnogs/doppler_compensation.py", line 117, in __init__
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:     firdes.WIN_HAMMING))
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:   File "/usr/lib/python3/dist-packages/gnuradio/filter/filter_swig.py", line 143, in low_pass
Aug 27 17:23:30 raspberrypi satnogs-client[2061]:     return _filter_swig.firdes_low_pass(*args, **kwargs)
Aug 27 17:23:30 raspberrypi satnogs-client[2061]: RuntimeError: firdes check failed: 0 < fa <= sampling_freq / 2
Aug 27 17:23:35 raspberrypi satnogs-client[2061]: apscheduler.executors.default - ERROR - Job "spawn_observer (trigger: date[2022-08-27 16:23:26 UTC], next run at: 2022-08-27 16:23:26 UTC)" raised an exception
Aug 27 17:23:35 raspberrypi satnogs-client[2061]: Traceback (most recent call last):
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:   File "/var/lib/satnogs/lib/python3.7/site-packages/apscheduler/executors/base.py", line 125, in run_job
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:     retval = job.func(*job.args, **job.kwargs)
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:   File "/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/scheduler/tasks.py", line 65, in spawn_observer
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:     observer.observe()
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:   File "/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/observer/observer.py", line 209, in observe
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:     waterfall = Waterfall(self.observation_waterfall_file)
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:   File "/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/waterfall.py", line 105, in __init__
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:     self.data = _get_waterfall(datafile_path)
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:   File "/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/waterfall.py", line 80, in _get_waterfall
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:     waterfall = _read_waterfall(datafile_path)
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:   File "/var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/waterfall.py", line 36, in _read_waterfall
Aug 27 17:23:35 raspberrypi satnogs-client[2061]:     'timestamp': np.fromfile(datafile, dtype='|S32', count=1)[0],
Aug 27 17:23:35 raspberrypi satnogs-client[2061]: IndexError: index 0 is out of bounds for axis 0 with size 0

Any ideas about what went wrong? The only thing I changed since the time it worked is commenting out the line in /etc/fstab in the hopes of moving the temp directory from RAM to SD card on the Pi.

Maybe try setting your sample rate to 2.048e6, but I’m really guessing, based on this line:

Aug 27 17:23:30 raspberrypi satnogs-client[2061]: RuntimeError: firdes check failed: 0 < fa <= sampling_freq / 2

Can you upload the config too?

1 Like

I just tried exactly that, and it seems to have worked. I don’t even remember reducing the rate to 250k
But now I am having another issue, I created a post-obs script and put it into /usr/bin, but I am getting an error saying permission denied. Unfortunately I didn’t save the log before rebooting the pi so I can’t show you the exact error for now, but this is the script;

#!/bin/bash

#
#
#

cd /tmp/.satnogs/data
recorded_file="$(ls -A ./*.out)"
echo "DBG : recorded_file = ${recorded_file}"

aptdec ${recorded_file}

cd -
echo "end"

I found this snippet on this forum regarding WXtoIMG, and I tried modifying it to use aptdec (which is installed on the pi so the command should work anywhere)

EDIT: it also seems like failing to run the script results in the entire observation failing
EDIT2: now I am waiting for another pass of a NOAA satellite without the post-obs script to rule out that the error isn’t caused by something else

If you are getting permission denied on a script it could be the execute bit isn’t set. Could be fixed something like:

sudo chmod +x /usr/bin/my_script.sh
1 Like

You’re right I can’t believe I forgot to do that. Now without the script it worked fine and uploaded a decoded APT image as well as waterfall and audio. Very soon I have another pass so I’ll try with the script set to executable.

If I understand correctly, everything inside the data folder gets uploaded, and aptdec by default creates an image with the same file name as its input audio file, so it should just take the whatever.out audio and create whatever.png

1 Like

Ok it is running the script now, it created a file called “receiving_satnogs_6392084_2022-08-27T18-37-00-r.png” but didn’t upload it. The default image uploaded so everything worked except that. It didn’t delete it from the temp folder either, basically it just ignored it

@dereksgc I haven’t tried uploading anything produced outside of the default satnogs flowgraphs (yet) but was there any mention of that PNG file in the in the log?

It’s also possible you might need to enable the upload of ‘artifacts’ and set your ‘artifact’ token (obtained from logging into DB) in satnogs-setup – this is in addition to your stations token – but I thought that was just for HDF5 data files.

1 Like

I figured it out, it just needs to follow the exact same file name format like the normal decoder.
Already got my first APT observation using aptdec (and probably satnogs’ first): SatNOGS Network - Observation 6392101

For now it just uploads both, the original png file as well as the other which just has the “_aptdec” suffix. It does take over 4 minutes to decode after the observation on the RPi Zero.

I’d also like to formally apologize for the amount of newbie questions I’ve been asking, so far whenever I tried fixing or adjusting one thing it messed up three others

3 Likes

Thanks for being a trailblazer, pushing the limits of what can be done with satnogs.

1 Like

You should step back from trying to move the temp folder onto the SD card! It will wear out very quick!

1 Like

I’m aware of that, it was discussed in my previous thread. Unfortunately for now its the only option to really have satnogs working on a pi zero, the RAM available is extremely low and I had issues with it running out of space and failing lots of obs before I did this change. I am hoping this will be a temporary solution until I can replace the Pi zero with something better, or maybe I could use an external USB flash drive, if that wears out it won’t be that bad

@dereksgc

If you have a solid LAN connection (you have a 2.4 GHz wifi grid antenna , right? :grinning:) is to use NFS to remote mount your satnogs data directory on another machine to limit the load on the pi zero SD card. That’s what I do for two of my clients, one of which is a RPi4:

  • NFS server – SFF desktop/buster ansible w/ 4 TB HDD, satnogs station #2134
  • NFS client #1 – RPi4 8GB satnogs @PE0SAT image station #1675
  • NFS client #2 – SFF desktop/buster ansible station #2051

I’m not recommending this setup but rather pointing it out that it works (surprisingly well – so far). Now if I can just get a fiber line run from the basement to my garage command and control center…

1 Like