Beta Address: http://blish.org/sdrdxdoc/ipc.html
7 - Interprocess Communication

7.1 - Invoking External Commands or Scripts
Pressing , , or will invoke an external script or command in your home directory (folder) under OS X if there is one with the name "ss", or another name you set by right-clicking on any EX button. Each button provides a parameter; provides a "2", provides a "1" and so on. You can also invoke "ss" from the keyboard using ^ g, ^ I, ^ N and ^ O, resulting in the same action. Those keys provide the parameters 1, 2, 3 and 4 respectively.
Basically, what SdrDx does when you type ^ n or press is the same thing as if you had typed the following while cd'd to your home directory:
ss 3
What this allows you to do is launch any single arbitrary program action four different ways. Possible uses include commanding the immediate tuning or rotation of an antenna, starting a server for a particular radio, immediate sharing spectrum, demodulator region or scope images on a social site, tuning SdrDx according to an external database of frequencies, switching antennas... the possibilities are wide open.
If you are considering building server software that sends and/or responds to TCP messages from SdrDx, you should also be sure to check out the general purpose TCP commands. Note that sample server software in Python is provided further down this page.

Running Windows XP?
Oh, the pain. What you have to do here to make through work is:
- Install Python 2.7 (NOT Python 3 !!!!) as shown here
- Add the Python install directory to your path, also as shown in the above video
- Create a batch file, perhaps sdrdx.bat that contains one of the following two one-line launchers for your Python script:
python sdrdx.py %1
(or, for no CMD window, change the Python extension to .pyw and use..)
START python sdrdx.pyw %1 - Create a Python script, perhaps sdrdx.py or sdrdx.pyw, that does what you want with the incoming parameter of 1 to 4:
- That script uses four spaces for each level of indentation. Indentation matters in Python; make sure you write yours the same way.
- Replace the flex.exe in each of the four places above to launch the applications you want, or replace the os.system() calls entirely with your own Python actions.
- If you want to use a complete path to an .exe file, note that when you enter backslashes into a Python string, you need to enter two for each instance, as the backslash is an escape character. So for a path like c:\mydir\myprog.exe, the Python string has to be like this:
os.system("c:\\mydir\\myprog.exe")
- Right-click and enter sdrdx.bat into the dialog that opens, then click to accept this.
- ...and then the though functions will work.
7.2 - TCP: Purpose
The TCP interface services allow external programs to somewhat reliably:
- Remain aware of SdrDx's user-directed operations
- Command SdrDx to do things
External programs that might want to be informed about SdrDx's user directed operations would include logging programs that record frequency, signal strength, time and so forth; look up the tuned frequency in a database of broadcast stations; command an amateur radio transceiver to follow the changes made within SdrDx; command an antenna rotor to turn to a particular heading based upon a tuned frequency; command a preselector to tune or an antenna switch to select based upon a tuned frequency.
External programs that might want to command SdrDx's actions, particularly with regard to tuning and demodulator mode, would include programs that cause SdrDx to follow changes made at an amateur radio transceiver or shortwave receiver, programs that set frequency and mode at certain times, and so on.
Rather than try to build all these things directly into SdrDx, which would both be an endless undertaking and one that would be almost impossible without all of the hardware involved, the approach here is to provide the information required — and receive it — in a general form that can be taken advantage of by external software. This way, anyone can easily support any hardware or software they like, without requiring further changes from SdrDx.
7.3 - UDP: Purpose

The UDP interface services allow external programs to:
- Remain aware of SdrDx's user-directed operations
- Command SdrDx to do things
External programs that might want to be informed about SdrDx's user directed operations would include logging programs that record frequency, signal strength, time and so forth; look up the tuned frequency in a database of broadcast stations; command an amateur radio transceiver to follow the changes made within SdrDx; command an antenna rotor to turn to a particular heading based upon a tuned frequency; command a preselector to tune or an antenna switch to select based upon a tuned frequency.
External programs that might want to command SdrDx's actions, particularly with regard to tuning and demodulator mode, would include programs that cause SdrDx to follow changes made at an amateur radio transceiver or shortwave receiver, programs that set frequency and mode at certain times, and so on.
Rather than try to build all these things directly into SdrDx, which would both be an endless undertaking and one that would be almost impossible without all of the hardware involved, the approach here is to provide the information required — and receive it — in a general form that can be taken advantage of by external software. This way, anyone can easily support any hardware or software they like, without requiring further changes from SdrDx.
Example scripts demonstrate how simple it is to work with both types of operation -- commanding SdrDx to tune and change mode, and obtaining information on the interesting things going on within SdrDx.


Start SdrDx. Start DX ToolBox. Open DX ToolBox Preferences. Select "SdrDx TCP" from the drop-down. Set the TCP Port to 58085. Close the DX ToolBox preferences. Exit DX ToolBox. Restart DX ToolBox. At this point, you should see a flashing TCP indicator on the SdrDx control panel.
DX ToolBox's AM Radio Stations map window, SW Schedule window, and Beacons window all talk back and forth with SdrDx.
If you close SdrDx while DX ToolBox is running, and then restart SdrDx, DX ToolBox loses track of the TCP port; to re-open the port, open the DX ToolBox preferences window, and close it with OK; this will re-open DX ToolBox's TCP port.
As a user of DX ToolBox, you can enjoy the ability to dynamically extend its database of stations with my SwDb application; (presently in beta for OS X 10.6 through 10.11) this lets you add new stations to the database as you DX; for instance, it's terrific fun adding all the AM stations you can catch. More about SwDb here.

