Meteor MN2 decoder for rpi 3B+

I also only dump meteor iq-files, on a thumb drive in my case (which will probably break at some point). It is true that the demod/decode takes only 1 core, but the gnu radio scripts can use more than one core and may need all four of them, so may still be bothered if one core is already fully occupied. Ah well, it’s no problem if you leave some breathing room between observations. :slight_smile:

I figured out what the issue was (see below) and fixed my post observation script.

Bottom line, observations are only cleaned up from tmpfs after the post observation script finishes, so it is wise to make post-ob’s run short and fork/daemonize if you want to do any longer running processing. My post observation script now forks if it has to do meteor processing.

1 Like

Ok, no need to update your station for Meteor M2-2 any more, since the sat has broken down. :expressionless:

hey @Rico, I use a bias-t post observation script:

/home/pi/rtl_biast/build/src/rtl_biast -b 0

Is there any way I can add your process_meteor.py script to it along the existing script so I can use both?

Thanks!

Hi,

Yes sure, be sure that the arguments are passed to the python script then.

So as observation script you would set:
/path/to/your/script.sh --id {{ID}} --tle {{TLE}}

And to your script you would add the following line:
/path/to/process_meteor.py "$1" "$2" "$3" "$4"

This passes the first four arguments of your post ob script to the python script. Mind the quotes, they are necessary since the TLE contains spaces.

Let me know if you have any troubles.

Thanks for your response! Can I kindly ask you to clarify the about observation script part? Do I set the following as post-observation script:

/path/to/your/script.sh --id {{ID}} --tle {{TLE}}

Is that correct? In that case, where do I put the current bias-t section?

/home/pi/rtl_biast/build/src/rtl_biast -b 0

Thank you very much!

Your post observation script would be /path/to/your/script.sh and the contents would be

#!/bin/bash 

/home/pi/rtl_biast/build/src/rtl_biast -b 0
/path/to/process_meteor.py "$1" "$2" "$3" "$4"

The post-observation script setting should be as follows:
/path/to/your/script.sh --id {{ID}} --tle {{TLE}}

1 Like

Perfect, now I understand! I’ll follow up with the results.

Thank you!

1 Like

I guess knowing the TLE is less important now, given Meteor M2-2 is no longer transmitting LRPT…

An update, it didn’t work :slight_smile: For some reason, when I add the script as post observation (or meteor script alone) the station stops uploading data and no waterfalls are produced. I initially thought the script had to be executable but that didn’t help either.

Am I missing something here, what other steps should I do in order to get the script working? I promise I went through the whole thread but it’s a long thread with even outdated info in some places so I would really appreciate a nudge into right direction.

Thank you!

@ivor: There might be a few reasons why the script does not work in your setup. In my case, I changed the first line in process_meteor.py to get it to work:

#!/usr/bin/env python3

I hope it helps.

Mine is already commented out and the script seems to run if I run it manually. Thanks though!

You could try running journalctl -u satnogs-client after a failed observation to show the output of satnogs-client, that might provide some insight. If you paste it here we can have a look.

Thanks, I’ll give it a shot and update today or latest tomorrow.

1 Like

Hy guys!

Having trouble to get decoder working. APT images still working very well, but Meteor M2 not even showing up watterfall and audio anymore on observation page :frowning:
I folowed every step from post one , everything well, but stil not working , no matter what postob.sh script i used. The journalctl output looks like that:

Feb 28 19:56:54 raspberrypi satnogs-client[312]: Traceback (most recent call last):
Feb 28 19:56:54 raspberrypi satnogs-client[312]: File “/usr/lib/python2.7/dist-packages/apscheduler/executors/base.py”, line 125, in run_job
Feb 28 19:56:54 raspberrypi satnogs-client[312]: retval = job.func(*job.args, **job.kwargs)
Feb 28 19:56:54 raspberrypi satnogs-client[312]: File “/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/scheduler/tasks.py”, line 88, in spawn_observer
Feb 28 19:56:54 raspberrypi satnogs-client[312]: observer.observe()
Feb 28 19:56:54 raspberrypi satnogs-client[312]: File “/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/observer/observer.py”, line 144, in observe
Feb 28 19:56:54 raspberrypi satnogs-client[312]: self.observation_decoded_data)
Feb 28 19:56:54 raspberrypi satnogs-client[312]: File “/var/lib/satnogs/local/lib/python2.7/site-packages/satnogsclient/upsat/gnuradio_handler.py”, line 94, in exec_gnuradio
Feb 28 19:56:54 raspberrypi satnogs-client[312]: proc = subprocess.Popen(args, preexec_fn=os.setsid)
Feb 28 19:56:54 raspberrypi satnogs-client[312]: File “/usr/lib/python2.7/subprocess.py”, line 394, in init
Feb 28 19:56:54 raspberrypi satnogs-client[312]: errread, errwrite)
Feb 28 19:56:54 raspberrypi satnogs-client[312]: File “/usr/lib/python2.7/subprocess.py”, line 1047, in _execute_child
Feb 28 19:56:54 raspberrypi satnogs-client[312]: raise child_exception
Feb 28 19:56:54 raspberrypi satnogs-client[312]: OSError: [Errno 13] Permission denied

