rtl2832_sdr and /dev/swradio0
Hi,
Is anyone actively working on the rtl2832_sdr driver?
I am particularly interested in anyone who has code for turning the byte stream from /dev/swradio0 into an ETI stream. Or failing that getting enough data about the API for using /dev/swradio0 so as to write a byte sequence to ETI driver based on the dab2eti program in DABtool (which uses the librtlsdr mechanism instead of the /dev/swradio0 one).
Signature · 5 lines
Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Le mardi 31 janvier 2017 à 17:50 +0000, Russel Winder a écrit :
Quoted 10 lines
Hi,
Is anyone actively working on the
rtl2832_sdrdriver?I am particularly interested in anyone who has code for turning the byte stream from
/dev/swradio0into an ETI stream. Or failing that getting enough data about the API for using/dev/swradio0so as to write a byte sequence to ETI driver based on the dab2eti program in DABtool (which uses the librtlsdr mechanism instead of the/dev/swradio0one).
This device works like any V4L2 driver, with the differences explained here:
https://linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/dev-sdr.html
For the rest I'm no expert. You can probably port dab2eti to use this interface instead of librtlsdr and keep the rest. You may be able to skip an fft if your driver supports it, otherwise you'll get RU12, that you'll probably have to convert to floats before passing to the rest of the processing code.
regards,
Nicolas
Quoted 11 lines · Russel Winder
Hi,
Is anyone actively working on the
rtl2832_sdrdriver?I am particularly interested in anyone who has code for turning the byte stream from
/dev/swradio0into an ETI stream. Or failing that getting enough data about the API for using/dev/swradio0so as to write a byte sequence to ETI driver based on the dab2eti program in DABtool (which uses the librtlsdr mechanism instead of the/dev/swradio0one).
Easiest way to test it just use v4l2-ctl to configure device and then read data from device file.
$ #set ADC 2M $ v4l2-ctl -d /dev/swradio0 --tuner=0 --set-freq=2.000 Frequency for tuner 0 set to 2000000 (2.000000 MHz) $ #set rf tuner 98.1MHz $ v4l2-ctl -d /dev/swradio0 --tuner=1 --set-freq=98.1 Frequency for tuner 1 set to 98100000 (98.100000 MHz) $ # dump 32 I/Q samples $ cat /dev/swradio0 |hexdump -n 64 -C 00000000 80 80 7e 7d 84 84 70 71 a8 5f 74 9f 6e 53 b4 9d |..~}..pq._t.nS..| 00000010 53 8f 9e 4c 71 b8 75 28 a1 8a 57 8c 9d 46 73 c7 |S..Lq.u(..W..Fs.| 00000020 79 60 a6 ae 36 82 94 60 6c bf 7e 6a a7 9e 55 73 |y`..6..`l.~j..Us| 00000030 a8 72 5c a6 7f 35 a2 a2 61 54 ce 8a 57 b3 8e 50 |.r\..5..aT..W..P| 00000040 $
Looking v4l2-ctl code could give some ideas how to use control IOCTLs. Data can be read both read() or mmap() method.
regards
Antti
Signature · 1 line
http://palosaari.fi/