Digital Amateur Television

After the RSGB Convention’s DATV talk, I’ve been super curious about playing more with DATV (Digital Amateur TV). It’s pretty cool - transmit broadcast standard video using low powers and homebrewe equipment. I remember many moons ago Iain, tj and I came up with an MPEG4 proof of concept and streamed Citizenfour between a hackrf and rtl-sdr.

Naturally, to do it properly, I’m going to have to advance my license (work in progress, honest). Before we hit that stage, though, I can work on receiving and fiddling about on an SDR at home.

About DATV

When you’re doing DATV, you’re essentially sending video and audio to the outside world instead of just audio - bit like homebrew Skype, sans internet. It can be either point to point or retransmitted by a local repeater if you’ve got one. This used to be analogue, now it’s becoming digital, just like profressional TV!

DATV is DVB-S. This is the Digital Video Broadcast standard that Sky UK use to broadcast TV. The other standard is DVB-T, which Freeview uses to transmit.

There’s two key differences that explain the choice radio amateurs made of using DVB-S:

  • The T stands for Terrestrial, the S stands for Satellite. Satellite technology is both from the future and much cooler.
  • DVB-S has a single carrier frequency, DVB-T has up to 6,817 carriers in OFDM

The latter difference is the more important - it’s easier to generate and transmit DVB-S signals than it is DVB-T with traditional methods. Of course, SDR changes that up a little, but that’s beside the point. It is, in fact, so “simple” to modulate you can buy a transmitter from the BATC for less than £500.

Receiving DATV

Receiving DATV isn’t a piece of cake, I’m not gonna lie. There are a few options, and one or two of them /are/ simple, but so far I’ve taken the difficult path as I’m an idiot.

Dedicated Hardware

If you’re intending to receive a signal on the 23cm band (~1.3GHz), the news is good - it’s in the middle of the band that real DVB-S boxes tune on. With a proper antenna and feed system you can tune into your local DVB-S signal with no major issues.

There’s a couple of little challenges - masthead preamplifiers and in-shack amplification might be necessary if you’ve got any length of coax and are a long distance away from the signal respectively. Having an antenna for the relevant frequency is a step to overcome too.

Almost off the shelf

For other bands, you’ll need to convert your incoming signal to the L-Band IF the satellite receiver uses, if you’re using dedicated DVB-S receive hardware. For the 70cm (430MHz) band, the BATC have hardware in the shop you can modify. For the others… No clue.

Custom solution

If it floats your boat, you can come up with your own DATV / DVB-S receiver! I’m definitely not that clever, so I figured I should connect the dots of other people’s work.

So, we come to:

Receiving DATV… with HACKRF

So the hackrf is a thing. I don’t have one, but I do have the rad1o, which overall is an interesting spin on the hackrf hardware.

It can receive 1.3GHz natively, so I figured it’d be worth a try to build a receiver using it. I also figured I should do this on a business trip to Bournemouth, for I am a masochist. Also, GB3SQ, a DATV repeater was nearby.

For this, I had to figure out a receive method for the sdr, a decode for the datv and a way to play video.

Receive for SDR

Recently, there’s been talk on the debian-hams mailing list about rx_tools, a port of some of the very useful rtl_tools to the soapySDR framework. It provides similar functionality, but on the various SDR models that SoapySDR supports. SoapySDR is already in debian, but rx_tools isn’t yet. I suppose I’ll be fixing that soon.

Anyway, with rx_sdr the ccc badge hopped into life and did some receiving, I think.

I did hit an issue with this tool - I had SoapySDR’s audio module installed and everything failed and fell apart and left me feeling really sad. I had to apt uninstall soapysdr-module-audio to make it work smoothly. Investigation showed this as an RTAudio framework issue, which doesn’t look to have been built in Debian to support PulseAudio. The errors it was throwing were RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:1,0), Device or resource busy. which reminds me of good old Alsa conflicts back in the day. Maybe I’ll need to raise a bug on this issue.

DVB Decode

For this, I chose leandvb, a wonderfully lightweight software tool. It takes in I/Q values on STDIN and outputs an MPEG stream to STDOUT. As far as I understand it, it was originally designed to receive HamTV from the ISS using an RTL-SDR dongle on a lightweight, low power platform.

leandvb was a recommendation of F5OEO somewhere on their github I think.

Using the instructions from the leandvb website, I managed to pipe output from rx_sdr in to leandvb:

rx_sdr -f 1304000000 -s 2400000 - | ./leandvb --gui

After a few false starts because of soapySDR audio module issue mentioned before, I managed to make the below screen magically appear:

This was taken later on, and if you click on it to get more detail, it might ruin the secrets contained in the “Playing DVB” section coming up later.

The image is basically the gui output of leandvb - a whole pile of DVB metrics. I/Q information, helpful constellation and… whatever the timeline graph does. [Spoilers] I’ll find out when it works.[/Spoilers]

Playing DVB

Well I’m using VLC to display video. It is perfectly qualified for this job - it understands MPEG 2 and isn’t shit… it’s also recommended in the leandvb commands:

rtl_sdr -f 1304000000 -s 2400000 - | ./leandvb --gui | vlc -

Finding the signal

Armed with this knowledge at 1930 on Tuesday, I excitedly ran outside with my laptop, SDR badge and radio and tried to find DVB content.

After finding a few spots in Bournemouth, I didn’t get anywhere. A green, diagonal line on my constellation but that was it. Having tried for the last of the test cards (GB3SQ plays a test signal from 1900->2000 every night).

People must have enjoyed seeing the guy walking around with a neck mounted RF spectrum analyser, stopping in hotel beer gardens and staring at his laptop quietly swearing.

Long story short, no luck.

I came home a bit dejected.

Conclusions

So, there’s a few takeaways from this.

  • DATV is pretty hard. In fact, all of Amateur Radio seems absurdly hard. I guess this is why I keep coming back for more.

  • Tools don’t always glue together well. RX_Tools, SoapySDR, Alsa, RTAudio… I’m looking at you. Something weird is happening there.

  • I should add these tools to Debian - I got quite a lot of enjoyment and learning from them

  • I’m now going to have to work out how to transmit DVB-S with a hackrf clone before I can continue working out how to receive

  • I, uh… I should read the manual more.

RTFM

So… In my excitement to depart the hotel and receive DATV, I’d only read up to section 6.2 of the leandvb manual - Real-time demodulation.

It opens with the phrase:

` Conceptually, a live receiver and decoder would be started as follows:

$ rtl_sdr -f 397000000 -s 2400000 - | ./leandvb –gui | vlc - `

This looks like something I pasted in earlier… doesn’t it? Mayhaps a clever reader can suggest to me a difference between a concept and a practical implementation…

Section 6.3, which I didn’t read, is called Automatic detection of modulation settings.

Section 6.3 starts off by reading: The DVB-S symbol rate and code rate must be supplied to leandvb on the command-line.

Perhaps feeding the correct modulation settings to the conceptual receive command line would be helpful, wouldn’t it? I clearly didn’t do this.

If only I’d recorded the incoming RF information so I could try and see what that skewed green line I previously mentioned was… I wonder, can I do that?

Why yes. The bottom of Section 6.2, which I hadn’t read in full, provides examples of how to record the IQ stream, while demodulating it, and play it back later.

Tit. Must try harder. 10/10 points for enthusiasm, though.

Helpful Resources

Getting Started in ATV - British Amateur TV Club

leandvb website and user guide

rx_tools website and code repo