Project

General

Profile

Osmo-fl2k » History » Version 27

laforge, 04/23/2018 06:29 PM
link to rtl-sdr, cosmetics (more paragraphs

1 9 steve-m
h1. osmo-fl2k
2 2 steve-m
3 19 laforge
{{>toc}}
4
5 3 steve-m
h2. Introduction
6 1 steve-m
7 27 laforge
Since [[sdr:rtl-sdr]] has been released a couple of years ago, cheap SDR receivers are ubiquitous. SDRs with transmission capability have become cheaper as well, but are still more expensive. osmo-fl2k allows to use USB 3.0 to VGA adapters based on the Fresco Logic FL2000 chip, which are available for around $5, as general purpose DACs and SDR transmitter generating a continuous stream of samples by avoiding the HSYNC and VSYNC blanking intervals.
8 3 steve-m
9 27 laforge
h2. History
10 1 steve-m
11 27 laforge
The idea of using VGA adapters as a transmitter has a long history. 
12
* In 2001 Erik Thiele released "Tempest for Eliza":http://www.erikyyy.de/tempest/, which transmits a signal that can be received with an AM radio.
13
* In 2005 Fabrice Bellard used an ATI Radeon 9200SE to transmit "DVB-T, PAL and NTSC video signals":https://bellard.org/dvbt/.
14
* Later in 2009, Bartek Kania published "VGASIG":https://bk.gnarf.org/creativity/vgasig/, which allows to transmit wideband FM radio in realtime using SDL and a regular graphics card. 
15
* In 2013, siro at das Labor used all three DAC outputs of a VGA card and "attached an I/Q modulator to transmit arbitrary signals":https://wiki.das-labor.org/w/VGAtoBaseband.
16
17 3 steve-m
However, a major downside with regular graphics cards is that the generated signal of the RAMDAC is not entirely user controllable, as VGA uses "horizontal and vertical blanking":https://en.wikipedia.org/wiki/Video_Graphics_Array#Signal_timings, thus interrupting the signal. In comparison to competitor devices from DisplayLink, which resemble a classic graphics card with USB 2.0/3.0 interface, Fresco Logic took a different approach for their USB to VGA adapter, which they've also "patented":https://patents.google.com/patent/US20130346646A1/. Instead of having the framebuffer for the VGA DAC in the device itself, they use the memory of the host computer and continuously stream the display content via USB. This makes such adapters very cheap, as it essentialy reduces the adapter to a single chip without requiring framebuffer memory. The main drawback is that if the host CPU or USB bus is busy or congested, this results dropouts and flickering of the screen.
18 4 steve-m
19 3 steve-m
After reverse-engineering the USB protocol of the FL2000 in 2016, Steve Markgraf discovered through experimentation that it is possible to operate the FL2000 in a way that both horizontal and vertical synchronization are disabled, thus creating a continous stream of samples. This work resulted in osmo-fl2k, which so far was used to transmit low-power FM, DAB, DVB-T, GSM, UMTS and GPS signals.
20 7 steve-m
21 21 laforge
h2. Supported Hardware
22 1 steve-m
23
h3. USB 3.0 VGA Dongles
24
25 27 laforge
Only devices based on the Fresco Logic FL2000 chip are supported. Typically they are branded as "USB 3.0 to VGA" adapters, and are advertised with a maximum resolution of 1920 × 1080 for USB 3.0 and 800 × 600 for USB 2.0. Sometimes also 1920 × 1200 is advertised as maximum resolution (this mode only works with few xHCI controllers and enabled RLE compression). 
26
27
If they are advertised with 2048 × 1152 maximum resolution and support for Mac OS X, or only have a USB 2.0 interface, they contain a DisplayLink chipset and are *not* compatible with osmo-fl2k! The price range for the FL2000-based adapters is $5-15, whereas the DisplayLink devices typically cost more than $25. Also note that devices sold with USB type C connector contain a different chipset (e.g. Realtek RTD2166) and are just DisplayPort to VGA converters.
28
29 8 steve-m
Sources include Aliexpress, eBay and Amazon. The devices are available in various sizes, sometimes also with additional DVI or HDMI support. Two of the most typical devices are shown below.
30
31
{{thumbnail(fl2k_devices.jpg, size=700, title=FL2000 based devices)}}
32 6 steve-m
33 1 steve-m
{{thumbnail(fl2k_pcb_top.jpg, size=500, title=FL2000 PCB top view)}}
34
35 6 steve-m
{{thumbnail(osmo-fl2k_pinout.png, size=500, title=FL2000 VGA pinout)}}
36 7 steve-m
37 15 steve-m
38 6 steve-m
h2. USB Host Controller comparison
39 27 laforge
40
The SDR/DAC performance in Megasamples per second depends on the xHCI controller and the host computer. Below are some benchmarking results for your reference:
41 5 steve-m
42
|*USB 3.0 Host controller*|*Achievable sample rate*|
43
|Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)|157 MS/s|
44
|Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)|155 MS/s|
45
|ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller|140 MS/s|
46
|Fresco Logic FL1100 USB 3.0 Host Controller (rev 10)|140 MS/s|
47
|Fresco Logic FL1100 USB 3.0 Host Controller (rev 01)|136 MS/s|
48
|Fresco Logic FL1009 USB 3.0 Host Controller (rev 02)|136 MS/s|
49
|Etron Technology, Inc. EJ188/EJ198 USB 3.0 Host Controller|129 MS/s|
50
|VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)|123 MS/s|
51
|Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)|117 MS/s|
52
|Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)|115 MS/s|
53 1 steve-m
|Intel USB 2.0 EHCI Controller|14 MS/s|
54 19 laforge
55
h2. Download
56
57
h3. Source Code
58
59
Source code is available from git.osmocom.org
60
* web access: http://git.osmocom.org/osmo-fl2k*
61
* read-only clone access: @git clone git://git.osmocom.org/osmo-fl2k@
62 20 laforge
63 25 steve-m
h2. Using the Software
64 23 laforge
65 25 steve-m
h3. Realtime WBFM transmission
66 1 steve-m
67 25 steve-m
With fl2k_fm it is possible to transmit wideband FM radio of your soundcard output.
68 1 steve-m
69 25 steve-m
First, you need to know the name of the monitor source of your audio output:
70 26 steve-m
71 25 steve-m
@# pacmd list-sources | grep name | grep monitor@
72
@	name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>@
73
74
To transmit the audio output as mono WBFM at 95 MHz, you can use the following command:
75 26 steve-m
76 25 steve-m
@pacat -r -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | \
77
pv -B 256k | \
78
sox -t raw  -r 44100 -e signed-integer -L -b 16 -c 2 - -c 1 -e signed-integer -b 16 -t raw - \
79
biquad 4.76963 -2.98129 0 1 0.78833 0 sinc -15k loudness 5 | \
80
fl2k_fm - -s 130e6 -c 35e6 -i 44100@
81
82
In this case, SoX is performing the 15 kHz lowpass filtering of the audio, stereo to mono conversion and FM pre-emphasis (with the biquad filter).
83
pv is providing some additional buffering, but is optional.
84
85 26 steve-m
To transmit stereo WBFM with RDS, the following command can be used:
86
87
@pacat -r -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | \
88
pv -B 256k | \
89
sox -t raw -r 44100 -e signed-integer -L -b 16 -c 2 - -c 2 -e signed-integer -b 16 -t raw - \
90
biquad 4.76963 -2.98129 0 1 0.78833 0 sinc -15k rate -h 228000 loudness 5 | \
91
fl2k_fm - -s 130e6 -c 30e6 -i 228000 --stereo --rds@
92
93
Now SoX also re-samples the audio to 228 kHz, which is required when using the RDS modulator.
94 25 steve-m
95 22 steve-m
h3. GSM transmission
96 1 steve-m
97
The GNU Radio flowgraphs as well as baseband samples required to transmit GSM and UMTS can be found at https://github.com/steve-m/fl2k-examples.
98
99
{{thumbnail(osmo-fl2k_gsm.jpg, size=500, title=GSM transmission using FL2K)}}
100
101 25 steve-m
h2. Presentation Slides / Recording
102
103
On April 22nd, 2018, Steve Markgraf publicly released @osmo-fl2k@ at OsmoDevCon.
104
* slides of the presentation available at http://people.osmocom.org/steve-m/fl2k_slides/osmo-fl2k.html
105
* video recordings will be released soon via C3VOC at http://media.ccc.de/
106 22 steve-m
107 20 laforge
h2. Contact / Mailing List
108
109
All questions should be directed to the public osmocom-sdr@lists.osmocom.org mailing list, to which you can subscribe at https://lists.osmocom.org/mailman/listinfo/osmocom-sdr
Add picture from clipboard (Maximum size: 48.8 MB)