SDR/HackRF One: Mac Setup and Basics
By Jeff Thompson
Helpful instructions for gnuradio installation using macports, as well.
Note: If gnuradio will not import into python. Try selecting python27 as the macports default:
sudo port select python python27
With CubicSDR, HAMLIB, and Max
CubicSDR uses the SoapySDR library as generic tool for extracting realtime IQ data streams from common SDR devices. It also provides TCP external frequency control using HAMLIB.
Although its not the main purpose of CubicSDR, the IQ streaming capability will connect SDR devices to Max, Pd, and other DSP platforms, to build experimental radios. All without building external objects or hardware device drivers. The convenience of using CubicSDR for this purpose far outweighs the overhead.
A prototype with Max and rtl_sdr
How to use CubicSDR as a front-end for SDR experiments in Max.
The signal path for this test is:
- NooElec HAM IT UP upconverter
- rtl-sdr dongle
- Soundflower (or a “loop-backed” external audio device)
Running in the other direction, the frequency control path is:
- netcat running in Mac OS X terminal (or a Max patch that sends TCP)
- rigctld (hamlib TCP server)
- rtl-sdr dongle
There’s a lot of stuff going on here, so the choice to use hardware audio routing instead of Soundflower and netcat instead of TCP in Max, is an effort toward simplicity.
- Plug in the rtl-sdr before launching CubicSDR, so it will be discovered on the setup screen
- On the main display, click just to the right of the mode buttons to bring up a drop down menu of audio devices
- select I/Q mode
- select the audio device, or Soundflower, that you will use to route audio to Max
- If using an upconverter, set the ‘frequency offset’ in the settings menu (e.g. -125000000)
- click on any of the frequency digits, press space, and enter in the same frequency as the Center Frequency (e.g., 7000000)
- click the ‘V’ to the left of the frequency digits, to select ‘delta lock mode’. This causes the frequency and center frequency to sync.
- Be careful not to click anywhere in the waterfall window – or this will mess up the sync
- Under Rig Control menu:
- Select “Hamlib NET rigctl” as the model
- Enter localhost:4532 as the control port
- Select 57600 as the serial rate
- Make sure that “follow rig” and “floating center” are checked
- ‘Check’ ‘enable rig’. If it doesn’t stay checked, then there is a problem with the connection.
- Under the Audio sample rate menu, select the correct sample rate for your audio device (e.g. 96k)
TCP and rigctld settings
For this test, you can use any of the MaxSDR tutorials available at https://github.com/tkzic/maxradio but I chose to use the main program, currently maxsdr7a.maxpat. The key is to choose the default audio input device and set it to be the same as what is coming out of CubicSDR. I used a stereo patch cord to connect the line output of my Apollo Twin interface to the input jacks – but you can also use Soundflower.
- Set the audio input device to match CubicSDR, as described above. Also match the sample rate (e.g., 96k)
- Set the audio output device to your internal soundcard/speakers
- You may need to toggle the flip IQ button
- Start audio and recall preset 1 or some normal settings for SSB
- It should be receiving I/Q data now from Cubic SDR
Installing Hamlib: http://reactivemusic.net/?p=19402
Installing CubicSDR: https://github.com/cjcliffe/CubicSDR/releases
Supported SDR devices: http://reactivemusic.net/?p=19746
I had some success using the Max TCP external described at the Installing Hamlib link above, but temporarily abandoned it due to some latency and dropouts.
Local version of this patch is: tcpClient-small2.maxpat
- hardware (i.e., MIDI controller) control of frequency – and refinement of Max TCP patch. Can likely re-use the patch from the remote radio project.
- Convert to PD : TCP/IP code is builtin
- Consider forking CubicSDR and adding direct MIDI/OSC control of UI.
Transmitting FM, AM, SSB, SSTV and FSQ with a Raspberry-PI
By @F5OEOEvariste (article at: rtl-sdr.com)
A network of Internet connected CW skimmers that display detected signals in real time.
Send a CQ and immediately get a list of reverse beacon stations that heard your call, from around the world, with time and signal report data.
Logs are collected in a database that is accessible for research.
With a TenTec Eagle transceiver, Managed by N4PY software.
N4PY acts as router, distributing CAT commands to other applications.
The applications are connected using virtual serial port bridge pairs. For each of the applications, N4PY emulates a K3 transceiver on one side of the bridge.
- Panadapter: NAP3
- Logger: N1MM
- CW Skimmer
The CW keyer is a K1EL Winkeyer USB controlled solely by the N1MM logger.
The routing of IQ signals from LP-PAN2 SDR is done through a MOTU 828 mk3 interface, simply to be able to split the signal so that both NAP3 and CW Skimmer can use it.
CW Skimmer gets the IQ signal directly from the MOTU. NAP3 doesn’t not recognize multiple ports on soundcards. So one end of the split from the MOTU is sent through another audio interface (Focusrite 2I2). NAP3 uses the 2I2 as an input device.
LP-PAN frequency adjustments
Notes on configuration for correct zero-beating.
When setting the Eagle BW or PBT, the IF will shift in frequency, so the numbers below assume a centered PBT and a BW of 700.
The sidetone pitch is 523 Hz.
Settings may also depend on which roofing filters are installed in the Eagle.
Set the global offset to -8200. Leave everything else at 0.
CW Skimmer settings
- CW pitch: 523
- Audio IF: -7520
- Sample rate: 96 kHz
- Hardware: SoftRock-IF
This post is about ham radio.
By VK6JBL (Andrew Nilsson)
Available for download at https://groups.yahoo.com/neo/groups/softrock40/files/VK6JBL/
Note: You need to join the Yahoo softrock40 group to access the link
More information about Softrock using Mac OS here: http://blog.marxy.org/2012/02/softrock-ensemble-rxtx-with-dsp-radio.html
By Peter B Marks
Note: On Mavericks you may need to unload the kext for the USB device before plugging in the Softrock:
sudo kextunload -bundle com.apple.driver.AppleUSBFTDI
Using the method above gives error messages, similar to:
(kernel) Kext /System/Library/Extensions/AppleUSBFTDI.kext/Contents/MacOS/AppleUSBFTDI not found for unload request.
Failed to unload /System/Library/Extensions/AppleUSBFTDI.kext/Contents/MacOS/AppleUSBFTDI – (libkern/kext) not found.
Reboot the computer. Run the command again. Ignore the error message. And then try plugging in the softrock again.
Tried some variations of the command…
sudo kextunload -b /System/Library/Extensions/AppleUSBFTDI.kext/Contents/MacOS/AppleUSBFTDI
But the following one seemed to do the trick (at least for now) even though it still gives an error:
sudo kextunload -bundle-id com.FTDI.driver.FTDIUSBSerialDriver
For a more practical solution, check the FTDI manual, if it makes any sense to you.
A linux command line utility to control softrock, also by Andrew Nilsson
Local source is in tkzic/softrock/usbsoftrock
Online repo: https://code.google.com/p/usbsoftrock/ (last updated 2/2011)
It appears that this may have the code needed to build a Max external.
Notes: Since Mavericks, the Soft66lc SDR external has not been working in Max. Although I was not able to update the external, there is a temporary workaround.
Mac OS is hijacking the FTDI USB device with its own driver. You can unload the driver from terminal:
sudo kextunload -bundle com.apple.driver.AppleUSBFTDI
To reload the driver use “kextload”.
Here is article from Sparkfun with details about this workaround: https://learn.sparkfun.com/tutorials/how-to-install-ftdi-drivers/mac
And a more elaborate workaround that removes the Apple driver: http://www.mommosoft.com/blog/2014/10/24/ftdi-chip-and-os-x-10-10/
Notes about latency and FTDI http://openbci.com/forum/index.php?p=/discussion/199/latency-timer-os-x-new-info-plist
The real solution involves using the new Apple driver to communicate with the device: https://developer.apple.com/library/mac/technotes/tn2315/_index.html
Or spoofing the driver with a codeless kext: http://stackoverflow.com/questions/7263648/codeless-kext-loading-problem
Open source support for Softrock, SDR-IQ, K3, Lp-pan, and others.
By James Ahlstrom
Installation guide: http://www.hamradioandvision.com/installing-quisk-for-linux/
oggrx~ and oggtx~
by Robin Gareus
At Cycling 74 forum: https://cycling74.com/forums/topic/streaming-internet-radio-in-maxmsp/
I was able to receive mp3 files from a server in Max 6.18. using oggrx~. There doesn’t appear to be transport control – so this would need to be built in for synchronization.
Unexpected find: The external uses “secret rabbit code” for resampling. So it works in Max. And we have the source code but not the i386 libs that were used to compile it.
There is no binary for v.7 of oggrx~.mxo, but there is one for v.6
Original c74 post by umma08:
i managed to get Robin Gareus’ externals. They are available here, though they are unmaintained.
The binaries are still online at:
It’s been more than 3 years (OSX 10.5) since I last looked at it, it
should still work, but I don’t know. Please let me know if you encounter
any problems, so that I can warn others.
I don’t maintain this external anymore. I neither have a MAX/MSP
license, nor do I own any Apple devices. On the upside, complete
source-code is available from