SSTV Decoder for Satnogs - Tutorial for Noobs and Pro

Regarding Observation 13809762

I’m trying to make an SSTV auto decoder for SatNOGS (python script, forked from colaclanth/sstv, and it looks like it works flawlessly. I will share a tutorial and source code on this page:

SSTV mode supported:

Martin 1, 2
Scottie 1, 2, DX
Robot 36, 72

this work flawless on latest satnogs-client docker (version 2.1.1) (running on raspberry with satnogs manual docker installation)

STEP BY STEP

change directory to your grandstation directory:

cd ~/station-4330

create directory app (If it already exists, skip this step)
mkdir app

edit docker-compose.yml
nano docker-compose.yml

Look at the line that contains:

    volumes:
      - type: 'tmpfs'
        target: '/tmp'

Then copy and paste the following text right below it:

      - type: 'bind'
        source: './app'
        target: '/app'

edit station.env:
nano station.env

find the following variable and change its value to: (if it doesn’t exist yet, add it)

SATNOGS_POST_OBSERVATION_SCRIPT=/app/satnogs-post {{ID}} {{FREQ}} {{TLE}} {{TIMESTAMP}} {{BAUD}} {{SCRIPT_NAME}}

go to app dir:
cd app

copy paste and run this command (download the sstv2satno add on script):
git clone https://github.com/hobisatelit/sstv2satno

create satnogs-post script (If it already exists, just edit and add the new line):
nano satnogs-post

copy paste this
#!/bin/bash

/app/sstv2satno/sstv.sh stop "$@" &

make it executable:
chmod 755 satnogs-post

restart the station:

cd ~/station-4330
sudo docker-compose down && sudo docker-compose up -d && sudo docker-compose logs -f

and.. finish! :partying_face:

just create a new observation for satellites that have SSTV event.

by default, these SSTV Satellites are included in my sstv script.
25544 - ISS 
57172 - UmKA-1 
67290 - SAKHACUBE
40931 - LAPAN-A2 
57180 - Monitor-3
61762 - ArcticSat-1
67291 - QMR-KWT 2
57189 - VIZARD-meteo
48274 - CSS (Tianhe)
57203 - UTMN2
67279 - GALAPAGOS-UTE-SWSU
59112 - SONATE-2
57190 - Nanozond-1

but you can edit these file by yourself, just go to file ~/app/sstv.sh

when the sat is finish obs, and your logs seen like these, that mean the sstv decoder is work:

logs
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Detected SSTV mode Robot 36
[sstv] Decoding image...   [######] 100%e...   [......]   0%
satnogs_client_1  | [sstv] Drawing image data...
satnogs_client_1  | [sstv] ...Done!
satnogs_client_1  | [sstv] 
satnogs_client_1  | Image 1 decoded successfully!
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: SSTV mode is unsupported (VIS: 0)
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: SSTV mode is unsupported (VIS: 0)
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: SSTV mode is unsupported (VIS: 0)
[sstv] Searching for calibration header... Found!    header... 224.
satnogs_client_1  | [sstv] Error decoding image: SSTV mode is unsupported (VIS: 0)
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: SSTV mode is unsupported (VIS: 0)
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: Error decoding VIS header (invalid parity bit)
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: SSTV mode is unsupported (VIS: 0)
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: Error decoding VIS header (invalid parity bit)
satnogs_client_1  | [sstv] Searching for calibration header... Found!    
satnogs_client_1  | [sstv] Error decoding image: SSTV mode is unsupported (VIS: 0)
satnogs_client_1  | [sstv] 
satnogs_client_1  | [sstv] 
satnogs_client_1  | Total images decoded: 1
satnogs_client_1  | output_dir: /tmp/.satnogs/data
satnogs_client_1  | [sstv] Image 001 saved as /tmp/.satnogs/data/data_13809762_qsstv_001.png
satnogs_client_1  | INFO     satnogsclient.observer.observer Artifacts upload for observation 13809762 successful.

73!
bali

9 Likes

Nice! I am interested!

Also interested in a more general way in how to take the transmission, process it, and feed it back to satnogs so that it appears as output on the website.

nah. just follow the step by step above. i guarantee you will learn much what you interest.

I tried sstv2satno and successfully uploaded the Robot36 image from UmKA-1 at #13852869. Thanks!! I’m going to gather slant correction factor data and update my sstv.sh script.

Thank you for trying.
glad to see it work also on your station.

i put here for archive:

1 Like

That’s awesome! When I read that there is no decoder included, I put a note on my ToDo to make a post script for this. Great to know you already did this! I will copy setup asap :slight_smile:

2 Likes

now best time to test sstv decoder (iss sstv event, articsat farewell sstv, etc)

2 Likes

from this obs

3 Likes

Observation 14031067

Manually decoded:

2 Likes

I have the same problem. I had to change the sox binary because it is aarch64 on github, but it runs 32bit in docker.

and now: obs 14033966

1 Like

Ehm, could you explain your change in detail, please?

I don’t know what version of docker you are running (32bit or 64bit), but on the mentioned github (GitHub - hobisatelit/sstv2satno: SSTV Decoder for satnogs · GitHub) there is a sox binary included, which is 64bit - in my case unusable - I run docker 32bit.
you can verify by connecting to the container:

docker-compose exec --user root satnogs_client bash

and in it:
try run:
/app/sstv2satno/sstv/sox

if the output is:
bash: /app/sstv2satno/sstv/sox.bad: cannot execute binary file: Exec format error

then sox is for a different version

or test:
uname -m
armv7l = 32bit

file /app/sstv2satno/sstv/sox

32bit output:

/app/sstv2satno/sstv/sox: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=b5bdf6a089531d78b0b4d3de5b41145b644ebd2d, for GNU/Linux 3.2.0, stripped

64bit output:

/app/sstv2satno/sstv/sox.bad: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=5ec814b2902153f74daf672b8b19019265426061, for GNU/Linux 3.7.0, with debug_info, not stripped


I use a custom build satnogs, so I have the sox package installed directly in the container

2 Likes

I’m able to run sox, no error message.

2 Likes

hi daniel, if you done follow all step above, try make sstv obs. example for current is articsat. and monitor at the log

1 Like