Howto: Meteor M2 weather satellite image decoding

Before
image

After

Is this what i should expect to see.

Karl.

Yes it looks alright to me. I am only surprised that I have this in /usr/local/bin. You have it only in /usr/bin?

I have this in /usr/local/bin

You have the lrpt python file now with the other files. That makes sense. Let’s see what happens. And try to catch the log after the pass, without restarting anything :slight_smile:

Will Do thanks for the help.

Well i got a waterfall on the observation but nothing for a processed image.
Also when i try to run your previous command to check the log i do not see anything that looks like the process being called.

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

By running sudo python ./process_meteor.py i end up with this output.

And i see it uploaded the image… Yeah… So now to schedule some observations.

Thanks for the help.
Karl.

Hi …
Same issue as Karl here. image

I’m a bit confused for python’s files location.
This is my /usr/bin sat* listing
image

This is my /usr/local/bin sat* listing. (lrpt added)
image

Real

Hi Real.

From what i gather you need to copy the satnogs_lrpt_demod.py to the /usr/bin directory.

I’ve done this and got my first image but I’m not sure how long it should take to upload the images to the observation results.

Karl.

So it turns out if i reboot the Pi i loose the folder “complete” and my observations do not seem to process.

I can run the command below and re create the folder but it just disappears again. ???

cd /tmp/.satnogs/data
sudo mkdir complete
sudo chown satnogs:satnogs complete
ls -l

Why would this be ?

Thanks
Karl.

Hi Karl, Real, that is some really nice progress! You both have a good waterfall and Karl even got an image! So finally it is starting to work. Moving the file to /usr/bin was a good choice!

@Karl,
When I look at the log after an observation I get the same sort of info you got when you manually ran process_meteor.py.

journalctl -f -u satnogs-client.service -n 100

gives:

Your antenna performs great compared to mine, but that also gives a lot more data to process. I think it takes 2 or 3 minutes to process for my observations. But yours have more data, so will take maybe twice as long? The uploading and updating of the satnogs website also takes a few minutes. Give it 10 minutes or so?

I have also noticed that the complete folder disappears after a restart. Don’t know why. I did not want to fill up that folder anyway, as the SD-card has limited storage. I changed the process_meteor.py a bit to just cleanup instead of copy the *.s files.

@Real,
Can you look in the /tmp folder if there still is a *.s file of that succesfull observation? Can you run:

sudo python ./process_meteor.py

to process it manually, and see what happens? If it works the images will end up in:

ls -l /tmp/.satnogs/data

They may get uploaded and will be erased then.

Hi,

Yes the unprocessed file is sitting in the temp folder.

image

And after doing the above only then is the image uploaded.

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

So it kind of works but somewhere the flow/script isn’t putting into action the (process_meteor.py)

Karl.

Seems a problem with the post observation script. Has it got the following rights and owner?:

cd ~
ls -l *.sh
-rwxrwxrwx 1 pi pi 140 Feb  9 12:32 postob.sh

And if you view the contents with:

less postob.sh

Gives:

#!/bin/bash

#/home/pi/rtl_biast/build/src/rtl_biast -b 0
python /home/pi/satnogs-extras/scripts/process_meteor.py "$1" "$2" "$3" "$4"

Can you check (and re-type) the quotes around $1, etc. This forum or my browser shows them a bit weird.

Can you copy the *.s file back from complete to /tmp. And now run

sudo ./postob.sh

If that works the same then this script is ok. Next the setting in

sudo satnogs-setup 

needs to be checked. I have added a screenshot of this setting in the first post.

You are very close to get it working! And your pictures are great!

Good luck, Eelke.

sudo chown root:root satnogs_lrpt_demod.py
sudo chmod +755 satnogs_lrpt_demod.py

In my case, in my /usr/bin directory, I also need to set the SELinux security context to the satnogs_lrpt_demod.py, unless it won’t work from the background satnogs:satnogs running service.

I just coppied the context from any other already existed decoder in the same directory, simply by “chcon” command:

sudo chcon --reference=./satnogs_fm_demod.py satnogs_lrpt_demod.py

This command coppies the SELinux context from the FM decoder to your new LPRT decoder.

You can check the SELinux file context by the -Z option of the ls command:

ls -lZ sat*

Your new file should have the same context as all other decoders.

