Tagged: FL2K-SDR

Generating White Noise with an FL2K Dongle

The FL2K project allows us to turn a cheap USB 3.0 dongle into a fully transmit capable SDR (filters still required for high power work). We have posted about the FL2k project several times on this blog since early 2018.

Recently we thank reader Mikael for submitting a fork of the Osmo-FL2K driver code which he writes enables it to generate white noise with uniform amplitude distribution. This could be useful for projects that require a wideband noise source such as when attempting to measure filter and VSWR of antennas.

IK1XPV, author of the code notes that the current code is only tested on the Windows driver branch, via compilation on Visual Studio 2019 at the moment. The main contributed code can be found in \src\fl2k_noise.c.

FL2K Test Hardware
An FL2k Dongle connected to an RTL-SDR via VGA to BNC Breakout Cable and Attenuators

Steve M Talks about Osmo-FL2K at Osmocom Conference 2018

Osmo-FL2K can be considered as the [evil] transmit-side brother of RTL-SDRs. It is a driver that allows cheap $5 - $15 USB 3.0 VGA adapters to be used as a transmit-only capable SDR. It might be considered [evil] as transmitting illegally and without filtering can pollute the RF spectrum, but being responsible with it and using appropriate filters could enable extremely low cost transmitters.

Recently at the October 2018 Osmocom Conference, Steve M, the man behind the Osmo-FL2K discovery and software (and heavily responsible for the development of RTL-SDR too) has given a talk titled "osmo-fl2k - the [evil] transmit-side brother of RTL-SDR". In the past he's also given a similar talk that we posted about previously.

The talk goes over the discovery and reverse engineering of Osmo-FL2k, discussion of the application itself, some signals that have been successfully transmitted and some measurements.

Osmocom is behind the discoveries of RTL-SDR and OsmoFL2K. If you'd like to support them please donate at OpenCollective, and check out their other projects at osmocom.org.

osmo-fl2k - the [evil] transmit-side brother of RTL-SDR

Running Osmo-FL2K on VMWare Workstation Pro

Thank you to Sajjad Golchin Poor for writing in and letting us know about his success with getting Osmo-FL2K to run in WMWare Workstation Pro. Osmo-FL2K is a driver that enables very cheap VGA dongles to work as a SDR transmitter. Previously in our initial first tests with the FL2K-SDR we discovered that it wouldn't connect to a Virtual Box virtual machine, but theorized that it might work in the commercial (non-free) version of VMWare as that has known working USB3.0 support. Regarding his tests in VMWare, Sajjad writes:

...I started working with Virtualbox but as you said the USB 3.0 drivers have some problems and cannot disconnect dongle from the host and attach back to the guest. 

So I went for VMWare Workstation Pro 14 and after booting the GNU radio live image and attaching the dongle and installing the drivers it worked perfectly at transmitting WBFM on the virtual machine. For permanent use of dongle I downloaded and installed Ubuntu 16.04 latest version and it is working flawlessly right now on the VMWare.  

Something that I realized during my test was that the maximum achievable sample rate in VMWare environment is a little bit lower (by Max. 10Ms/s) than what was expected but I guess it is ok for most applications. (it may be because of VMWare USB 3.0 drivers.)

Another thing that I came up with was that some sample buffers may drop during the delivering process to FL2K and it can ruin the whole transmission process. for example, when I was transmitting WBFM after a few minutes it stopped transmitting without any warning/error in the console and the machine thought that it is delivering the samples right to the device. It happened to me both in the VMWare environment and GNU radio live bootable so it might be a software issue.

Sajjad also that he's able to achieve sample rates of at least 145 MS/s in VMWare, but that maximum rate that it locks at always seems to vary between 145 - 157 MS/s

We have been wondering if anyone else has been successful in getting an FL2K dongle to run smoothly in a virtual environment? If you have please post in the comments.

Examples of compatible Osmo-FL2K USB to VGA Adapters.
Examples of compatible Osmo-FL2K USB to VGA Adapters.