Open Preferences. Go to Transceivers. Select "SdrDx" as a rig.
7.4 - SdrDx Broadcasts (reports to you)...
UDP packets on port 58083 and TCP packets on port 58085. (These ports can be changed from within the dialog) These packets contain a single ASCII string that is terminated with a zero byte. Once the zero byte is encountered, the remaining content of the packet may be ignored (it will be all zeros.) Most packets will be 1024 bytes or smaller, with the exception of the spectrum packet.
Each packet will contain from one to many messages. A message is a keyword:data pair separated with a colon (:). Multiple messages are separated with a vertical bar (|). If there is only one message in the packet, there will be no vertical bar character. Vertical bars are only inserted between messages in the same packet.
This section details information SdrDx sends to you under various circumstances.
7.4.1 - Ping report
ping:DecimalNumber
DecimalNumber: Total number of seconds since SdrDx startup.
pings are sent in order to keep the connection alive. Otherwise, TCP services time out.
7.4.2 - Frequency report
freq:DecimalNumber
DecimalNumber: Demodulator Frequency in Hz -- sent in response to any frequency change, including center (because changing center changes demod as well.)
cfreq:DecimalNumber
DecimalNumber: Center Frequency in Hz -- sent in response to any center frequency change
7.4.3 - SDR Name
sdrname:string
string: the name of the currently selected SDR. This is sent in response to a getsdr:0 command.
7.4.4 - Receive state report
rx:DecimalNumber
DecimalNumber: 0 is not receiving, 1 is receiving. Sent in response to the rxq:0 message.
"Receiving" is defined as any SDR running, or in active playback/loop mode.
7.4.5 - Reload Frequency Schedule advice
reloadsked:0
Sent in response to the pingdxtb:0 message.
7.4.6 - Center Frequency report
centf:DecimalNumber
DecimalNumber: Center Frequency in Hz
This is sent only in response to a request in the form of the center:0 message.
7.4.7 - Demodulator Mode report
mode:DecimalNumber
DecimalNumber: 0=AM, 1=SAM, 2=FM, 3=USB, 4=LSB, 5=CWU, 6=CWL, 7=WFM, 8=FSL, 9=FSU
7.4.8 - Meter Data report
meter:String
String: This will contain an ASCII representation of the S-Meter setting. Values are s1, s2 ... s9 and then +10/s9 ... +60/s9
Readings are rounded to the nearest S unit. So for example, from s6.5 to s7.5, you get s7.
7.4.9 - dbm signal Data report
dbmreport:decimalNumber
Returns the signal level in dbm in response to the dbm:0 command. Affected by setting.
7.4.10 - Span Data report
span:DecimalNumber
DecimalNumber: This is the span of the spectrum data in Hz
this message is sent when the span changes, and in response to sspan:0
7.4.11 - Demodulator high edge report
highd:DecimalNumber
DecimalNumber: This is the frequency in Hz for the high demodulator edge
This message is sent in response to demodh:0
7.4.12 - Demodulator low edge report
lowd:DecimalNumber
DecimalNumber: This is the frequency in Hz for the low demodulator edge
This message is sent in response to demodl:0
7.4.13 - aud -- audio packet from SdrDx to you
aud:NNNNNNXXXXXXaauuddiioo
NNNNNN This is a six-digit decimal number indicating how many samples follow.
XXXXXX This is a six-digit decimal number indicating the sample rate.
aauuddiioo is a series of signed 16-bit samples representing part of the current audio stream. This stream can contain any byte, so you have to use NNNNNN to determine if you have received the entire packet.
This message is sent (up to 24 packets worth) in response to audiorq:0
7.4.14 - dbstep report
dbstep:DecimalNumber
DecimalNumber: 0-9
Index indicates dB per step in RF display. 0 is 10 dB, and 9 is 1 dB. Sent in response to dqbstepq:0 and when dB/Div control is adjusted
7.4.15 - maxdb report
maxdb:DecimalNumber
DecimalNumber: -86 to 60 in steps of six
dB level at top of RF display. Sent in response to maxdbq:0 message, and when Max dB control is adjusted
7.4.16 - c report
c:DecimalNumber
DecimalNumber: -64 to 64
Contrast control value for RF display palette. Sent in response to the cq:i command, and when the C slider is adjusted.
7.4.17 - i report
i:DecimalNumber
DecimalNumber: 0-100
Intercept value for RF display palette. Sent in response to the iq:0 command, and when the I slider is addjusted
7.4.18 - GMT Time report
gmt:YYYYmmDDhhMMss
YYYYmmDDhhMMss: This is an ASCII representation of the GMT date and time. The report is always 14 digits.
7.4.19 - Log report (log button pressed)
log:YYYYmmDDhhMMss (same as GMT format)
DecimalNumber:YYYYmmDDhhMMss (GMT DateTime)
This indicates the user has pressed at the specified time, and following (in the same packet, probably) will be freq, mode, and meter data to be used in logging activities.
7.4.20 - Program Termination report
closing:0
The zero is a dummy parameter to make parsing easier. When you receive this message, SdrDx is shutting down.
7.4.21 - Spectrum Data report
spectrum:NNNNdataB()
The spectrum message delivers data you may create a spectrum display from, and/or a waterfall display.
The spectrum message is only sent in response to the gimme command. Only one message is emitted per generated line of waterfall data within SdrDx, regardless of how many gimme commands are received, from any number of clients.

Once the spectrum message is sent, all pending requests are considered satisfied (because all clients receive the same broadcast message); no further spectrum messages will be sent until a later request is received.

The first four characters after the colon (NNNN) represent the length of the data following in decimal. This tells you exactly how many characters are in the following data. 0100 means 100 characters of data. 9874 means nine thousand, eight hundred and seventy-four characters of data (not likely!) The number received is directly related to the window width of SdrDx. You are responsible for scaling this data if your application requires this.
Following this is one byte, B, not counted in NNNN, which represents the S-Meter value, except the ordinals 0, 0x3A and 0x7C.

