mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-02-02 08:42:11 -08:00
Some information for how to use the protobufs topic
This commit is contained in:
parent
ca2365b650
commit
ee40ecec4d
|
@ -23,7 +23,7 @@ Packets may be encrypted. If you use the default meshtastic MQTT server, packets
|
||||||
|
|
||||||
IMPORTANT: When MQTT is turned on, you are potentially broadcasting your entire mesh traffic onto the public internet. This includes messages and position information.
|
IMPORTANT: When MQTT is turned on, you are potentially broadcasting your entire mesh traffic onto the public internet. This includes messages and position information.
|
||||||
|
|
||||||
### MQTT Topics
|
### MQTT [Topics](https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices)
|
||||||
|
|
||||||
If no specific [root topic](/docs/settings/moduleconfig/mqtt#root-topic) is configured, the default root topic will be `msh/`.
|
If no specific [root topic](/docs/settings/moduleconfig/mqtt#root-topic) is configured, the default root topic will be `msh/`.
|
||||||
Each device that is connected to MQTT will publish its MQTT state ("`online`"/"`offline`") to:
|
Each device that is connected to MQTT will publish its MQTT state ("`online`"/"`offline`") to:
|
||||||
|
@ -33,18 +33,18 @@ Each device that is connected to MQTT will publish its MQTT state ("`online`"/"`
|
||||||
For each channel where uplink and/or downlink is enabled two other topics might be used.
|
For each channel where uplink and/or downlink is enabled two other topics might be used.
|
||||||
|
|
||||||
#### Protobufs topic
|
#### Protobufs topic
|
||||||
A gateway node will uplink and/or downlink raw ([protobuf](https://developers.google.com/protocol-buffers)) packets to the topic:
|
A gateway node will uplink and/or downlink raw ([protobuf](https://developers.google.com/protocol-buffers)) MeshPackets to the topic:
|
||||||
|
|
||||||
`msh/2/c/CHANNELNAME/USERID`, where `CHANNELNAME` is the name of the channel.
|
`msh/2/c/CHANNELNAME/USERID`, where `CHANNELNAME` is the name of the channel.
|
||||||
|
|
||||||
For example: `msh/2/c/LongFast/!abcd1234`
|
For example: `msh/2/c/LongFast/!abcd1234`
|
||||||
|
|
||||||
The payload is a raw protobuf. Looking at the MQTT traffic with a program like `mosquitto_sub` will tell you it's working, but you won't get much useful information out of it. For example:
|
The payload is a raw protobuf, whose definitions for Meshtastic can be found [here](https://github.com/meshtastic/protobufs/blob/master/meshtastic). Reference guides for working with protobufs in several popular programming languages can be found [here](https://protobuf.dev/reference/). Looking at the MQTT traffic with a program like `mosquitto_sub` will tell you it's working, but you won't get much useful information out of it. For example:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
苓????"!
|
苓????"!
|
||||||
!937bed1cTanksTnk"D???05??=???aP`
|
!937bed1cTanksTnk"D???05??=???aP`
|
||||||
ShortFast !937bed1c
|
ShortFast !937bed1c
|
||||||
```
|
```
|
||||||
|
|
||||||
If [encryption_enabled](/docs/settings/moduleconfig/mqtt#encryption-enabled) is set to true, the packet will remain encrypted with the key for the specified channel.
|
If [encryption_enabled](/docs/settings/moduleconfig/mqtt#encryption-enabled) is set to true, the packet will remain encrypted with the key for the specified channel.
|
||||||
|
|
Loading…
Reference in a new issue