Meteor MN2 decoder for rpi 3B+

OK. So I am getting images and a waterfall in SatNOGS. Any ideas why my .s files are stuck in “/datadrive/meteor/complete/” and not transferring as audio.
Watching the journal I have no errors and I have checked and re-checked all edits to the .py files.
Thanks in advance.

Michael

There are no audio files when using this altered flowgraph to decode the images. The waterfall should always be generated, depending on the signal quality the decoding of images might fail. The *.s files are only used by the decoder and are not uploaded. I delete them after decoding on my station.

Thanks Wose.
I will create a prebob.sh script to delete the .s files and create an entry in freqset.txt that I can monitor.
Thanks for all your patience and assistance!

Is this decoding method running with the new Meteor 2-2 ?

Nope. Refer to this thread: OQPSK for Meteor MN2-2 LRPT

Still ongoing, and we don’t even know what mode Meteor M2-2 will settle on it. Currently it’s on the 80ksps LRPT mode, but it was on 72ksps LRPT a few days ago.

Just a heads up that Meteor MN-2 has is now transmitting LRPT on 137.100MHz. Previously it was transmitting LRPT on 137.900MHz. It is unknown if and when it will change frequencies.

Hi to all folks, hope you are all doing well,

I have been following this thread for 2 weeks to add meteor decoding to my satnogs station. I troubleshooted some issues I had (mostly related to permissions) but now I am struggled because process_meteor.py is not working as expected and I really don´t know why:

If I run journalctl -f -u satnogs-client.service during an observation, I get this:

Aug 10 15:44:52 ElNido satnogs-client[576]: Waiting for 120 seconds before processing.
Aug 10 15:44:52 ElNido satnogs-client[576]: Attempting to process: /datadrive/meteor/data_908614_2019-08-10T18-31-54.s
Aug 10 15:44:52 ElNido satnogs-client[576]: Traceback (most recent call last):
Aug 10 15:44:52 ElNido satnogs-client[576]:   File "/datadrive/process_meteor.py", line 109, in <module>
Aug 10 15:44:52 ElNido satnogs-client[576]:     run_medet(_file, MEDET_ARGS_COMPOSITE, "_vis")
Aug 10 15:44:52 ElNido satnogs-client[576]:   File "/datadrive/process_meteor.py", line 90, in run_medet
Aug 10 15:44:52 ElNido satnogs-client[576]:     ret_code = subprocess.call(_medet_command)
Aug 10 15:44:52 ElNido satnogs-client[576]:   File "/usr/lib/python2.7/subprocess.py", line 168, in call
Aug 10 15:44:52 ElNido satnogs-client[576]:     return Popen(*popenargs, **kwargs).wait()
Aug 10 15:44:52 ElNido satnogs-client[576]:   File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
Aug 10 15:44:52 ElNido satnogs-client[576]:     errread, errwrite)
Aug 10 15:44:52 ElNido satnogs-client[576]:   File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
Aug 10 15:44:52 ElNido satnogs-client[576]:     raise child_exception
Aug 10 15:44:52 ElNido satnogs-client[576]: OSError: [Errno 2] No such file or directory

The same error happens if I manually run the process_meteor.py script:

root@ElNido:/datadrive# su pi -c /datadrive/process_meteor.py
Waiting for 120 seconds before processing.
    Attempting to process: /datadrive/meteor/data_908614_2019-08-10T18-31-54.s
    Traceback (most recent call last):
      File "/datadrive/process_meteor.py", line 109, in <module>
        run_medet(_file, MEDET_ARGS_COMPOSITE, "_vis")
      File "/datadrive/process_meteor.py", line 90, in run_medet
        ret_code = subprocess.call(_medet_command)
      File "/usr/lib/python2.7/subprocess.py", line 168, in call
        return Popen(*popenargs, **kwargs).wait()
      File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
        errread, errwrite)
      File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
        raise child_exception
    OSError: [Errno 2] No such file or directory

Also If I check, data_.s files are being generated:

root@ElNido:/datadrive/meteor# ls -lrth
total 333M
drwxrwxrwx 2 satnogs satnogs 4.0K Aug  5 19:22 complete
-rwxrwxrwx 1 satnogs satnogs  90M Aug  7 20:34 data_894969_2019-08-06T00-33-36.s
-rwxrwxrwx 1 satnogs satnogs 8.3M Aug  7 21:04 data_899413_2019-08-07T23-54-12.s
-rwxrwxrwx 1 satnogs satnogs  71M Aug  7 22:43 data_899590_2019-08-08T01-34-51.s
-rwxrwxrwx 1 satnogs satnogs  72M Aug  8 20:43 data_905134_2019-08-08T23-34-54.s
-rwxrwxrwx 1 satnogs satnogs 8.8M Aug  9 22:04 data_907258_2019-08-10T00-54-20.s
-rwxrwxrwx 1 satnogs satnogs  83M Aug 10 15:41 data_908614_2019-08-10T18-31-54.s

My postob scrips is:

#!/usr/bin/env bash

