SSDV Uplink

My PITS software and LoRa Gateway software both allow for uplinks from ground to HAB; in this post I’m going to cover how to use the facility to fill in missing image packets.

Although LoRa has a very good range compared to RTTY for similar data rates, and in the UK we have a reasonably large LoRa receiver network for HABS, there are still situations where there might be enough packet loss to leave large holes in images downloaded via SSDV. This could be the case if you are flying a long way from receivers, or if you are using higher bandwidths where the range is compromised. In this instances an uplink can help by asking the tracker to re-send missing packets.

How It Works

The way this is done is by dedicating a certain amount of time for uplinks; during this time the tracker stops transmitting and starts listening, meanwhile the gateway collects information from the SSDV server, and uses that to build a message that it sends up to the tracker. The tracker then marks up the requested SSDV packets as “Not Yet Sent” so they then can re-sent.

Timing

Normally I set the system to a 1-minute cycle, with the tracker listening from 0s to 5s past the minute, and the gateway transmitting at the 2s mark.

Frequencies and LoRa Mode

The requirements for the uplink are different to those for the downlink, so it may be a good idea to use a different frequency, bandwidth etc. For downlinks we need to use a frequency band where we can transmit for (nearly) 100% of the time; for the uplink we only transmit for (depending on settings) 1% or less of the time, and generally that allows for use of a different band where higher powers are allowed. This is good because the HAB is in a relatively noisy environment (it can potentially hear signals from a large circle on the ground below it) so extra power is needed to overcome that noise.

Tracker Configuration

This sets the tracker to listen for the first 5 seconds of each minute, and transmit the rest of the time. The uplink frequency (which it listens on during those 5 seconds) is set to 869.5MHz which is near the centre of a band that IR2030 allows 500mW transmissions at up to 10% duty cycle. Mode 6 is a convenient set of LoRa settings for the uplink.

Gateway Configuration

This sets the gateway to transmit at the 2-second mark after each minute, and to listen the rest of the time. The uplink frequency is set to 869.5MHz, and the mode to 6, to match the tracker settings above. The last line enables the SSDV uplink.

Since the uplink system uses the current time to decide when to transmit or listen, the gateway needs to have an accurate time reference – e.g. GPS or an NTP server.

List Of Missing Packets

The gateway source includes a Python script ssdv_resend.py that is simply run like so:

python3 ssdv_resend.py PISKY

The “PISKY” is the ID of the payload, and should be no more than 6 characters (the SSDV server truncates longer payload IDs). The script periodically creates a “missing packets” file that the gateway reads, sends to the tracker, and then deletes.

As well as having the standard LoRa gateway installation, you will also need Python3 installed: