Posts Tagged rtl-sdr
Relating to the rtl-sdr work that has been done, the E4000 tuner was the standard barer for a long time. However, Elonics has discontinued this part, and it’s becoming difficult to find. The popularity, and scarcity, of this part has encouraged sellers to offer products claiming to be built with the E4000 and are not. Luckily, someone discovered the code for using the R820t tuner in the Linux V4Lin drivers. They ported this code into the rtl-sdr source maintained by osmocom.
I just finished porting their code into Cocoa Radio. Now, it’s possible to use my software with both the E4000 and the R820t. On startup, Cocoa Radio will automatically detect which tuner you’re using and perform the appropriate actions.
It did take a little while to finish this work, and there are several more tuners out there. If you are desperate for support of a specific tuner, you can donate a device for the cause and I’ll try to support it. By the way, Softshell uses the same code for tuning as Cocoa Radio, if you recompile softshell, it should include this new code.
Well, I’m back from vacation and I want to tell everyone about a new version of Cocoa Radio (my application for demodulating radio signals using the rtlsdr dongles on mac os x, written in Objective C). This version seems to be running really well. I’ve set the sample rate to 1024000 samples per second for the moment (though this value can be changed in the code), and at this rate everything seems really stable. Please give it a try and create issues at the github issues page if you find any problems. I should say that I’m a little tired of working on it, so unless there are major issues I’ll be working on other projects for a while. I encourage others to take a look at the code if they’re interested in SDR. It’s not as scary as it looks!
Also, the sliders are a little buggy (especially the bandwidth ones). Move the a little bit once the app starts up and they’ll work correctly.
Finally, I don’t have any support for AM (amplitude modulation) yet. It’s an easy modulation type, and I may add it soon.
I’ve been working on a stand-alone software defined radio (SDR) application for Mac OS on-and-off for a few months, and I think it’s good enough now to encourage people to test it and provide feedback. Though it’s possible, of course, to do everything my app does in GNU Radio, it’s much more convenient to have a dedicated app. Especially because this app uses a lot less CPU than GNU Radio.
This video shows the basic operation of the user interface:
And this one shows an ‘inside peek’ at what happens to the signal inside of the application. In normal usage, the waterfall display won’t do this, but it’s an interesting effect:
There are still many, many bugs, but it should be enough to play around with. I’ve been able to listen to broadcast FM radio for some time using the app. There is no squelch control, that’s on the list of things to add. Also, it’s possible to get audio buffer underruns. It’s likely caused by slight differences in the clock rate of the rtl-sdr dongle and the audio device that you’re using.
If you notice any bugs, or have specific issues that you would like addressed, please create an issue on the github page. Also, if you are able to contribute, please let me know. I’m obviously in need of some GUI assistance!
One word of advice, don’t try to change the modulation type using the drop-down menu, it doesn’t work! 🙂
Again, code is available at github, as is an application binary.
Fixing all the little issues with this process took me days, so I apologize if it’s a complicated and multi-step process. These steps worked for me, hopefully they work for you too, but YMMV.
First of all, it is vital that you don’t have the macports boost 1.50 installed. There is a problem with that version where the x86_64 version of the library isn’t compiled. This is mentioned in an earlier post, and the mac ports trac entry is here.
The easiest way to begin is to install boost 1.49 then run “sudo port install gnuradio-core” and let macports install all of the pre-requisite packages (you may need to perform the fix I mentioned in that earlier post to fix netpbm) . When it finally gets to gnuradio-core, it will fail. Now, what you need to do is:
$sudo port edit gnuradio-core
Follow the instructions, again in that earlier post (update 2).
$sudo port clean gnuradio-core $sudo port -n install gnuradio-core ---> Computing dependencies for gnuradio-core ---> Fetching archive for gnuradio-core ---> Attempting to fetch gnuradio-core-3.3.0_0+python26.darwin_12.x86_64.tbz2 from http://packages.macports.org/gnuradio-core ---> Fetching distfiles for gnuradio-core ---> Verifying checksum(s) for gnuradio-core ---> Extracting gnuradio-core ---> Applying patches to gnuradio-core ---> Configuring gnuradio-core
THIS IS IMPORTANT!: Cancel (control-c) when it says “Configuring gnuradio-core.” At this point, we need to hand-edit the configure script in the gnuradio source directory. The reason for this is because some of the assembler code in gnuradio uses 32-bit only opcodes. When compiling for 64-bit machines they generate errors. It’s necessary for them to be compiled differently. Luckily, when Lion was released, a fix was devised and added to macports. The same exact fix (in principle) should work for Mountain Lion. But, in the configure script, the change looks for Lion and doesn’t detect Mountain Lion. We just need to change the test to detect Mountain Lion. The difference is only the version of darwin used. This information is in this trac.
$cd /opt/local/var/macports/build/ $ls <cd to the long directory that ends with science_gnuradio-core> $cd gnuradio-core/work/gnuradio-3.3.0 $sudo vi configure
Once editing the configure script, search for “darwin*10*” or “darwin*11*”. This is easy if you hit the forward slash and type “darwin\*1”:
The region of interest should look like this (the numbers are the line numbers):
20154 *darwin*11*) 20155 # The cast to long int works around a bug in the HP C Compiler 20156 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 20157 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 20158 # This bug is HP SR number 8606223364.
Change the *darwin*11* (or *darwin*10*) to: *darwin*12*
Close the vi session by hitting <esc> then : then type wq and enter.
Now, run “sudo port -n install gnuradio-core”. Make sure that you DO NOT clean the package. This will destroy our edited configure script.
When that finishes (hopefully it does!) you should be all set! You’ll probably want to install gnuradio-companion as well as gnuradio-audio-osx.
If you have any problems or questions, let me know in the comments.