Got it somehow working. Now i have waterfall uploaded, but not the audio as in link https://network.satnogs.org/observations/1779712/. Also in the /tmp/ folder it exists a file waterfall and a file called data_1779712_2020-02-29T17-37-07.s , but not in the /datadrive/ folder. Running bash ./postob.sh returns the following error “./postob.sh: line 3: [: /datadrive/data_1779712_2020-02-29T17-37-07.s: binary operator expected”
Any ideea?

Hi Rico,

Sorry for the slow response, i’ve been busy and haven’t had a chance to try this out. I’ve done some testing with your script only and without bias-t in order to minimize issues.

Am I supposed to enter ID and TLE in post-observation script? Here’s what I had:

/home/pi/process_meteor.py --id {{40069}} --tle {{40069U}}

Was this correct? Here’s the observation and no data:

https://network.satnogs.org/observations/1787962/

The part that confused me was where to put this section since I tried your script alone, without custom script:

“$1” “$2” “$3” “$4”

What would be correct setup with TLE and ID to put in post-observation script using only process_meteor.py?

As for log, it keeps showing:

Mar 01 10:22:45 satnogs satnogs-client[2400]: usage: process_meteor.py [-h] --id ID [–tle [TLE [TLE …]]]
Mar 01 10:22:45 satnogs satnogs-client[2400]: [–sat_id SAT_ID]
Mar 01 10:22:45 satnogs satnogs-client[2400]: process_meteor.py: error: argument --id: invalid int value: ‘{{40069}}’
Mar 01 10:30:35 satnogs systemd[1]: Stopping SatNOGS client…
Mar 01 10:30:35 satnogs systemd[1]: satnogs-client.service: Main process exited, code=killed, status=15/TERM

And this which leads me to believe I must have just had wrong configuration:

Mar 01 10:05:17 satnogs satnogs-client[2091]: usage: process_meteor.py [-h] --id ID [–tle [TLE [TLE …]]]
Mar 01 10:05:17 satnogs satnogs-client[2091]: [–sat_id SAT_ID]
Mar 01 10:05:17 satnogs satnogs-client[2091]: optional arguments:
Mar 01 10:05:17 satnogs satnogs-client[2091]: -h, --help show this help message and exit
Mar 01 10:05:17 satnogs satnogs-client[2091]: --id ID
Mar 01 10:05:17 satnogs satnogs-client[2091]: --tle [TLE [TLE …]]
Mar 01 10:05:17 satnogs satnogs-client[2091]: --sat_id SAT_ID
Mar 01 10:15:50 satnogs systemd[1]: Stopping SatNOGS client…

What’s the correct TLE to put? Maybe that was my mistake.

Thank you in advance!

Another step forward, still need some help.
In /datadrive/ folder a file named data_1779712_2020-xxxxxxxxxxxx.s is created at the begining of obsevation. The postob script looks like it doesn’t do anything. Running sudo ./process_meteor.py from /datadrive/ returns good results, making a good decode and convert, generating IR and visual pictures that are uploaded to observation page. https://network.satnogs.org/observations/?norad=40069&observer=&station=1248&results=d1&start=&end=
Any ideea how to test postob script, and where to find the results/errors log? Allready changed permission to 777 ( :crazy_face:) to test ./postob.sh command and sudo ./postob.sh, but nothing…no png, no error, just moved the file .s in the completed folder.

In the latest RPi image the flowgraph information has been moved to /var/lib/satnogs/lib/python3.7/site-packages/satnogsclient/radio/flowgraphs.py. To add the Meteor MN2 demodulation flowchart, add the following.

Add:
'LRPT': 'satnogs_meteor_lrpt_demodulator.py'
to the SATNOGS_FLOWGRAPH_SCRIPTS dictionary.
and

  'LRPT': {
        'script_name': SATNOGS_FLOWGRAPH_SCRIPTS['LRPT'],
        'has_baudrate': False,
        'has_framing': False,
    },

to the SATNOGS_FLOWGRAPH_MODES dictionary.

The satnogs-client needs to be restarted to adapt these changes, either by sudo systemctl restart satnogs-client or rebooting the Raspberry Pi.

1 Like

Hi!
I currently have these versions:
“versions”: {
“satnogs-client”: “1.3.4”,
“satnogs-client-ansible”: “202007160921”,
“satnogs-flowgraphs”: “1.2.2-1”,
“gr-satnogs”: “2.1.2.1-1”,
“gr-soapy”: “2.1.3-1”,
“gnuradio”: “3.8.1.0~rc1-2”,
“satnogs-config”: “0.10.2”
Is it possible to add the demodulator just with the steps you mentioned above?

Thank you very much for your support!