Fixing Factory Defective FL2K Dongles

If you've recently purchased an FL2K-SDR to use as a cheap osmo-fl2k transmitter and found that it only works on USB 2.0 ports, or at very slow sample rates, then you may have received a defective unit. Over on his blog Yohanes Nugroho discovered that his FL2K-SDR was experiencing these issues. Upon opening it up he discovered that the wiring inside looked different when compared to the sample image found on the Osmo-FL2K website.

Looking further into it he found that the USB wiring was soldered on incorrectly. After resoldering the wiring Yohanes was able to get the FL2K-SDR working properly at high sample rates on USB 3.0 ports.

FL2K-SDR Rewired
FL2K-SDR Rewired

Steve M’s Video Presentation about Osmo-FL2K Released

Recently we've been posting about the release of Osmo-FL2K which is a software hack that allows cheap $5-$15 USB 3.0 to VGA adapters to be used as a transmit-only capable SDR.  It is an excellent compliment to the RTL-SDR.

Osmo-FL2K was created by Steve Markgraf of Osmocom who gave a presentation on it at this years OsmoDevCon conference. The video was released today and in it he explains the history of VGA transmitter hacks, explains how Osmo-FL2K works and finally discusses some results.

USB VGA dongles and SDR

Setting up and Testing Osmo-FL2K

A few days ago we posted about Osmo-FL2K, which is a newly released piece of software by Steve M from Osmocom that turns a common $5-$15 USB to VGA adapter into a transmit only capable SDR. It is very complimentary to the RTL-SDR.

Any USB to VGA adapter that contains a FL2K chip appears to be compatible and yesterday we received one and have been playing with it. This post is a demonstration of some of the results.

Hardware Used

  1. The cheapest USB to VGA adapter found on the market. It seems all of the low cost $5 - $15 adapters that indicate "USB 3.0 to VGA", and max resolutions of 1920 x 1080 are compatible as they use the FL2K chip. More expensive units are not compatible. Compatible units all have a similar design (box at the end of a short USB cable, although there are other types too). The brand does not matter. (Amazon) (eBay) (Aliexpress)
  2. A VGA to BNC breakout cable to connect the FL2K SDR directly to an RTL-SDR  (via a BNC to SMA adapter) without illegally transmitting over the air. The Red color breakout is the one connected to the TX pin. (Amazon) (eBay) (Aliexpress)
  3. A low cost 20dB or more attenuator to avoid overloading the dongle. (Amazon) (eBay) (Aliexpress)
FL2K Test Hardware
FL2K Test Hardware

Setup

Note that you must have a USB 3.0 port to use Osmo-FL2K, although a USB 2.0 might work although at significantly reduced bandwidths.

Osmo-FL2K is Linux only at the moment, but it may be possible for someone to compile a Windows version, just like with RTL-SDR. Instructions for downloading and compiling the software are available on the official wiki. It is a standard git clone, cmake, make type procedure which can be done in 2 minutes. You'll also need to probably do an 'sudo apt-get install sox pv' if you want to run the WBFM example. 

First we tried to boot into the GNU Radio Live Linux bootable image on a tablet like laptop that only has USB C 3.0 ports. Unfortunately while the FL2K-SDR was recognized, and Osmo-FL2K detected it, there was no signal coming out during test transmissions. It seems that there may be issues when a USB C to USB Type A converter is used. 

Next we tried the GNU Radio Live Linux bootable image on a desktop PC and this time Osmo-FL2K worked fine when plugged into a USB 3.0 port. However, plugging it into extended ports seemed to cause it to not be detected.  So if you're having trouble getting Osmo-FL2K to work, try other USB 3.0 ports on your PC, and avoid USB C adapters if possible.

We also tried Virtual Box, however the FL2K-SDR wouldn't connect to the Linux guest system, even though USB 3.0 was enabled and the extensions were installed. For VMWare it appears only that the paid versions support USB 3.0.

