Monday, April 30, 2018

First play with OSMO-FL2K compatible VGA dongle

Everyone knows about the popularisation of software defined radio that came about via the wonderful discovery that low cost USB TV dongles with realtech chipsets could be used. Now it looks like we have the same sort of thing but for transmitting.

Some low cost USB VGA adapters are so cheap that they are simply fast digital to analog converters. Steve M from Osmocom has figured out how to turn them into a simple output device suitable for transmitting. Mine came from Aliexpress but others are on eBay locally.

Here I tried a device and used the demo program to transmit an audio file (saved as WAV) over wide band FM to a nearby radio.


I'm on Ubuntu linux so there were some very small deviations from the instructions about USB memory buffer, I had to do this:

sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'

To get some audio to transmit, I opened a 44100 rate mp3 in Audacity and saved it as WAV signed 16-bit PCM file.

The command line to transmit is:

fl2k_fm -s 130e6 -c 35e6 -i 44100 Electric\ Light\ Orchestra\ -\ Telephone\ Line.wav

So far other examples, and there are some amazing ones, require GNU Radio, but hopefully we'll get some more accessible ways to do interesting things like transmit WSPR in the near future.

This is a wonderful example of where the cheaper product is actually more useful than the more expensive versions.

There is a pretty good explanation of how this works in an earlier project VGASIG.

Here's how it looks on an SDR receiver. A little off frequency but looks reasonable to me.


And here's how the 35MHz waveform looks on a CRO:


So when working it's a decent 0.5V peak to peak waveform, DC offset. And a good signal on an FM radio at 95Mhz

I have noticed that this software/hardware works on some Linux machines and not others. It works fine on an Ubuntu 18.04 desktop but not on Fedora machines. When running on some machines it fails silently in that all appears to be running but there's no RF output.

Using the fl2k_file utility I output a sine wave. I can see the sine wave in the dongle output but there is lots of nasty spikes too. I guess a low pass filter could clean this up but it's not a good look.


Please let me know if you've got a better result than I have.

Update: Now getting a better waveform.

I've done some hacking on the FM code, basically stripping it right back and focusing on generating the cleanest wave I can on 40m.


This is running at a sample rate of 150Mega samples per second and a carrier of 7.159MHz. Not great but might be eventually useful (with some filtering) for something like WSPR transmit.

My stripped back version of the source now builds stand alone (no library) and simply generates a sine wave carrier. The source is available here.

No comments: