Posts Tagged softshell

New Cocoa Radio release!!

Cocoa radio interface explained (click for full size)

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.

, , , , , ,


Compiling GnuRadio 3.3.0 on Mountain Lion

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
---> 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/
<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.

, , , ,


Using softshell with GNURadio

It has been a little while since I released the very early code for softshell (not that the code has advanced much), and I’ve received a few requests for a bit more information about how it’s intended to be used.

I admit that I hacked it together very quickly so that I could make some basic use of the rtlsdr dongles on my mac.  To be very clear, Softshell does no actual SDR itself.  You can really look at it more like a driver for the rtlsdr.  Softshell opens a connection to the rtl device, allows you to tune its internal oscillator, and puts the data on the network.

To start, install the rtl device in your USB port, then open Softshell.

Freshly opened

If you see a similar window, it means that Softshell has found your device (the ezcap in this case).  It is, perhaps, a good time to mention that I’ve only ported the tuner code for the Elonics E4000 tuner.  Click the “Open” button to have the program open the connection to the device.  If it detects that you have the E4000 the “Tuner type” field will be filled in with “Elonics E4000.”

Once this is done, changes to the sample rate and center frequency will take effect with the “Update” button is clicked.  The Center frequency is provided in Hz.

Now, that’s all fine and good, but you’re just tuning the device.  To actually get the data out of it, you need to setup the network settings.  Choose a port number for Softshell to listen to, I use “12345,” and click the “Running” checkbox.

Finally, in GnuRadio, you need to use a “TCP Source” block setup as a client with the same port number you used before.

Setting up GnuRadio to work with Softshell (click for full size)

Once that’s done you should be up & running.  Note that, natively, the rtl device actually outputs unsigned bytes and that Softshell converts these to floats centered around zero.  Some GnuRadio examples include the blocks that perform this conversion.  If you come across this, just remove those blocks.

Good luck!  Please feel free to comment with any questions or issues!

, , , , , , ,


Softshell, the MacOS RTL-SDR driver

For the uninitiated, a few months ago one of the developers in the V4L (video for linux)/DVB (digital video broadcasting) team,  Antti Palosaari, discovered that this cheap video tuner dongle could be used as a software defined radio.  Since then, it has developed a HUGE following!  The team over at osmocom helped to package the driver into a separate executable.  The application seems to work well, and even compiles on the mac.  The problem is, though, that you have to install the libusb library for it to work.  It’s not hard to do, but you have to install mac ports, then install libusb.  What a pain.

Most of the active discussion about rtlsdr appears to be happening at the RTLSDR subreddit.

RTL SDR compatible dongle

The idea behind Softshell is to port the osmocom rtl-sdr code into a native Cocoa application that doesn’t need libusb.  I’ve published the code to github, but it’s still very early in the development process.

This post is just meant as a heads-up for anyone with Objective-C experience and an interest.

, , , ,