Home > HAM Radio, Projects, RTL-SDR > New Cocoa Radio release!!

New Cocoa Radio release!!

October 11th, 2012 Leave a comment Go to comments

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.



  1. Jeff Calkins
    October 14th, 2012 at 08:20 | #1

    CocoaRadio (10-12-2012) is working nicely on my 13″ MACBOOK PRO w/ 8 GB, CPU @ 1333 MHz OS @ OS X 10.7.5. I’m using the RTLSDR part … very nice job Professor Dillon! I’ll buy you a beer at McMenamins next time I’m in town :)

    Will look around GITHUB and take a peek at your code. I am doing some finite state machine simulation in OBJECTIVE-C for the MAC, but am not currently working with any of the COCOA objects. i need to demodulate a 2mpbs QPSK signal, so it might make sense for me to get up to speed and help-out.

  2. October 14th, 2012 at 08:36 | #2

    That would be awesome. Let it be known: beer is acceptable payment for work.

    Please do look around the code, I hope it’s easy to read. Essentially all of the radio stuff is in the DSP routines section. Depending on what the endpoint for this data is, I have some network code that can be thrown in to allow an outlet.

    To start, I would begin with the FM demodulator. It works by using quadrature demodulation. QPSK is really just a binary (or discrete-level) shift of that. In fact, the output of the FM demodulator stage is probably what you want. I even have a DC-blocking filter in that processing chain to remove the DC offset caused by small tuning errors. At that point, your QPSK signal should look like a square wave, and shouldn’t be that difficult to manage.

  3. Kenz Dale
    October 15th, 2012 at 00:53 | #3

    This software package is really cool. I’d like to throw in a vote for AM, as we’re trying to use SDR to decode wildlife tranmitters, which are just narrow-bandwidth AM pulses, usually transmitted in as assortment of free bands between 140-250MHz.

  4. October 15th, 2012 at 09:39 | #4

    Yah, I probably will. I’d like to be able to receive air traffic control transmissions, and those are all AM. The only problem with narrow-bandwidth AM is related to whether it’s SSB (single sideband) and, if it is, requires some more work to demodulate it.

  5. sarah
    October 16th, 2012 at 14:46 | #5

    Does this require 10.7? I’ve got 10.6.8, downloaded the pre-built binary, and it crashes immediately on launch:

    Exception Type: EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Crashed Thread: 0 Dispatch queue: com.apple.main-thread

    Application Specific Information:
    abort() called
    *** Terminating app due to uncaught exception ‘NSInvalidUnarchiveOperationException’, reason: ‘*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSLayoutConstraint)’
    *** Call stack at first throw:
    (
    0 CoreFoundation 0x00007fff87e70784 __exceptionPreprocess + 180
    1 libobjc.A.dylib 0x00007fff84a55f03 objc_exception_throw + 45
    2 CoreFoundation 0x00007fff87e705a7 +[NSException raise:format:arguments:] + 103
    3 CoreFoundation 0x00007fff87e70534 +[NSException raise:format:] + 148
    4 Foundation 0x00007fff8472cd0a _decodeObjectBinary + 2427
    5 Foundation 0x00007fff8472da89 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1229
    6 Foundation 0x00007fff8472dfc9 -[NSArray(NSArray) initWithCoder:] + 462
    7 Foundation 0x00007fff8472cd83 _decodeObjectBinary + 2548
    8 Foundation 0x00007fff8472c1fd _decodeObject + 208
    9 AppKit 0x00007fff8670b389 -[NSIBObjectData initWithCoder:] + 2102
    10 Foundation 0x00007fff8472cd83 _decodeObjectBinary + 2548
    11 Foundation 0x00007fff8472c1fd _decodeObject + 208
    12 AppKit 0x00007fff8670aa41 loadNib + 146
    13 AppKit 0x00007fff86709fa1 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248
    14 AppKit 0x00007fff86709dd9 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326
    15 AppKit 0x00007fff8670735b NSApplicationMain + 279
    16 CocoaRadio 0x0000000100001f04 start + 52
    17 ??? 0x0000000000000002 0x0 + 2
    )

  6. October 16th, 2012 at 17:26 | #6

    Hmmm, perhaps. It looks like a problem with the layout constraint system. I’m not really sure when that happened.

  7. chromo
    October 24th, 2012 at 05:24 | #7

    @sarah

    it´s the same with me.
    any suggestions?….

  8. October 24th, 2012 at 09:13 | #8

    I think it’s likely caused by the OS version. I’m afraid it may be necessary to upgrade to at least 10.7. I’m sorry!

  9. don
    March 25th, 2013 at 06:44 | #9

    @sarah
    I get the same error on 10.6.8

  10. raff
    May 30th, 2013 at 01:07 | #10

    @sarah
    I was getting the same error. Recompiled on my machine and it works like a charm!

    Also, I have been making some minor changes (some fixes to the squelch, close window and other stuff). In the next few days I’ll create a fork and possibly do a pull request.

  1. October 12th, 2012 at 07:47 | #1
  2. October 16th, 2012 at 22:50 | #2


one × = 9