DX ToolBox Inter-Application Protocol
DX ToolBox can communicate with radio related programs, such as SDR software, or radio tuning programs.
Why do this? DX ToolBox has an extensive built in SWBC program schedule, which is frequently updated.
A user can search or scroll through it, and find a broadcast of interest. Then click on a transmision, and DX ToolBox
will send the frequency to the radio program, which can tune to that frequency.
Likewise, a user can use the radio control or SDR program, and tune around or click on a signal.
The radio program sends the frequency to DX ToolBox, which will then find the transmission in the database and
bring up that entry in the built in schedule window.
It can also send the station information to the radio program, which can then display it.
An SDR program could even query DX ToolBox to gather information about all of the signals present on the spectrum display (say via identifying carriers) and ID the stations for the user.
Messages are sent between the two programs either via UDP packets, or a TCP connection.
By default, DX ToolBox will listen for UDP packets on port 58083 and will send UDP packets to the other program(s) on port 58084.
Or it can try to open a TCP connection on port 58085.
These ports can be changed in the DX ToolBox preferences.
Each message is a single ASCII string formatted as command:data which is then terminated with a zero byte.
Here is what can be sent back and forth:
DX ToolBox will send "poll:0" to request the currently tuned frequency from the radio program, which will respond with the tuned frequency and mode:
The frequency is in Hz. As many digits as needed will be sent, no leading zeros are necessary.
The mode is a single ASCII digit: 0=AM, 1=SAM, 2=FM, 3=USB, 4=LSB, 5=CWU, 6=CWL, 7=WFM, 8=FSL, 9=FSU
The radio program can, and probably should, spontaneously send new freq and mode information whenever the user re-tunes the radio, without being asked by DX ToolBox, so that it can immediately new station information.
DX ToolBox sends "freq:NNNNNN" to set the tuned frequency, again in Hz. The radio program should retune the radio. If it is an SDR app, it could change just the demodulation frequency,
or the center frequency. This could vary depending on the current center frequency as needed.
DX ToolBox sends "mode:N" to set the radio mode, as per the above encoding.
Whenever DX ToolBox gets a "freq:NNNNNN" message, it will respond with information about any stations which are currently transmitting on that frequency.
It will send "label:NNNNNN[tab]StationName1[tab]StationName2...
NNNNNN is the frequency
[tab] is the TAB character, ASCII value 9
StationName1 is the first station on that frequency (if there is one)
StationName2 is the second station on that frequency (if there is one)
And so on
If there are no stations on that frequency, a reply will still be sent with the frequency but no stations.