If you look carefully, all decoder files listed by the ls -l command, those have set the context, have a (.) dot mark at the end of -rwx-r-x-r-x(.) attributes. And any new copied/created files doesn’t have it by default, just -rwx-r-x-r-x (without dot).

Continuing the discussion from Howto: Meteor M2 weather satellite image decoding:

Before the Re-Type
image

After the Re-Type
image

After running (sudo ./postob.sh) the images get uploaded just fine, BUT they did before also.

And the files get placed in the Complete Folder.
image

SATNOGS_POST_OBSERVATION_SCRIPT Looks like this.

I’ll schedule some more passes and see how i make out
thanks for the help.

Karl.

Hi.
I get what your pointing out but none of my services have the (.) after -rwxr-xr-x so when i try your method i get the error.

Thanks for the Help
Karl.

@Real,
“Can you look in the /tmp folder if there still is a *.s file of that succesfull observation?”

Hi Eelke
I just observe meteor pass and monitoring /tmp/.satnogs/data. (with i believe is ram disk…?)
Files listed in /tmp/.satnogs/data during satellite pass…


Once finished, convert to waterfall png and upload to server, witch is normal.

In the same time, i found this new created file on /tmp directory, >> fisrt time saw .s file.


Once finished, convert to bmp and dec files witch are not uploaded to server.!!
image

I bebeive wrong “path” in python process file…(??)
Real

Hi.
Well it’s still not running the script after the observation has ended, It’s placing the file in the /tmp folder but that where it stays.

And only if i run the script myself do i get images uploaded and then the (.s) file moves to the complete folder.

image

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

Not sure where to go from here.

Thanks for the help.
Karl.

Can you share this change please.

Thanks
Karl.

Hi Karl, saw your 4 replies. I understand that postob.sh works if you run it manually, but not when the satnogs service should call it. I am not sure why it does not work. What does the log say after an observation? This shows the last 100 lines:

journalctl -f -u satnogs-client.service -n 100

I can only guess it is a permission problem, as anything else looks good! When we run it manually we use sudo, to switch to the root user, which has all the rights. The satnogs service is running as the user satnogs. Maybe it can not access the /home/pi directory or something. You can put an *.s file in /tmp and try to re-run the post observation script as the user satnogs by:

sudo -u satnogs /home/pi/postob.sh 

Also the permissions of /home/pi folder are worth to look at. I have:

cd /home
ls -l
drwxr-xr-x. 15 pi pi 4096 Feb 16 15:15 pi

The user satnogs falls in the most right category and gets r-x, rights to the folder. Next the script:

cd /home/pi
ls -l
-rwxrwxrwx 1 pi pi      140 Feb  9 12:32 postob.sh

Maybe you have something else? We have seen multiple differences between your setup and mine. Otherwise I don’t know. You could start a new thread ‘postob script not working’ and ask others for help?

Hi Real, That is very good that you got the bmp and dec files! Did you run the post observation script manually? Or was that run automatically by satnogs? The .bmp file gets converted to a .png to be uploaded. This is done with the convert utility by ImageMagick. Did you install it, according the howto:

sudo apt-get install imagemagick

What happens when you run it:

pi@raspberrypi:~ $ convert
Version: ImageMagick 6.9.10-23 Q16 arm 20190101 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
...

It is being called from process-meteor.py. Indeed, maybe you need to change the path. Is it located in /usr/bin?

ls /usr/bin/convert
cd /home/pi/satnogs-extras/scripts
nano process_meteor.py

Change:

CONVERT_PATH = "/usr/bin/convert"

Hope this helps a bit!

Yes, I noticed that you have different version now (Nov 30). The “dots” were removed in newer version. I saw in your previous screenshots (Jul 1), that jou have dots on the files as @EelkeVisser screenshots too…

Anyway, you are very close to success now.

I think it is a postob.sh execution permission issue only as @EelkeVisser suggested already: Check both: postob.sh file and /home/pi directory by “ls -l” command:

drwxr-xr-x. 15 pi pi 4096 Feb 16 15:15 pi
-rwxrwxrwx 1 pi pi      140 Feb  9 12:32 postob.sh
1 Like

Script convert my .s file by itself…
The only missing part is upload to satnogs server…
Many thanks for your patience… Real