Testing

WBFM

Following the instructions on the official Osmo-FL2K page we were able to get an WBFM transmission up and running almost instantly. The provided example routes audio from your soundcard into the FL2K-SDR, causing it to transmit WBFM audio at 95 MHz. With this we were easily able to broadcast audio from YouTube to another PC via the FL2K-SDR although there is about two seconds of delay.

To choose the frequency you choose the carrier frequency and the sample rate, and then the transmit frequencies will be the sample rate +/- carrier frequency + harmonics.

FL2K broadcasting WFM with fl2k_fm.
FL2K broadcasting WFM with fl2k_fm.
fl2k_fm help screen
fl2k_fm help screen

Harmonics

Speaking of the harmonics we had a look at them using an Airspy and the SpectrumSpy software. The image below shows that the harmonics of a signal transmitted at 95 MHz extend all the way up to the maximum range of the Airspy at 1.8 GHz, and probably further. So filtering is very necessary if you ever want to transmit over the air.

Note that when broadcasting at 95 MHz (sample rate 130 MHz, carrier 35 MHz), there is also a strong signal at the carrier frequency. So band pass filtering would be required. 

Harmonics when transmitting at 95 MHz
Harmonics when transmitting at 95 MHz

DVB-T

We also tested the DVB-T example found at https://github.com/steve-m/fl2k-examples, which worked flawlessly. By using the connected RTL-SDR dongle with the original DVB-T drivers we were able to receive a transmitted stream at 490 MHz using the ProgDVB software.

To do this follow the instructions in the fl2k-examples/DVB-T readme file to generate samples which Osmo-FL2K can transmit. Then on another PC install the DVB-T drivers for the RTL-SDR, and use ProgDVB to scan 490 MHz by manually editing the multiplexes options.

Osmo-FL2K transmitting DVB-T.
Osmo-FL2K transmitting DVB-T to a Laptop running an RTL-SDR.

CPU Usage

Osmo-FL2K is quite CPU intensive, especially if higher sample rates are used. For this reason it might struggle on singe board computers that support USB 3.0. The images below show some CPU usage examples for sample rates of 20, 55, 130 and 155 MS/S. The test PC uses a fairly powerful i7-6700 CPU.

20 MS/S
55 MS/S
130 MS/S
150 MS/S
20 MS/S 55 MS/S 130 MS/S 150 MS/S

Generating White Noise with an FL2K Dongle

The FL2K project allows us to turn a cheap USB 3.0 dongle into a fully transmit capable SDR (filters still required for high power work). We have posted about the FL2k project several times on this blog since early 2018.

Recently we thank reader Mikael for submitting a fork of the Osmo-FL2K driver code which he writes enables it to generate white noise with uniform amplitude distribution. This could be useful for projects that require a wideband noise source such as when attempting to measure filter and VSWR of antennas.

IK1XPV, author of the code notes that the current code is only tested on the Windows driver branch, via compilation on Visual Studio 2019 at the moment. The main contributed code can be found in \src\fl2k_noise.c.

FL2K Test Hardware
An FL2k Dongle connected to an RTL-SDR via VGA to BNC Breakout Cable and Attenuators

Steve M Talks about Osmo-FL2K at Osmocom Conference 2018

Osmo-FL2K can be considered as the [evil] transmit-side brother of RTL-SDRs. It is a driver that allows cheap $5 - $15 USB 3.0 VGA adapters to be used as a transmit-only capable SDR. It might be considered [evil] as transmitting illegally and without filtering can pollute the RF spectrum, but being responsible with it and using appropriate filters could enable extremely low cost transmitters.

Recently at the October 2018 Osmocom Conference, Steve M, the man behind the Osmo-FL2K discovery and software (and heavily responsible for the development of RTL-SDR too) has given a talk titled "osmo-fl2k - the [evil] transmit-side brother of RTL-SDR". In the past he's also given a similar talk that we posted about previously.

