kopia lustrzana https://github.com/Hamlib/Hamlib
118 wiersze
4.0 KiB
Plaintext
118 wiersze
4.0 KiB
Plaintext
Planned for version 5.0 -- comments/suggestions about this are more than welcome
|
|
Multicast UDP broadcast on port 4532
|
|
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)
|
|
Version=20210429 1.0.0 (version YYYYMMDD)
|
|
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
|
|
{
|
|
"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": [
|
|
{
|
|
"name": "VFOA",
|
|
"freq": 14074000,
|
|
"mode": "USB",
|
|
"width": 5000,
|
|
"rx": true,
|
|
"tx": false
|
|
},
|
|
{
|
|
"name": "VFOB",
|
|
"freq": 14076000,
|
|
"mode": "USB",
|
|
"width": 5000,
|
|
"rx": false,
|
|
"tx": true
|
|
}],
|
|
|
|
"__comment_spectra__": "Rigs that have spectrum output may include this array data",
|
|
"spectra": [
|
|
{
|
|
"__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...",
|
|
|
|
"type": "FIXED|CENTER",
|
|
"minLevel": 0,
|
|
"maxLevel": 140,
|
|
"minStrength": -100,
|
|
"maxStrength": 0,
|
|
|
|
"__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
|
|
},
|
|
{
|
|
"__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...",
|
|
|
|
"type": "FIXED|CENTER",
|
|
"minLevel": 0,
|
|
"maxLevel": 140,
|
|
"minStrength": -100,
|
|
"maxStrength": 0,
|
|
|
|
"__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
|
|
}],
|
|
"lastCommand": {
|
|
"id": "MyApp 123",
|
|
"command": "set_freq VFOA 14074000",
|
|
"status": "OK"
|
|
},
|
|
}
|
|
|
|
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.
|