The portion of the message that is data is to be taken as unsigned characters nominally indicating a vertical scale value (or palette index) of zero through 255 that will not include the values 0x00, 0x3A, or 0x7C. After the last data character will be a zero character.
The values you receive are dependent upon SdrDx's Max dB and dB/Div settings; you can adjust these in turn via the IPC interface using the setdbstep and setmaxdb commands.

7.5 - SdrDx Listens for...
This section details commands you can send to SdrDx.
UDP packets on port 58084 and TCP packets on port 58085 (These ports can be changed from within the dialog.) These packets must contain a single ASCII string formatted as command:data that is terminated with a zero byte. Once the zero byte is encountered, the remaining content of the packet will be ignored. Packet length must be sufficient to contain the command, its data, and the terminating zero, and neither the command or the data in the packet may exceed 254 bytes (509 bytes in total, as in 254:254) or the command will be ignored.
7.5.1 - getsdr command
getsdr:0
Causes SdrDx to emit an sdrname:string message.
7.5.2 - pickbw command
pickbw:N
N may be 1-7. Selects a bandwidth memory.
7.5.3 - setmcres command
setmcres:N
Sets the mouse click resolution for the current demodulator mode.
7.5.4 - exit command
exit:0
Causes SdrDx to exit.
7.5.5 - locallabels command
locallabels:0
Turns the local DB labels back on after having used the label:string command
7.5.6 - xposition command
xposition:DecimalNumber
DecimalNumber: horizontal position of left edge of SdrDx main window on display. Note: affects only control window if spectrum is in separate window.
7.5.7 - yposition command
yposition:DecimalNumber
DecimalNumber: vertical position of top edge of SdrDx main window on display. Note: affects only control window if spectrum is in separate window.
7.5.8 - textline command
textline:string (alpha, numbers, CR, LF, or space)
This sends a line of text to SdrDx's text display area. Previously sent lines are scrolled; lines will wrap if too long, or if a space is encountered near the end of the line.
(Ignore NewLines) works with textline: to format a smooth word-wrap display. Turn it off to obey newline-based formatting in the incoming text stream.
7.5.9 - close command
close:DecimalNumber
DecimalNumber: Ignored
Send this before you close your client connection to SdrDx so it can delete you from its TCP client list.
7.5.10 - getsrate command
getsrate:DecimalNumber
DecimalNumber: Ignored
When you send getsrate:0, SdrDx replies with srate:X where X is the current sample rate in Hz.
7.5.11 - pingdxtb command
pingdxtb:0
DecimalNumber: Ignored
Send this if you'd like SdrDx to emit reloadsked:0 advice. This feature allows UDP clients that want a TCP-based scheduler to reload; SdrDx will emit the advice on TCP (and UDP) when it receives pingdxtb:0 over UDP. This translation layer is a convenience for UDP based clients.
7.5.12 - screencap command
screencap:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves the spectrum and the waterfall to the desktop as "foo.png".
You can set the path and filename for this command by →Right-click
7.5.13 - getband command
getband:FrequencyInKhz
Sending this to SdrDx will result in a returned message that tells you what the band edges are for the shortwave band it is in (or not.) For instance, sending getband:9580 will cause SdrDx to emit bandis:9400 9900 while sending getband:1750 will result in SdrDx returning bandis:0 0
7.5.14 - demodcap command
demodcap:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves a slice of the spectrum and the waterfall around the demod frequency to the desktop as "foo.png".
You can set the path and filename for this command by →Right-click
7.5.15 - scopecap command
scopecap:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves the scope to the desktop as "foo.png".
You can set the path and filename for this command by →Right-click
7.5.16 - metercap command
metercap:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves the S-Meter to the desktop as "foo.png".
You can set the path and filename for this command by →Right-click
7.5.17 - demodcopy command
demodcopy:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves a slice of the spectrum and the waterfall around the demod frequency to the clipboard.
7.5.18 - scopecopy command
scopecopy:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves the scope to the clipboard.
7.5.19 - screencopy command
screendcopy:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves the entire main window to the clipboard.
7.5.20 - metercopy command
metercopy:DecimalNumber
DecimalNumber: Ignored
Under OS X, this saves the S-Meter to the clipboard.
7.5.21 - frontself command
frontself:DecimalNumber
DecimalNumber:Ignored
Brings the SdrDx window to the front, and activates it.