The talk goes over the discovery and reverse engineering of Osmo-FL2k, discussion of the application itself, some signals that have been successfully transmitted and some measurements.

Osmocom is behind the discoveries of RTL-SDR and OsmoFL2K. If you'd like to support them please donate at OpenCollective, and check out their other projects at osmocom.org.

osmo-fl2k - the [evil] transmit-side brother of RTL-SDR

Running Osmo-FL2K on VMWare Workstation Pro

Thank you to Sajjad Golchin Poor for writing in and letting us know about his success with getting Osmo-FL2K to run in WMWare Workstation Pro. Osmo-FL2K is a driver that enables very cheap VGA dongles to work as a SDR transmitter. Previously in our initial first tests with the FL2K-SDR we discovered that it wouldn't connect to a Virtual Box virtual machine, but theorized that it might work in the commercial (non-free) version of VMWare as that has known working USB3.0 support. Regarding his tests in VMWare, Sajjad writes:

...I started working with Virtualbox but as you said the USB 3.0 drivers have some problems and cannot disconnect dongle from the host and attach back to the guest. 

So I went for VMWare Workstation Pro 14 and after booting the GNU radio live image and attaching the dongle and installing the drivers it worked perfectly at transmitting WBFM on the virtual machine. For permanent use of dongle I downloaded and installed Ubuntu 16.04 latest version and it is working flawlessly right now on the VMWare.  

Something that I realized during my test was that the maximum achievable sample rate in VMWare environment is a little bit lower (by Max. 10Ms/s) than what was expected but I guess it is ok for most applications. (it may be because of VMWare USB 3.0 drivers.)

Another thing that I came up with was that some sample buffers may drop during the delivering process to FL2K and it can ruin the whole transmission process. for example, when I was transmitting WBFM after a few minutes it stopped transmitting without any warning/error in the console and the machine thought that it is delivering the samples right to the device. It happened to me both in the VMWare environment and GNU radio live bootable so it might be a software issue.

Sajjad also that he's able to achieve sample rates of at least 145 MS/s in VMWare, but that maximum rate that it locks at always seems to vary between 145 - 157 MS/s

We have been wondering if anyone else has been successful in getting an FL2K dongle to run smoothly in a virtual environment? If you have please post in the comments.

Examples of compatible Osmo-FL2K USB to VGA Adapters.
Examples of compatible Osmo-FL2K USB to VGA Adapters.

Fixing Factory Defective FL2K Dongles

If you've recently purchased an FL2K-SDR to use as a cheap osmo-fl2k transmitter and found that it only works on USB 2.0 ports, or at very slow sample rates, then you may have received a defective unit. Over on his blog Yohanes Nugroho discovered that his FL2K-SDR was experiencing these issues. Upon opening it up he discovered that the wiring inside looked different when compared to the sample image found on the Osmo-FL2K website.

Looking further into it he found that the USB wiring was soldered on incorrectly. After resoldering the wiring Yohanes was able to get the FL2K-SDR working properly at high sample rates on USB 3.0 ports.

FL2K-SDR Rewired
FL2K-SDR Rewired

Steve M’s Video Presentation about Osmo-FL2K Released

Recently we've been posting about the release of Osmo-FL2K which is a software hack that allows cheap $5-$15 USB 3.0 to VGA adapters to be used as a transmit-only capable SDR.  It is an excellent compliment to the RTL-SDR.

Osmo-FL2K was created by Steve Markgraf of Osmocom who gave a presentation on it at this years OsmoDevCon conference. The video was released today and in it he explains the history of VGA transmitter hacks, explains how Osmo-FL2K works and finally discusses some results.

USB VGA dongles and SDR

Setting up and Testing Osmo-FL2K

A few days ago we posted about Osmo-FL2K, which is a newly released piece of software by Steve M from Osmocom that turns a common $5-$15 USB to VGA adapter into a transmit only capable SDR. It is very complimentary to the RTL-SDR.

