2021-11-28 18:52:29 +00:00
Planned for version 5.0 -- comments/suggestions about this are more than welcome
Multicast UDP broadcast on port 4532
2021-05-09 18:48:03 +00:00
Bidirectional rig control and status
Choice of token pairs or JSON
All packets will be tagged with ID=[unique name] -- so multiple rigs can broadcast/rx on the same port
Broadcast packet contents to be based on get_rig_info output
This will be the text format of name=value pairs
Can be multiple VFO lines
Parsers should allow for unknown tags that may be added in the future
Rig command: \get_rig_info
Rig command: \get_rig_info
VFO=Main Freq=145000000 Mode=None Width=0 RX=1 TX=1
VFO=VFOB Freq=145000000 Mode=FM Width=15000 RX=0 TX=0
Split=0 SatMode=0
PTT=1 (1=On, 0=Off)
Rig=Dummy (name of connected rig)
App=Hamlib (name of application providing the packet)
2021-05-21 17:33:51 +00:00
Version=20210429 1.0.0 (version YYYYMMDD)
2021-05-09 18:48:03 +00:00
Status=OK (possible values OK, Offline, Error)
ErrorMsg=msg text (pipe delimited multi-line error message)
CRC=0xf49f4708 (this is just an example CRC and not accurate for this example)
Example JSON
{
2021-11-28 18:52:29 +00:00
"app": "Hamlib",
"__comment_version__": "protocol version YYYYMMDD x.x.x, 1.0.0 will be used when this is implemented",
"version": "20210521 0.0.0",
"__comment_seq__": "Seq is 1-up sequence number 32-bit -- wraps around to 1 from 2^32-1",
"seq": 1,
"__comment_crc__": "32-bit CRC of entire JSON record replacing the CRC value with 0x00000000",
"crc": "0x00000000",
"rig": {
"__comment1__": "customizable rig identification -- will allow multiple rigs to be on the multicast",
"id": "Rig#1",
"name": "Dummy",
"ptt" : false,
"split": true,
"splitVfo": "VFOB",
"satMode": false,
"status": "OK";
"errorMsg": "OK",
},
"vfos": [
2021-05-18 13:58:21 +00:00
{
2021-11-28 18:52:29 +00:00
"name": "VFOA",
"freq": 14074000,
"mode": "USB",
"width": 5000,
"rx": true,
"tx": false
2021-05-09 18:48:03 +00:00
},
2021-05-18 13:58:21 +00:00
{
2021-11-28 18:52:29 +00:00
"name": "VFOB",
"freq": 14076000,
"mode": "USB",
"width": 5000,
"rx": false,
"tx": true
2021-05-18 13:58:21 +00:00
}],
2021-05-19 15:29:33 +00:00
2021-05-25 14:28:20 +00:00
"__comment_spectra__": "Rigs that have spectrum output may include this array data",
2021-11-28 18:52:29 +00:00
"spectra": [
2021-05-25 14:28:20 +00:00
{
2021-11-28 18:52:29 +00:00
"__comment_id__": "A numeric ID for the spectrum data stream. These IDs are exposed in rig caps.",
"id": 0,
"__comment_name__": "Name identifying the spectrum data stream and matching the ID. The name corresponds to VFOs.",
"name": "Main",
"__comment_spectrum_length__": "Length of spectrum FFT data in bytes",
"length": 475,
"__comment_spectrum_data__": "Spectrum FFT data in 2-char hexadecimal byte format, so that length of the string is 2 * length",
"data": "00AAFF75BD2AAA...",
2021-05-19 15:29:33 +00:00
2021-11-28 18:52:29 +00:00
"type": "FIXED|CENTER",
"minLevel": 0,
"maxLevel": 140,
"minStrength": -100,
"maxStrength": 0,
2021-05-19 15:29:33 +00:00
2021-11-28 18:52:29 +00:00
"__comment_spectrum_frequencies__": "The following fields will be calculated automatically by Hamlib based on the spectrum information exposed by the rig",
"centerFreq": 14267000,
"span": 25000,
"lowFreq": 14000000,
"highFreq": 14250000
2021-05-19 18:00:37 +00:00
},
2021-05-25 14:28:20 +00:00
{
2021-11-28 18:52:29 +00:00
"__comment_id__": "A numeric ID for the spectrum data stream. These IDs are exposed in rig caps.",
"id": 1,
"__comment_name__": "Name identifying the spectrum data stream and matching the ID. The name corresponds to VFOs.",
"name": "Sub",
"__comment_spectrum_length__": "Length of spectrum FFT data in bytes",
"length": 475,
"__comment_spectrum_data__": "Spectrum FFT data in 2-char hexadecimal byte format, so that length of the string is 2 * length",
"data": "00AAFF75BD2AAA...",
2021-05-25 14:28:20 +00:00
2021-11-28 18:52:29 +00:00
"type": "FIXED|CENTER",
"minLevel": 0,
"maxLevel": 140,
"minStrength": -100,
"maxStrength": 0,
2021-05-25 14:28:20 +00:00
2021-11-28 18:52:29 +00:00
"__comment_spectrum_frequencies__": "The following fields will be calculated automatically by Hamlib based on the spectrum information exposed by the rig",
"centerFreq": 14267000,
"span": 25000,
"lowFreq": 14000000,
"highFreq": 14250000
2021-05-25 14:28:20 +00:00
}],
2021-11-28 18:52:29 +00:00
"lastCommand": {
"id": "MyApp 123",
"command": "set_freq VFOA 14074000",
"status": "OK"
2021-05-22 21:55:18 +00:00
},
2021-05-09 18:48:03 +00:00
}
2021-05-20 21:00:03 +00:00
Will be able to set freq, mode, width, ptt, satmode, and split to start since those are common to many apps.
More functions will be added as time goes on.