What is the frontself command for?
OS X has an OS design error ("feature", no doubt, if you ask Apple) where only one application can receive keystrokes at all; that is the active or "front" application. So in order for OS X scripting to be able to send keystrokes (not IPC messages, but actual keystrokes) to a specific application, there has to be a way to command it to become the active application. If you have two applications, such as DX ToolBox and SdrDx, and you want to issue them both keystroke (not network) commands in order to get something accomplished, then you have to issue network commands to swap between them. So that's what it is there for, to get SdrDx to be active and therefore accept keystrokes from scripting engines under OS X.7.5.22 - dbstepq command
dbstepq:DecimalNumber
DecimalNumber:Ignored
Sets dbstep:DecimalValue with a range of 0-9, index where 0 is 10 dB and 9 is 1 dB per step in RF display.
7.5.23 - maxdbq command
maxdbq:DecimalNumber
DecimalNumber: Ignored
Sends maxdb:DecimalNumber with a range of -86...60 in steps of six.
7.5.24 - cq command
cq:DecimalNumber
DecimalNumber:Ignored
Sends c:DecimalNumber with a range of -64 to 64 in response.
7.5.25 - audiorq command
audiorq:DecimalNumber
DecimalNumber:Ignored
Sends up to 25 packets of aud:NNNNNNXXXXXXaauuddiioo in response.
7.5.26 - iq command
iq:DecimalNumber
DecimalNumber:Ignored
Sends i:DecimalNumber with a range of 0-100 in response.
7.5.27 - setc command
setc:DecimalNumber
DecimalNumber:0-100
Sets RF palette contrast.
7.5.28 - seti command
seti:DecimalNumber
DecimalNumber:-64 to 64
Sets RF palette intercept.
7.5.29 - keyfunc command
keyfunc:DecimalNumber
DecimalNumber:1 to highest function number
If the parameter is out of range, nothing happens.
Press to view function number assignments. More information on is found here.
Executes any mappable function.
7.5.30 - freq Command
freq:DecimalNumber

DecimalNumber: Frequency in Hz
Sets demodulator and center frequency.
7.5.31 - ofreq Command
ofreq:DecimalNumber
DecimalNumber: Frequency in Hz
Sets demodulator, incorporating the FSK and CW offsets set with →Right-click , , , and , and also sets the center frequency incorporating the fixed offset setting, set with →Right-click .

7.5.32 - setfoff command
setfoff:DecimalNumber
DecimalNumber: Frequency display offset in Hz
In response, SdrDx will reply foff:OFFSET where OFFSET is the value you just sent to it.
7.5.33 - dfreq command
dfreq:DecimalNumber
DecimalNumber: Demodulator Frequency in Hz
dfreq: obeys the FSK and CW offsets set with →Right-click , , , and .


7.5.34 - rxq command
rxq:DecimalNumber
DecimalNumber: Ignored
Requests receive state. Returns rx:0 for not receiving and rx:1 for receiving.
7.5.35 - center command
center:DecimalNumber
DecimalNumber: Ignored
In response to this message, SdrDx will send "centf:CenterFreq"
7.5.36 - setspan command
setspan:DecimalNumber
DecimalNumber: span frequency in Hz
In response to this command, SdrDx sets the spectrum and waterfall span to the value supplied, as long as the current SDR bandwidth allows for a span that wide. For example, in order to set a span to 50 KHz, you would provide the value 50000 as the value is in Hz, not KHz. These span changes are limited in rate to 200ms.
7.5.37 - sspan command
sspan:DecimalNumber
DecimalNumber: ignored
In response to this command, SdrDx sends span:Decimalnumber
7.5.38 - demodh command
demodh:DecimalNumber
DecimalNumber: ignored
In response to this command, SdrDx sends highd:Decimalnumber
7.5.39 - demodl command
demodl:DecimalNumber
DecimalNumber: ignored
In response to this command, SdrDx sends lowd:Decimalnumber
7.5.40 - setdh command
setdh:DecimalNumber
DecimalNumber: Frequency in Hz
This command sets the high edge of the current demodulator bandwidth.
7.5.41 - setdl command
setdl:DecimalNumber
DecimalNumber: Frequency in Hz
This command sets the low edge of the current demodulator bandwidth.