Any USB to VGA adapter that contains a FL2K chip appears to be compatible and yesterday we received one and have been playing with it. This post is a demonstration of some of the results.

Hardware Used

  1. The cheapest USB to VGA adapter found on the market. It seems all of the low cost $5 - $15 adapters that indicate "USB 3.0 to VGA", and max resolutions of 1920 x 1080 are compatible as they use the FL2K chip. More expensive units are not compatible. Compatible units all have a similar design (box at the end of a short USB cable, although there are other types too). The brand does not matter. (Amazon) (eBay) (Aliexpress)
  2. A VGA to BNC breakout cable to connect the FL2K SDR directly to an RTL-SDR  (via a BNC to SMA adapter) without illegally transmitting over the air. The Red color breakout is the one connected to the TX pin. (Amazon) (eBay) (Aliexpress)
  3. A low cost 20dB or more attenuator to avoid overloading the dongle. (Amazon) (eBay) (Aliexpress)
FL2K Test Hardware
FL2K Test Hardware

Setup

Note that you must have a USB 3.0 port to use Osmo-FL2K, although a USB 2.0 might work although at significantly reduced bandwidths.

Osmo-FL2K is Linux only at the moment, but it may be possible for someone to compile a Windows version, just like with RTL-SDR. Instructions for downloading and compiling the software are available on the official wiki. It is a standard git clone, cmake, make type procedure which can be done in 2 minutes. You'll also need to probably do an 'sudo apt-get install sox pv' if you want to run the WBFM example. 

First we tried to boot into the GNU Radio Live Linux bootable image on a tablet like laptop that only has USB C 3.0 ports. Unfortunately while the FL2K-SDR was recognized, and Osmo-FL2K detected it, there was no signal coming out during test transmissions. It seems that there may be issues when a USB C to USB Type A converter is used. 

Next we tried the GNU Radio Live Linux bootable image on a desktop PC and this time Osmo-FL2K worked fine when plugged into a USB 3.0 port. However, plugging it into extended ports seemed to cause it to not be detected.  So if you're having trouble getting Osmo-FL2K to work, try other USB 3.0 ports on your PC, and avoid USB C adapters if possible.

We also tried Virtual Box, however the FL2K-SDR wouldn't connect to the Linux guest system, even though USB 3.0 was enabled and the extensions were installed. For VMWare it appears only that the paid versions support USB 3.0.

Testing

WBFM

Following the instructions on the official Osmo-FL2K page we were able to get an WBFM transmission up and running almost instantly. The provided example routes audio from your soundcard into the FL2K-SDR, causing it to transmit WBFM audio at 95 MHz. With this we were easily able to broadcast audio from YouTube to another PC via the FL2K-SDR although there is about two seconds of delay.

To choose the frequency you choose the carrier frequency and the sample rate, and then the transmit frequencies will be the sample rate +/- carrier frequency + harmonics.

FL2K broadcasting WFM with fl2k_fm.
FL2K broadcasting WFM with fl2k_fm.
fl2k_fm help screen
fl2k_fm help screen

Harmonics

Speaking of the harmonics we had a look at them using an Airspy and the SpectrumSpy software. The image below shows that the harmonics of a signal transmitted at 95 MHz extend all the way up to the maximum range of the Airspy at 1.8 GHz, and probably further. So filtering is very necessary if you ever want to transmit over the air.

Note that when broadcasting at 95 MHz (sample rate 130 MHz, carrier 35 MHz), there is also a strong signal at the carrier frequency. So band pass filtering would be required. 

Harmonics when transmitting at 95 MHz
Harmonics when transmitting at 95 MHz

DVB-T

We also tested the DVB-T example found at https://github.com/steve-m/fl2k-examples, which worked flawlessly. By using the connected RTL-SDR dongle with the original DVB-T drivers we were able to receive a transmitted stream at 490 MHz using the ProgDVB software.

