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
Soundflower (or a “loop-backed” external audio device – ie., plug output into an input channel)
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)
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.
TCP and rigctld settings
Open a terminal window
type: rigctld -m 1 4532 &
This starts the rigctl daemon (server) in the background using the HAMLIB test dummy rig
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. Did you remember to start the rigctld in a terminal window (above)?
Under the Audio sample rate menu, select the correct sample rate for your audio device (e.g. 96k)
Setting frequency from a terminal window
Open another terminal window (or use the same one that’s already open)
To set frequency to 7.010 MHz, type:
echo “\set_freq 7010000” | nc -w 1 localhost 4532
This should change the center frequency and frequency in CubicSDR
Note: Be careful copying and pasting from this page into a terminal window. If you get weird results, try typing the commands by hand.
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
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.
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.
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.