7.5.42 - mode command
mode:DecimalNumber
DecimalNumber: 0=AM, 1=SAM, 2=FM, 3=USB, 4=LSB, 5=CWU, 6=CWL, 7=WFM, 8=FSL, 9=FSU
7.5.43 - scamode command
scamode:DecimalNumber
DecimalNumber: 0 = WFM, 1 = 67 KHz SCA, 2 = 92 KHz SCA
7.5.44 - setdbstep command
setdbstep:DecimalNumber
DecimalNumber: 0...9
0 is 10 dB/step and 9 is 1 dB/step
7.5.45 - setmaxdb command
setmaxdb:DecimalNumber
DecimalNumber: -150...10
7.5.46 - setsdrrfgain command
setsdrrfgain:DecimalNumber
DecimalNumber: 0=0 dB, 1=-10 dB, 2=-20 dB, 3=-30 dB
7.5.47 - setsdrifgain command
setsdrifgain:DecimalNumber
DecimalNumber: 0=0 dB, 1=6 dB, 2=12 dB, 3=18 dB 4=24 dB
7.5.48 - run command
run:Flag
Flag may be 0 or 1. Zero means stop; One means Receive.

7.5.49 - addmarker command
addmarker:freq
Send freq accurate to 1 Hz; for instance, to set a marker at 14200 KHz, send:
addmarker:14200000
A red circle marker is added (or removed, if it already exists) at the freq specified, unless freq is zero, in which case the marker is added at the current demodulator frequency. There are 50 markers; once the 50th is emplaced, the next one replaces the first one emplaced, and so on.
A nice use of this capability is to send clearmarkers:0 first, then use addmarker:freq multiple times to set up markers for all the frequencies of a particular broadcaster in a band, such as the BBC. Or conversely, when a band is infested with a station you have no interest in, to mark all those so you don't bother to tune in to them.
7.5.50 - clearmarkers command
clearmarkers:0
Erases all markers.
7.5.51 - fcd command
fcd:Flag
Flag may be 0 or 1. Zero means stop; One means Receive.