To do this follow the instructions in the fl2k-examples/DVB-T readme file to generate samples which Osmo-FL2K can transmit. Then on another PC install the DVB-T drivers for the RTL-SDR, and use ProgDVB to scan 490 MHz by manually editing the multiplexes options.

Osmo-FL2K transmitting DVB-T.
Osmo-FL2K transmitting DVB-T to a Laptop running an RTL-SDR.

CPU Usage

Osmo-FL2K is quite CPU intensive, especially if higher sample rates are used. For this reason it might struggle on singe board computers that support USB 3.0. The images below show some CPU usage examples for sample rates of 20, 55, 130 and 155 MS/S. The test PC uses a fairly powerful i7-6700 CPU.

20 MS/S
55 MS/S
130 MS/S
150 MS/S
20 MS/S 55 MS/S 130 MS/S 150 MS/S

Osmo-FL2K: A TX-Only SDR Hacked From Commodity $5 USB to VGA Adapters – Demos Available for Transmitting WBFM, GSM, UMTS, GPS

Osmocom are some of the people behind the original discovery and development of the RTL-SDR (in particular Steve M), and today it looks like they have done it again by releasing exciting news of a way to turn a commodity $5 USB to VGA adapter into a TX-only capable SDR. They call their discovery 'osmo-fl2k', as the magic chip that makes it all happen is a Fresco Logic FL2000.

Examples of compatible Osmo-FL2K USB to VGA Adapters.
Examples of compatible Osmo-FL2K USB to VGA Adapters.

The discovery is based on the fact that the VGA specific HYSYC/VSYNC synchronizations on the FL2000 chip can be disabled, allowing for a continuous stream of samples to be sent to the VGA digital to analog converter (DAC). The FL2000 also implements a cheaper method of streaming data compared to other devices which allows these to be $5 devices.

The supported hardware appears to be any USB to VGA adapter that uses the FL2000 chip. They note that these are often advertised as "USB 3.0 to VGA" adapters with a maximum resolution of 1920 x 1080 for USB 3.0 and 800 x 600 for USB 2.0. Over on Amazon the cheapest one we've found (note not yet confirmed to be compatible) that meets the Osmocom description appears to be going for $7.49 and is fulfilled by Amazon.  We've seen prices of $5.11 on Aliexpress and $5.99 on eBay too. There appears to be no difference between the brands of these units, as the 'brands' are just private labelled from the same factory, as anyone can add a brand to a generic product.

Once sellers catch on to the fact that these devices are going to be popular we expect them to most likely start raising prices.

The Fresco Logic FL2000 Chip
The Fresco Logic FL2000 Chip

In terms of TX performance and functionality, osmo-fl2k should be better than RPiTX as it uses an actual DAC, instead of just PWMing a pin. It appears that the device can transmit on a fundamental frequency anywhere from HF up to about 157 MHz, and then signal harmonics can be used to extend the range all the way up to around 1.7 GHz or maybe even higher. Having harmonics does mean that like other cheap TX methods, the signal is not clean and so proper filtering would be required before any sort of higher power transmission would be legal.

The highest fundamental frequency available also appears to be related to the performance of your PC's USB 3.0 controller. The worst USB 3.0 controller that they tested maxed out at 115 MS/s, whereas the best was 157 MS/s (theoretical max should be 160 MS/s). A USB 2.0 controller only gets a maximum sample rate of 14 MS/s.

So far the team have released software examples for transmitting DVB-T, GSM, UMTS (3G) and GPS, and have mentioned that they have also successfully transmitted LTE and DAB too. There is also an example for transmitting WBFM audio with RDS via the pacat Linux command and sox. The image below shows the FL2K-SDR working as a GSM base station. 

Osmo-FL2K being used as a GSM Basestation
Osmo-FL2K being used as a GSM Basestation

If you're interested in more information, Osmocom have released the slides from a presentation that they made at a OsmoDevCon presentation on April 22. The video presentation is also expected to be released soon at media.ccc.de.