meteorfile="/datadrive/data_*.s"
 
if [ -f $meteorfile ]
then
	sleep 30
	# sudo -n -u satnogs chmod 777 /datadrive/data_*.s
	mv /datadrive/data_*.s /datadrive/meteor/
	# sudo -n -u satnogs 
	chmod 777 /datadrive/meteor/*
	echo `date +%F" "%T`" Meteor file exists" >> /home/pi/freqset.txt
	/usr/bin/python /datadrive/process_meteor.py &
	echo "postob script executed succesfully"
else
	echo "An error has occurred, but the postob.sh script is working :)"
fi

So, does anybody knows what may be going on? or does anybody see something similar?
I am also uploading the journalctl complete output form the last 2 test that are showing this error. I really appreciate your help on this.

20190808_journalctl_meteor.txt (19.2 KB)
20190810_journalctl_meteor.txt (14.3 KB)

Given the traceback I’d check if medet_arm is in the correct path and can has the permissions to be executed.

Thanks Ben,
Just in case I had chmod 777 meted_arm and tried again now but the same happened again. I have no clue about what is failing (as I am not a programmer), the only “bad” message I see is OSError: [Errno 2] No such file or directory but I believe it is a consequence from the other previous messages that I really don’t fully understand. Does anyone has an idea? These are the logs:

Aug 16 21:28:41 ElNido satnogs-client[585]: Waiting for 120 seconds before processing.
Aug 16 21:28:41 ElNido satnogs-client[585]: Attempting to process: /datadrive/meteor/data_926516_2019-08-16T00-35-01.s
Aug 16 21:28:41 ElNido satnogs-client[585]: Traceback (most recent call last):
Aug 16 21:28:41 ElNido satnogs-client[585]:   File "/datadrive/process_meteor.py", line 109, in <module>
Aug 16 21:28:41 ElNido satnogs-client[585]:     run_medet(_file, MEDET_ARGS_COMPOSITE, "_vis")
Aug 16 21:28:41 ElNido satnogs-client[585]:   File "/datadrive/process_meteor.py", line 90, in run_medet
Aug 16 21:28:41 ElNido satnogs-client[585]:     ret_code = subprocess.call(_medet_command)
Aug 16 21:28:41 ElNido satnogs-client[585]:   File "/usr/lib/python2.7/subprocess.py", line 168, in call
Aug 16 21:28:41 ElNido satnogs-client[585]:     return Popen(*popenargs, **kwargs).wait()
Aug 16 21:28:41 ElNido satnogs-client[585]:   File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
Aug 16 21:28:41 ElNido satnogs-client[585]:     errread, errwrite)
Aug 16 21:28:41 ElNido satnogs-client[585]:   File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
Aug 16 21:28:41 ElNido satnogs-client[585]:     raise child_exception
Aug 16 21:28:41 ElNido satnogs-client[585]: OSError: [Errno 2] No such file or directory

Hi Folks,

I keep fighting with this but I have not reach a happy ending so far…
Some doubts I need to clear in order to keep trying:

  1. I am using a Raspbi 3 B running the Raspbian who comes with satnogs-client installed (version 0.9). In the Orbides web page (http://orbides.org/page.php?id=1023) there are 3 possible binaries to do the medet decoding:

Linux 64 bit: medet_190825_lin64.tar.gz —> medet_arm binary
Linux ARM: medet_190825_arm.tar.gz —> medet binary
Linux MIPS: medet_190825_mips.tar.gz —> medet_mips binary

I am trying with all of them but getting different errors. I want to focus on the right one, so can someone who get this working tell me which one should I use, please.

  1. Which python versión is confirmed to be working with this. My station uses Python 2.7 but it is not working so I wanted to verify this.

Thanks in advanced.

A few things I have noticed with the new medet_arm:

  • It appears to require write permissions on the soft-bit files. I’m not sure if this has always been the case, but it was the result of some interesting errors during some debugging.
  • To decode Meteor M2-2, medet_arm needs the -diff option added to the command line. This is a bit of a problem, as it means the process_meteor.py script needs to know what satellite is being observed. Unfortunately, this is not something that can be passed through (according to what I’m seeing in satnogs-client here: https://gitlab.com/librespacefoundation/satnogs/satnogs-client/blob/master/satnogsclient/observer/observer.py#L225 ). There is an option to pass through the entirety of the TLE, from which we can extract the satellite number, but it’s going to be a bit of a pain.

So for now, the meteor decoder script is not going to work correctly with the new Meteor sat. I’m not sure when/if I’ll have the time to modify the scripts to deal with this.

Hi all,
I have started a (very quick and exceedingly dirty) implementation of the mode switch needed to operate with both M2 and M2-2.
Three changes:

It seems that this procedure did call in the correct manner although it looks like the SNR was not high enough for my modest station (I am unable to decode the *.s files for M2-2 manually so there may be an issue for me down the chain somewhere).

@vk5qi do we need to use the “-int” option as well?

Process:
 -int       Deinterleave (for 80k signal, i.e. Meteor M2-2, default - 72k)
 -diff      Diff coding (for Meteor M2-2)

If someone would like to test this please see the links above, otherwise I’ll wait for a better pass and see how it goes! Please let me know if it does work and if it does I’ll document and make it all look nice! :slight_smile:

If anyone sees an issue please let me know!

Thanks

M0ZJO

I don’t know if they have settled on 72k or 80k for Meteor M2-2. That will determine what options are needed.

Once you’ve tested it, could you submit a pull request please?

Yep - once I am happy it works, I’ll submit a pull request.

Thanks

M0ZJO

Hmmm so it seems that the script modifications I made are working but it looks as if the *.s files that I am getting for M2-2 are garbage whereas the *.s files for M2 are working fine.

Do we also need to make a change to the GRC flowgraph for the *.s files to be demodulated correctly (as it looks as if M2-2 and M2 run at different symbol rates?).

Thanks
M0ZJO

(Sorry for the spam)…
We also need to ensure that the GRC file is decoding the data stream as OQPSK rather than QPSK… Looks like we may also need to modify the call to the GRC flowgraph for the different satellites.

It is noted that this station here seems to be getting amazing results for both M2 and M2-2:
M2:
https://network.satnogs.org/observations/1028387/
M2-2:
https://network.satnogs.org/observations/1025475/

I have started a separate thread here asking about his station:

My understanding is that the settings for the METEOR satellites is currently as below(please correct me if I am wrong, I can’t find any reliable citations on how these spacecraft are being operated. If someone knows a good source please let me know!):
M2
72kbps QPSK @ 137.100
M2-2
80kbps OQPSK @ 137.900

A good source for the settings of Meteor is http://happysat.nl/Meteor/html/Meteor_Status.html and http://www.radioscanner.ru/forum/topic47659-141.html.
I try to keep a list of the changes at https://github.com/benelsen/weather_satellites/blob/master/events/Meteor-M%20N2-2%20Events.csv and if I missed one please let me know or create a PR.

My setup is barely working r/n, there is some weird interference present from time to time, but the processing works (most of the time).

What I do is very hack-y and while I’m willing to give as much detail as people want, I’m not advocating for people to setup a station like this :rofl:

First off I modified the satnogs-client to let me pass the observation and satellite id via the post observation script. With hindsight your approach with passing the TLE and just getting the id from there is a lot better.

I then modified the file generated with the GRC to dump the I/Q data no matter what the global setting in satnogs is. I also modifed the paths the .s and .dat files are written to.
I write them to /data/satnogs/tmp/which is on a USB mounted ssd so that the SD card doesn’t die after a few weeks.

My post observation scipt then calls my rewritten process_meteor.py (with nice and ionice as not to affect other observations too much).
process_meteor.py looks for the iq.dat and .s and processed them based on the satellite id.

  • Meteor-M N2 (40069):
    decodes that data directly from the .s with meteor_decode (or medet; I used meteor_decode as it created png’s directly)

  • Meteor-M N2-2 (44387):
    demodulates the iq.dat anew with meteor_demod (which does OQPSK), then decodes the data with medet and converts them to pngs. (the parameters for the demodulator still need some tweaking to get a reliable lock)

Again, do not use these files directly, they were hacked together and won’t work as is on any other setup, but I hope someone can take them and create a setup that works more generally!

Thanks for your reply!

My setup is barely working r/n, there is some weird interference present from time to time, but the processing works (most of the time).

If it works it works!!! :stuck_out_tongue:

Lots to think about, thanks!

Do we know if Meteor M2-2 has settled on a particular configuration yet? Or is it likely to change modes again?

A manual process more or less worked for me with Meteor M2-2
git pull update meteor_demod and meteor_decode

$ rtl_fm -M raw -f 137.9M -s 288k -g 28 -p 1 m2_iq.raw
$ sox -t raw -r 288k -c 2 -b 16 -e s m2_iq.raw -t wav meteor_a.wav rate 144k
$ sox meteor_a.wav meteor.wav gain -n

visit above link http://happysat.nl/Meteor/html/Meteor_Status.html for 72 or 80k symbols, currently 72000. -f -b can be tweaked for best results

$ ~/src/meteor_demod/src/meteor_demod -f 64 -b 100 -s 144000 -r 72000 -m oqpsk -o meteor.oqpsk meteor.wav
$ ~/src/meteor/meteor_decoder/medet  meteor.oqpsk meteor -cd  -diff
Reading meteor.oqpsk...
Dediffing...
 pos=94431039 ( 99.98%) ( 4,13962,49) sig= -219 rs=(-1,-1,-1,-1) EF89C21A 
Total:        92.889374
Processing:   2.498837
Correlation:  33.918762
Viterbi:      50.282986
ECC:          4.905700
Remainder:    1.283093
Packets:      2051 / 4611
Elapsed time: 00:04:59.168
$ ~/src/meteor/meteor_decoder/medet meteor.dec meteor_122 -r 65 -g 65 -b 64 -d

enjoy (after convert -rotate 180) http://swigerco.com/meteor_122r.bmp

1 Like