Spring, 2017Driver Installation InstructionsAll the installation instructions below were derived from the following links: Here, we will provide you with binaries and basic installation that will enable you to get tune to a frequency and get samples to a file or in python. If you are bold, you can go to the aove websites and follow the installation instructions. There are instructions there to install additional software, such as GNU-radio, SDR There are three tools you must be able to run:
MAC OSX:Option I: Macports
>> sudo port install rtl-sdr Option II: Our pre-compiled binaries
>> sudo mkdir /usr/local/bin >> sudo mkdir /usr/local/lib
>> sudo cp rtl* /usr/local/bin/ >> sudo cp lib* /usr/local/lib/ Testing RTL-SDR
>> rtl_test Found 1 device(s): 0: Generic RTL2832U Using device 0: Generic RTL2832U Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 Info: This tool will continuously read from the device, and report if samples get lost. If you observe no further output, everything is fine. Windows
>> rtl_test.exe Found 1 device(s): 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Found Elonics E4000 tuner Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0 Benchmarking E4000 PLL... [E4K] PLL not locked for 51000000 Hz! [E4K] PLL not locked for 2227000000 Hz! [E4K] PLL not locked for 1114000000 Hz! [E4K] PLL not locked for 1241000000 Hz! E4K range: 52 to 2226 MHz E4K L-band gap: 1114 to 1241 MHz Linux
>> rtl_test Found 1 device(s): 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Found Elonics E4000 tuner Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0 Benchmarking E4000 PLL... [E4K] PLL not locked for 51000000 Hz! [E4K] PLL not locked for 2227000000 Hz! [E4K] PLL not locked for 1114000000 Hz! [E4K] PLL not locked for 1241000000 Hz! E4K range: 52 to 2226 MHz E4K L-band gap: 1114 to 1241 MHz Getting data into MatlabThis year, we will be using python instead of Matlab, but I've left instructions just in case. There are a couple of ways to capture data and transfer it into Matlab. The most simple way is using the rtl_sdr executable to capture data and save it into a file. Then, reading the data from a file into Matlab. The other way is using rtl_tcp which enables communication with the device over TCP connection. I've written several matlab functions that can be used to interact with the device directly from Matlab. Unfortunately these do not work in GNU octave as they use Matlab built-in java interpreter. I will release GNU octave code soon.
Using rtl_sdr to capture to a fileExample: to tune to 88.5Mhz and set the sample rate to 2.4Mhz use: >> rtl_sdr -s 2400000 -f 88500000 capture.bin Use crtl-c to break the capture. Warning… the file will grow very quickly! To load into Matlab/Octave use the provided function loadFile.m in the Matlab commandline >> y = loadFile('capture.bin'); You will see that the samples are complex! Because of the automatic gain, in many cases the first couple of seconds of capture will not be useful. You should therefore discard them. An alternative is to use manual gain, but you have to be careful not to overrange when the signal is strong. The Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0. Example: to tune to 88.5Mhz and set the sample rate to 2.4Mhz and maximum gain use: >> rtl_sdr -s 2400000 -f 88500000 -g 49.0 capture.bin I hope you enjoy this device! please let me know if there are any problems. -- Miki |