7.5.52 - record command
record:Flag
Flag may be 0 or 1. Zero means stop recording; One means start recording.
7.5.53 - label IPC command
label:FinKhzTABStationName[TABStationName][...]
The initial frequencyTABStationName parameters are required. You can add up to 20 additional TABStationName parameters one after another, but keep two things in mind: First, there's a practical limit to how many stations can be displayed on most people's monitors; second, the total number of characters in the message is limited to 256 (any more than that will be clipped, leading to possible error. So don't do that.)
TAB is the ASCII character code 0x09. In Python strings, it is created with a backslash followed by a lower-case "t" character.
When the label command is received, SdrDx will display the information in the message on the main spectrum. The user has fine control over this using a dialog accessed using →Right-click .
Duplicate labels are ignored.
These labels exist for one frequency; when you send a new label command, SdrDx forgets the previous one.
Suggested use is to listen to SdrDx so you know what frequency it is tuned to, then send back any information you might have about that frequency.
7.5.54 - Managing Band Indicators
SdrDx defaults to IARU Region One amateur (and other) band indications. You can customize the band indicators with the following commands:
7.5.54.1 - resetbands command
resetbands:0
The resetbands command will delete all band indicators.
7.5.54.2 - makebands command
makebands:startfrequencyTABendfrequencyTABATABBTABCTABD
The makebands command allows you to set up a band indication.
startfrequency is the frequency in KHz where the band indicator will begin to display. endfrequency is the frequency in KHz where the band will end display. These two values must be different; startfrequency must be lower than endfrequency; both values must be between 00000 KHz and 31999 KHz.
A must be 0, 1 or 2. If zero, the top bar is not affected. If 1, you get a band bar in one color; if 2, you get a band bar in another color.
B must be 0, or 1. If zero, the 2nd bar is not affected. If 1, you get a band bar.
C must be 0, or 1. If zero, the 3rd bar is not affected. If 1, you get a band bar.
D must be 0, or 1. If zero, the bottom bar is not affected. If 1, you get a band bar.
7.5.54.3 - updateplot command
updateplot:0
7.5.54.4 - restorebands command
restorebands:0
Generally, you would probably issue resetbands first; then a series of makeband commands; then issue updateplot once to tell SdrDx to redraw the spectrum.
You would only issue restorebands if you wanted to reset the band displays to SdrDx's defaults.
7.5.55 - mute command
mute:Flag
Flag may be 0 or 1. Zero means mute off; One means mute on.
The mute command allows you to silence audio output.
7.5.56 - rmute command
rmute:Flag Factor
Flag may be 0 or 1. Zero means RF mute off; One means RF mute on.
Factor may range from 0.0 to 1.0. At 0.0, RF is completely muted. At 1.0, RF is not muted at all. At .001, RF is reduced 1000-fold.
the rmute command is designed to reduce or eliminate RF signals upon command. The intended use for this is to reduce the SDR's sensitivity when a transmitter has been commanded to transmit. Nested mute and rmute commands can both silence the audio output and reduce the RF hit.
7.5.57 - gimme command
gimme:DecimalNumber
DecimalNumber: parameter required, but ignored
This command causes SdrDx to issue a spectrum message in response, as soon as there is a new line of spectral / waterfall data. SdrDx must be receiving or no spectrum response message will sent until receive begins.
7.5.58 - savewaterfall command
savewaterfall:Flag
Flag may be 0 or 1. Zero means savewaterfall off; One means savewaterfall on.
7.5.59 - ams command
ams:Flag
Flag may be 0 or 1. Zero means ams off; One means ams on.
7.5.60 - sethpf command
sethpf:freq
freq is a number in Hz from 20 to 5000.
7.5.61 - setlpf command
setlpf:freq
freq is a number in Hz from 20 to 5000.
7.5.62 - hpf command
hpf:Flag
Flag may be 0 or 1. Zero means off; One means on.
7.5.63 - fil command
fil:Flag
Flag may be 0 or 1. Zero means off; One means on.
7.5.64 - pek command
pek:Flag
Flag may be 0 or 1. Zero means pek off; One means pek on.
7.5.65 - lsq command
lsq:Flag
Flag may be 0 or 1. Zero means lsq off; One means lsq on.
7.5.66 - f50 command
f50:Flag
Flag may be 0 or 1. Zero means f50 off; One means f50 on.
7.5.67 - f60 command
f60:Flag
Flag may be 0 or 1. Zero means f60 off; One means f60 on.
7.5.68 - tdm command
tdm:Flag
Flag may be 0 or 1. Zero means tdm off; One means tdm on.
7.5.69 - ring command
ring:Flag
Flag may be 0 or 1. Zero means ring off; One means ring on.
7.5.70 - blanker command
blanker:Flag
Flag may be 0 or 1. Zero means blanker off; One means blanker on.
7.5.71 - txs command
txs:Flag
Flag may be 0 or 1. Zero means txs off; One means txs on.
7.5.72 - dnr command
dnr:Mode
Mode may be 0 or 1. Zero means dynamic noise reduction off; One means on.
7.5.73 - volume command
volume:Value
Value may be from 0 to 99.
7.5.74 - gmt command
gmt:0
In response to this, SdrDx will emit a GMT message back to you with the current date and time.
7.5.75 - meter command
meter:0
In response to this, SdrDx will emit a meter message back to you with the current meter reading, from "s1" to "+60/s9".
7.5.76 - decay command
decay:Value
Value may be from 0 to 9999.
7.5.77 - rfgain command
rfgain:Value
Value may be from -120 to -30.
7.5.78 - txsquelch command
txsquelch:Value
Value may be from -120 to 0.
7.5.79 - squelch command
squelch:Value
Value may be from 0 to 99.
7.5.80 - setgrid command
setgrid:Value
Value may be from 1 to 60.
Sets the number of grid divisions on the spectrum display.
7.5.81 - poll command
poll:0
When SdrDx receives poll:0 it will send freq:X and mode:x in response. This is intended to allow the remote application to determine the initial state of SdrDx, or its state at any other time. Note, however, that SdrDx sends freq:X and mode:X any time they change, so as long as your application is "paying attention", you should generally remain in sync with SdrDx's state. No harm is done by polling, though, and as UDP is not an error-corrected protocol, it's not a bad idea to check every few seconds. The efficiency of this form of polling is very high.
7.6 - Sample Python UDP Client
A sample Python UDP broadcast client (SdrDx-client.py) is provided in the distribution folder. Run the client in an OS X shell and start SdrDx (in either order.) As you change frequency and mode, the client should report those changes in the shell. When you quit SdrDx, the client will exit automatically. Should you encounter problems, you can also exit the client by typing control-c in the shell window where it is running.
7.7 - Sample Python UDP Commander
A sample Python UDP command transmitter (SdrDx-commander.py) is provided in the distribution folder. Start SdrDx and run the commander in an OS X shell, in that order (if you run the commander without SdrDx running, it will send its commands, but SdrDx is not there to listen and so you are wasting your efforts.)
When you run the commander, SdrDx should change to AM mode (if it isn't already in AM mode) and to 1450 KHz (if it isn't there already.)
The Python commander demonstrates how to "talk to" SdrDx using its UDP capabilities.
7.8 - Sample Python TCP client (integrated)
You can use the following TCP client as an example of how to connect to SdrDx's TCP server, send it commands, and listen for messages from SdrDx. Although the client doesn't do much as-is, it can be very easily extended.
Start SdrDx first, then run the client in a shell.
7.9 - RealBasic UDP
RealBasic is often used to create cross-plaform applications. Using it to catch UDP broadcasts from SdxDx is easy, but it's just a little tricky to send to SdrDx. These are the important points as known at this time:
- Use port number zero when creating the UDPSocket
- Spec dest address, port and data when building the datagram
- Make sure the command terminates with a zero: str = "mode:3"+chr(0)
The following shows how to send to SdrDx:
The following receive code is in the DataAvailable() event for the receive udpsocket:
7.10 - General Purpose TCP Commands
SdrDx can send 25 different user-defined command initiators to TCP clients. These messages are of the form macro:N where N is a number from 1 to 25.
To send one of these, press both Shift and Control along with either an F-KEY from f1 to F15, or a top-row digit from 0 to 9
The idea behind these commands is to give you a means you can use directly from SdrDx's user interface that can directly trigger up to 25 different actions in the receiving script or client. Exactly what they do is up to the receiving client, so you can write in any functionality you like.
Possible uses include switching antennas, initiating antenna tuning sequences, changing SDR settings such as attenuation and/or filtering, and so on.
You can also use any or all of these as macros. In this case, when your script or other client receives a macro:n command, the response would be to send a command sequence back to SdrDx, thereby accomplishing a multi-step task in one step. You can send back any TCP command SdrDx understands to it upon receiving a macro:N command yourself.
The possibilities are limited only by your imagination.
toc | index | guide | changes | keyboard | , previous | . next |