Hi all,
Here is a quick set of instructions on making the pi3b+ work to demod Meteor LRPT and auto upload it. cgbsat[m] and Darkside deserve the most credit as they did the ‘technical’ stuff;
On the pi3, install imagemagick for the ‘convert’ utility by doing sudo apt-get install imagemagick
I used an 8Gb USB flash plugged into the pi and mounted on /datadrive/ easier to wear out a USB than to break the internal SD card with lots of writes. make the /datadrive directory owned by satnogs:satnogs and chmod 666 it so world+dog can write to it. Plug in the USB memory stick, run dmesg get the device like /dev/sda then run mke2fs /dev/sda1
mkdir /datadrive
mount /dev/sda1 /datadrive/
vi /etc/fstab
add
/dev/sda1 /datadrive ext2 defaults,noatime 0 0
as root:
cd /datadrive
mkdir meteor
chown -R satnogs:satnogs meteor
chmod 666 meteor/
mkdir complete/meteor
chown -R satnogs:satnogs complete/meteor
chmod 666 complete/meteor
cd /datadrive
Get the medat_arm version from http://orbides.org/page.php?id=1023 this will run on the pi3 straight away. Put the medat_arm binary in /datadrive
/home/pi/postob.sh script - make sure satnogs client is configured to run this at the end of the ob. I have added the lines below to my script which also resets my antenna switch.
meteorfile="/datadrive/data_*.s"
if [ -f $meteorfile ]
then
mv /datadrive/data_*.s /datadrive/meteor/
echo `date +%F" "%T`" Meteor file exists" >> /home/pi/freqset.txt
/usr/bin/python /datadrive/process_meteor.py &
fi
wget https://github.com/darksidelemm/satnogs-extras/blob/master/scripts/process_meteor.py and put in /datadrive/ directory - this is @darksides script to automate the processing.
modify process_meteor.py as follows:
SOURCE_PATH = “/datadrive/meteor/data_*.s”
DESTINATION_DIR = “/tmp/.satnogs/data/”
RAW_DESTINATION_DIR = “/datadrive/meteor/complete/”
TEMP_DIR = “/datadrive/meteor/”
TEMP_FILENAME = “meteor_image_temp”
MEDET_PATH = “/datadrive/medet_arm”
CONVERT_PATH = “/usr/bin/convert”
You have to tweak some of the satnogs client files, the following was from cgbsat[m] in IRC
add “GNURADIO_LRPT_SCRIPT_FILENAME = ‘satnogs_lrpt_demod.py’” to satnogsclient/settings.py in line ~68 (after the AMSAT_DUV)
add " elif obj[‘mode’] == “LRPT”:
script_name = settings.GNURADIO_LRPT_SCRIPT_FILENAME" to satnogsclient/scheduler/tasks.py in line ~56 (after the APT_SCRIPT)
download https://matrix.org/_matrix/media/v1/download/matrix.org/BlIKHQFRUEvxuiDEcapYRYqs and put in /datadrive/
CD to /datadrive and run grcc -d /usr/bin/ lrpt_demod.grc
Once the above is done, vi /usr/bin/satnogs_lrpt_demod.py and modify the target locations for the bit stream so its dumped in to the /datadrive/ dir
self.bitstream_name = bitstream_name = “/datadrive/” + os.path.basename(decoded_data_file_path) + “ " + datetime.utcnow().strftime("%Y-%m-%dT%H-%M-%S") + “.s”
self.set_bitstream_name("/datadrive/" + os.path.basename(self.decoded_data_file_path) + " ” + datetime.utcnow().strftime("%Y-%m-%dT%H-%M-%S") + “.s”)
Restart the satnogs client with systemctl restart satnogs-client.service
Schedule Meteor MN2 passes and you should be good to go. Just before your 1st ob, run journalctl -f -u satnogs-client.service --lines=400|grep -v apscheduler.executors.default so you can watch for errors. In another window run ‘watch ls -l /datadrive’ so you can see the .s file building like:
-rw-r--r-- 1 satnogs satnogs 121872384 Aug 30 11:09 data_230487_2018-08-30T10-55-04.s
drwxrwxrwx 2 root root 16384 Aug 25 08:17 lost+found
-rwxrwxrwx 1 pi pi 158904 Apr 11 2017 medet_arm
drwxrwxrwx 3 satnogs satnogs 4096 Aug 30 09:40 meteor
-rwxr-xr-x 1 root root 4198 Aug 29 21:52 process_meteor.py
drwxrwxrwx 2 root root 4096 Aug 28 08:32 satnogs
You can test the decoder part by keeping one of the data_blah.s files and copying it to /datadrive/ during any existing observation, at the end of the ob, postob.sh will be executed, it’ll find the .s file and invoke the decoder script. Output will be uploaded automagically.
If there is something wrong please shout or come to #satnogs in IRC and let me know.