1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 16:34:45 -04:00

Meshtastic: implement API properly

This commit is contained in:
f4exb
2026-03-22 21:36:41 +01:00
parent 239ebc38f9
commit 3530dd33ed
30 changed files with 4488 additions and 278 deletions
+331 -1
View File
@@ -4033,6 +4033,12 @@ margin-bottom: 20px;
"M17ModReport" : {
"$ref" : "#/definitions/M17ModReport"
},
"MeshtasticDemodReport" : {
"$ref" : "#/definitions/MeshtasticDemodReport"
},
"MeshtasticModReport" : {
"$ref" : "#/definitions/MeshtasticModReport"
},
"NavtexDemodReport" : {
"$ref" : "#/definitions/NavtexDemodReport"
},
@@ -4230,6 +4236,12 @@ margin-bottom: 20px;
"M17ModSettings" : {
"$ref" : "#/definitions/M17ModSettings"
},
"MeshtasticDemodSettings" : {
"$ref" : "#/definitions/MeshtasticDemodSettings"
},
"MeshtasticModSettings" : {
"$ref" : "#/definitions/MeshtasticModSettings"
},
"NavtexDemodSettings" : {
"$ref" : "#/definitions/NavtexDemodSettings"
},
@@ -10849,6 +10861,324 @@ margin-bottom: 20px;
}
},
"description" : "Map"
};
defs.MeshtasticDemodReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "current de-chirped total channel power (dB)"
},
"noisePowerDB" : {
"type" : "number",
"format" : "float",
"description" : "current de-chirped noise argmax power (dB)"
},
"signalPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "last message de-chirped signal argmax power (dB)"
},
"snrPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "last message de-chirped signal to noise ratio power (dB)"
},
"channelSampleRate" : {
"type" : "integer"
},
"syncWord" : {
"type" : "integer",
"description" : "2 bytes sync word (0..65535)"
},
"nbParityBits" : {
"type" : "integer",
"description" : "Hamming FEC parity bits (LoRa)"
},
"packetLength" : {
"type" : "integer",
"description" : "Packet length in number of bytes (LoRa)"
},
"nbSymbols" : {
"type" : "integer",
"description" : "Number of symbols in the payload with header and CRC (LoRa)"
},
"nbCodewords" : {
"type" : "integer",
"description" : "Number of codewords in the payload with header and CRC (LoRa)"
},
"headerParityStatus" : {
"type" : "integer",
"description" : "Header FEC parity status:\n * 0 - Undefined\n * 1 - Uncorrectable error\n * 2 - Corrected error\n * 3 - OK\n"
},
"headerCRCStatus" : {
"type" : "integer",
"description" : "header CRC check status. Boolean 1 if OK else 0"
},
"payloadParityStatus" : {
"type" : "integer",
"description" : "Payload FEC parity status:\n * 0 - Undefined\n * 1 - Uncorrectable error\n * 2 - Corrected error\n * 3 - OK\n"
},
"payloadCRCStatus" : {
"type" : "integer",
"description" : "payload CRC check status. Boolean 1 if OK else 0"
},
"messageTimestamp" : {
"type" : "string",
"description" : "timestamp of the last decoded message"
},
"messageString" : {
"type" : "string",
"description" : "string representation of the last decoded message"
},
"frameType" : {
"type" : "string",
"description" : "frame type shown in the GUI tree view (for example LORA_FRAME or POSITION_APP)"
},
"channelType" : {
"type" : "string",
"description" : "Channel type code e.g. LONG_FAST"
},
"messageBytes" : {
"type" : "array",
"description" : "bytes of the last decoded message as an array of hex string represented bytes (00..FF)",
"items" : {
"type" : "string"
}
},
"decoding" : {
"type" : "integer",
"description" : "Boolean - decoding status\n * 0 - no decoding\n * 1 - decoding\n"
}
},
"description" : "MeshtasticDemod"
};
defs.MeshtasticDemodSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"bandwidthIndex" : {
"type" : "integer",
"description" : "standard bandwidths index:\n * 0 - 375 Hz (384000 / 1024)\n * 1 - 750 Hz (384000 / 512)\n * 2 - 1500 Hz (384000 / 256)\n * 3 - 2604 Hz (333333 / 128)\n * 4 - 3125 Hz (400000 / 128)\n * 5 - 3906 Hz (500000 / 128)\n * 6 - 5208 Hz (333333 / 64)\n * 7 - 6250 Hz (400000 / 64)\n * 8 - 7813 Hz (500000 / 64)\n * 9 - 10417 Hz (333333 / 32)\n * 10 - 12500 Hz (400000 / 32)\n * 11 - 15625 Hz (500000 / 32)\n * 12 - 20833 Hz (333333 / 16)\n * 13 - 25000 Hz (400000 / 16)\n * 14 - 31250 Hz (500000 / 16)\n * 15 - 41667 Hz (333333 / 8)\n * 16 - 50000 Hz (400000 / 8)\n * 17 - 62500 Hz (500000 / 8)\n * 18 - 83333 Hz (333333 / 4)\n * 19 - 100000 Hz (400000 / 4)\n * 20 - 125000 Hz (500000 / 4)\n * 21 - 166667 Hz (333333 / 2)\n * 22 - 200000 Hz (400000 / 2)\n * 23 - 250000 Hz (500000 / 2)\n * 24 - 333333 Hz (333333 / 1)\n * 25 - 400000 Hz (400000 / 1)\n * 26 - 500000 Hz (500000 / 1)\n"
},
"spreadFactor" : {
"type" : "integer"
},
"deBits" : {
"type" : "integer",
"description" : "Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol"
},
"decodeActive" : {
"type" : "integer",
"description" : "boolean 1 to activate 0 to de-activate decoder"
},
"eomSquelchTenths" : {
"type" : "integer",
"description" : "argmax squared magnitude is compared between current multiplied by this factor and maximum during decoding. This value is divided by 10"
},
"nbSymbolsMax" : {
"type" : "integer",
"description" : "expected maximum number of symbols in a payload"
},
"preambleChirps" : {
"type" : "integer",
"description" : "Number of expected preamble chirps"
},
"nbParityBits" : {
"type" : "integer",
"description" : "Hamming FEC parity bits (LoRa)"
},
"packetLength" : {
"type" : "integer",
"description" : "expected packet length in number of bytes (LoRa)"
},
"sendViaUDP" : {
"type" : "integer",
"description" : "boolean 1 to send decoded message via UDP else 0"
},
"udpEnabled" : {
"type" : "integer",
"description" : "Boolean - Send via UDP\n * 0 - Do not send decoded messages via UDP\n * 1 - Send decoded messages via UDP\n"
},
"udpAddress" : {
"type" : "string",
"description" : "UDP destination udpAddress"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP destination port"
},
"invertRamps" : {
"type" : "integer",
"description" : "Invert chirp ramps\n * 0 - Normal chirp ramps (upchirps for preamble and payload)\n * 1 - Inverted chirp ramps (downchirps for preamble and payload)\n"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
},
"spectrumConfig" : {
"$ref" : "#/definitions/GLSpectrum"
},
"channelMarker" : {
"$ref" : "#/definitions/ChannelMarker"
},
"rollupState" : {
"$ref" : "#/definitions/RollupState"
}
},
"description" : "MeshtasticDemod"
};
defs.MeshtasticModReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power transmitted in channel (dB)"
},
"channelSampleRate" : {
"type" : "integer"
},
"symbolTimeMs" : {
"type" : "number",
"format" : "float",
"description" : "symbol duration (ms)"
},
"payloadTimeMs" : {
"type" : "number",
"format" : "float",
"description" : "payload duration (ms)"
},
"totalTimeMs" : {
"type" : "number",
"format" : "float",
"description" : "total message duration inc. preamble and SFD (ms)"
},
"playing" : {
"type" : "integer",
"description" : "Boolean - modulator is active (playing) including idle time\n * 0 - Modulator not active\n * 1 - Modulator active\n"
}
},
"description" : "MeshtasticMod"
};
defs.MeshtasticModSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"bandwidthIndex" : {
"type" : "integer",
"description" : "standard bandwidths index:\n * 0 - 375 Hz (384000 / 1024)\n * 1 - 750 Hz (384000 / 512)\n * 2 - 1500 Hz (384000 / 256)\n * 3 - 2604 Hz (333333 / 128)\n * 4 - 3125 Hz (400000 / 128)\n * 5 - 3906 Hz (500000 / 128)\n * 6 - 5208 Hz (333333 / 64)\n * 7 - 6250 Hz (400000 / 64)\n * 8 - 7813 Hz (500000 / 64)\n * 9 - 10417 Hz (333333 / 32)\n * 10 - 12500 Hz (400000 / 32)\n * 11 - 15625 Hz (500000 / 32)\n * 12 - 20833 Hz (333333 / 16)\n * 13 - 25000 Hz (400000 / 16)\n * 14 - 31250 Hz (500000 / 16)\n * 15 - 41667 Hz (333333 / 8)\n * 16 - 50000 Hz (400000 / 8)\n * 17 - 62500 Hz (500000 / 8)\n * 18 - 83333 Hz (333333 / 4)\n * 19 - 100000 Hz (400000 / 4)\n * 20 - 125000 Hz (500000 / 4)\n * 21 - 166667 Hz (333333 / 2)\n * 22 - 200000 Hz (400000 / 2)\n * 23 - 250000 Hz (500000 / 2)\n * 24 - 333333 Hz (333333 / 1)\n * 25 - 400000 Hz (400000 / 1)\n * 26 - 500000 Hz (500000 / 1)\n"
},
"spreadFactor" : {
"type" : "integer"
},
"deBits" : {
"type" : "integer",
"description" : "Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol"
},
"preambleChirps" : {
"type" : "integer",
"description" : "Number of preamble chirps"
},
"quietMillis" : {
"type" : "integer",
"description" : "Number of milliseconds to pause between transmissions"
},
"syncWord" : {
"type" : "integer",
"description" : "2 byte (0..65535) synchronization syncWord"
},
"channelMute" : {
"type" : "integer",
"description" : "boolean"
},
"nbParityBits" : {
"type" : "integer",
"description" : "Hamming FEC parity bits (LoRa)"
},
"textMessage" : {
"type" : "string",
"description" : "freeform text message"
},
"messageRepeat" : {
"type" : "integer",
"description" : "number of repetitions of the same message (0 for infinite)"
},
"udpEnabled" : {
"type" : "integer",
"description" : "boolean 1 to enable forwarding messages via UDP else 0"
},
"udpAddress" : {
"type" : "string",
"description" : "UDP address to listen for messages to transmit on"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP port to listen for messages to transmit on"
},
"invertRamps" : {
"type" : "integer",
"description" : "Invert chirp ramps\n * 0 - Normal chirp ramps (upchirps for preamble and payload)\n * 1 - Inverted chirp ramps (downchirps for preamble and payload)\n"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
},
"channelMarker" : {
"$ref" : "#/definitions/ChannelMarker"
},
"rollupState" : {
"$ref" : "#/definitions/RollupState"
}
},
"description" : "MeshtasticMod"
};
defs.MetisMISOSettings = {
"properties" : {
@@ -59982,7 +60312,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2026-02-07T23:22:00.482+01:00
Generated 2026-03-22T19:58:59.376+01:00
</div>
</div>
</div>
@@ -69,6 +69,10 @@ ChannelReport:
$ref: "/doc/swagger/include/M17Demod.yaml#/M17DemodReport"
M17ModReport:
$ref: "/doc/swagger/include/M17Mod.yaml#/M17ModReport"
MeshtasticDemodReport:
$ref: "/doc/swagger/include/MeshtasticDemod.yaml#/MeshtasticDemodReport"
MeshtasticModReport:
$ref: "/doc/swagger/include/MeshtasticMod.yaml#/MeshtasticModReport"
NavtexDemodReport:
$ref: "/doc/swagger/include/NavtexDemod.yaml#/NavtexDemodReport"
NFMDemodReport:
@@ -87,6 +87,10 @@ ChannelSettings:
$ref: "/doc/swagger/include/M17Demod.yaml#/M17DemodSettings"
M17ModSettings:
$ref: "/doc/swagger/include/M17Mod.yaml#/M17ModSettings"
MeshtasticDemodSettings:
$ref: "/doc/swagger/include/MeshtasticDemod.yaml#/MeshtasticDemodSettings"
MeshtasticModSettings:
$ref: "/doc/swagger/include/MeshtasticMod.yaml#/MeshtasticModSettings"
NavtexDemodSettings:
$ref: "/doc/swagger/include/NavtexDemod.yaml#/NavtexDemodSettings"
NFMDemodSettings:
@@ -0,0 +1,187 @@
MeshtasticDemodSettings:
description: MeshtasticDemod
properties:
inputFrequencyOffset:
type: integer
format: int64
bandwidthIndex:
type: integer
description: >
standard bandwidths index:
* 0 - 375 Hz (384000 / 1024)
* 1 - 750 Hz (384000 / 512)
* 2 - 1500 Hz (384000 / 256)
* 3 - 2604 Hz (333333 / 128)
* 4 - 3125 Hz (400000 / 128)
* 5 - 3906 Hz (500000 / 128)
* 6 - 5208 Hz (333333 / 64)
* 7 - 6250 Hz (400000 / 64)
* 8 - 7813 Hz (500000 / 64)
* 9 - 10417 Hz (333333 / 32)
* 10 - 12500 Hz (400000 / 32)
* 11 - 15625 Hz (500000 / 32)
* 12 - 20833 Hz (333333 / 16)
* 13 - 25000 Hz (400000 / 16)
* 14 - 31250 Hz (500000 / 16)
* 15 - 41667 Hz (333333 / 8)
* 16 - 50000 Hz (400000 / 8)
* 17 - 62500 Hz (500000 / 8)
* 18 - 83333 Hz (333333 / 4)
* 19 - 100000 Hz (400000 / 4)
* 20 - 125000 Hz (500000 / 4)
* 21 - 166667 Hz (333333 / 2)
* 22 - 200000 Hz (400000 / 2)
* 23 - 250000 Hz (500000 / 2)
* 24 - 333333 Hz (333333 / 1)
* 25 - 400000 Hz (400000 / 1)
* 26 - 500000 Hz (500000 / 1)
spreadFactor:
type: integer
deBits:
description: Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol
type: integer
decodeActive:
description: boolean 1 to activate 0 to de-activate decoder
type: integer
eomSquelchTenths:
description: argmax squared magnitude is compared between current multiplied by this factor and maximum during decoding. This value is divided by 10
type: integer
nbSymbolsMax:
description: expected maximum number of symbols in a payload
type: integer
preambleChirps:
description: Number of expected preamble chirps
type: integer
nbParityBits:
description: Hamming FEC parity bits (LoRa)
type: integer
packetLength:
description: expected packet length in number of bytes (LoRa)
type: integer
sendViaUDP:
description: boolean 1 to send decoded message via UDP else 0
type: integer
udpEnabled:
type: integer
description: >
Boolean - Send via UDP
* 0 - Do not send decoded messages via UDP
* 1 - Send decoded messages via UDP
udpAddress:
description: UDP destination udpAddress
type: string
udpPort:
description: UDP destination port
type: integer
invertRamps:
type: integer
description: >
Invert chirp ramps
* 0 - Normal chirp ramps (upchirps for preamble and payload)
* 1 - Inverted chirp ramps (downchirps for preamble and payload)
rgbColor:
type: integer
title:
type: string
streamIndex:
description: MIMO channel. Not relevant when connected to SI (single Rx).
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
reverseAPIChannelIndex:
type: integer
spectrumConfig:
$ref: "/doc/swagger/include/GLSpectrum.yaml#/GLSpectrum"
channelMarker:
$ref: "/doc/swagger/include/ChannelMarker.yaml#/ChannelMarker"
rollupState:
$ref: "/doc/swagger/include/RollupState.yaml#/RollupState"
MeshtasticDemodReport:
description: MeshtasticDemod
properties:
channelPowerDB:
description: current de-chirped total channel power (dB)
type: number
format: float
noisePowerDB:
description: current de-chirped noise argmax power (dB)
type: number
format: float
signalPowerDB:
description: last message de-chirped signal argmax power (dB)
type: number
format: float
snrPowerDB:
description: last message de-chirped signal to noise ratio power (dB)
type: number
format: float
channelSampleRate:
type: integer
syncWord:
description: 2 bytes sync word (0..65535)
type: integer
nbParityBits:
description: Hamming FEC parity bits (LoRa)
type: integer
packetLength:
description: Packet length in number of bytes (LoRa)
type: integer
nbSymbols:
description: Number of symbols in the payload with header and CRC (LoRa)
type: integer
nbCodewords:
description: Number of codewords in the payload with header and CRC (LoRa)
type: integer
headerParityStatus:
type: integer
description: >
Header FEC parity status:
* 0 - Undefined
* 1 - Uncorrectable error
* 2 - Corrected error
* 3 - OK
headerCRCStatus:
description: header CRC check status. Boolean 1 if OK else 0
type: integer
payloadParityStatus:
type: integer
description: >
Payload FEC parity status:
* 0 - Undefined
* 1 - Uncorrectable error
* 2 - Corrected error
* 3 - OK
payloadCRCStatus:
description: payload CRC check status. Boolean 1 if OK else 0
type: integer
messageTimestamp:
description: timestamp of the last decoded message
type: string
messageString:
description: string representation of the last decoded message
type: string
frameType:
description: frame type shown in the GUI tree view (for example LORA_FRAME or POSITION_APP)
type: string
channelType:
description: Channel type code e.g. LONG_FAST
type: string
messageBytes:
description: bytes of the last decoded message as an array of hex string represented bytes (00..FF)
type: array
items:
type: string
decoding:
type: integer
description: >
Boolean - decoding status
* 0 - no decoding
* 1 - decoding
@@ -0,0 +1,128 @@
MeshtasticModSettings:
description: MeshtasticMod
properties:
inputFrequencyOffset:
type: integer
format: int64
bandwidthIndex:
type: integer
description: >
standard bandwidths index:
* 0 - 375 Hz (384000 / 1024)
* 1 - 750 Hz (384000 / 512)
* 2 - 1500 Hz (384000 / 256)
* 3 - 2604 Hz (333333 / 128)
* 4 - 3125 Hz (400000 / 128)
* 5 - 3906 Hz (500000 / 128)
* 6 - 5208 Hz (333333 / 64)
* 7 - 6250 Hz (400000 / 64)
* 8 - 7813 Hz (500000 / 64)
* 9 - 10417 Hz (333333 / 32)
* 10 - 12500 Hz (400000 / 32)
* 11 - 15625 Hz (500000 / 32)
* 12 - 20833 Hz (333333 / 16)
* 13 - 25000 Hz (400000 / 16)
* 14 - 31250 Hz (500000 / 16)
* 15 - 41667 Hz (333333 / 8)
* 16 - 50000 Hz (400000 / 8)
* 17 - 62500 Hz (500000 / 8)
* 18 - 83333 Hz (333333 / 4)
* 19 - 100000 Hz (400000 / 4)
* 20 - 125000 Hz (500000 / 4)
* 21 - 166667 Hz (333333 / 2)
* 22 - 200000 Hz (400000 / 2)
* 23 - 250000 Hz (500000 / 2)
* 24 - 333333 Hz (333333 / 1)
* 25 - 400000 Hz (400000 / 1)
* 26 - 500000 Hz (500000 / 1)
spreadFactor:
type: integer
deBits:
description: Low data rate optimize (DE) bits i.e. nb of FFT bins per effective symbol
type: integer
preambleChirps:
description: Number of preamble chirps
type: integer
quietMillis:
description: Number of milliseconds to pause between transmissions
type: integer
syncWord:
description: 2 byte (0..65535) synchronization syncWord
type: integer
channelMute:
description: boolean
type: integer
nbParityBits:
description: Hamming FEC parity bits (LoRa)
type: integer
textMessage:
description: freeform text message
type: string
messageRepeat:
description: number of repetitions of the same message (0 for infinite)
type: integer
udpEnabled:
description: boolean 1 to enable forwarding messages via UDP else 0
type: integer
udpAddress:
description: UDP address to listen for messages to transmit on
type: string
udpPort:
description: UDP port to listen for messages to transmit on
type: integer
invertRamps:
type: integer
description: >
Invert chirp ramps
* 0 - Normal chirp ramps (upchirps for preamble and payload)
* 1 - Inverted chirp ramps (downchirps for preamble and payload)
rgbColor:
type: integer
title:
type: string
streamIndex:
description: MIMO channel. Not relevant when connected to SI (single Rx).
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
reverseAPIChannelIndex:
type: integer
channelMarker:
$ref: "/doc/swagger/include/ChannelMarker.yaml#/ChannelMarker"
rollupState:
$ref: "/doc/swagger/include/RollupState.yaml#/RollupState"
MeshtasticModReport:
description: MeshtasticMod
properties:
channelPowerDB:
description: power transmitted in channel (dB)
type: number
format: float
channelSampleRate:
type: integer
symbolTimeMs:
description: symbol duration (ms)
type: number
format: float
payloadTimeMs:
description: payload duration (ms)
type: number
format: float
totalTimeMs:
description: total message duration inc. preamble and SFD (ms)
type: number
format: float
playing:
type: integer
description: >
Boolean - modulator is active (playing) including idle time
* 0 - Modulator not active
* 1 - Modulator active