kopia lustrzana https://github.com/meshtastic/protobufs
Fix formatting
rodzic
cd55aa2633
commit
4da1621bee
31
admin.proto
31
admin.proto
|
@ -10,8 +10,8 @@ import "channel.proto";
|
|||
option java_outer_classname = "AdminProtos";
|
||||
|
||||
/*
|
||||
* This message is handled by the Admin plugin and is responsible for all settings/channel read/write operations. This message
|
||||
* is used to do settings operations to both remote AND local nodes.
|
||||
* This message is handled by the Admin plugin and is responsible for all settings/channel read/write operations.
|
||||
* This message is used to do settings operations to both remote AND local nodes.
|
||||
* (Prior to 1.2 these operations were done via special ToRadio operations)
|
||||
*/
|
||||
message AdminMessage {
|
||||
|
@ -29,12 +29,16 @@ message AdminMessage {
|
|||
User set_owner = 2;
|
||||
|
||||
/*
|
||||
* Set channels (using the new API). A special channel is the "primary channel". The other records are secondary channels.
|
||||
* Note: only one channel can be marked as primary. If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically */
|
||||
* Set channels (using the new API).
|
||||
* A special channel is the "primary channel".
|
||||
* The other records are secondary channels.
|
||||
* Note: only one channel can be marked as primary.
|
||||
* If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
|
||||
*/
|
||||
Channel set_channel = 3;
|
||||
|
||||
/*
|
||||
* Send the current RadioConfig in the response for this message
|
||||
* Send the current RadioConfig in the response for this message.
|
||||
*/
|
||||
bool get_radio_request = 4;
|
||||
RadioConfig get_radio_response = 5;
|
||||
|
@ -46,22 +50,23 @@ message AdminMessage {
|
|||
uint32 get_channel_request = 6;
|
||||
Channel get_channel_response = 7;
|
||||
|
||||
/* Setting channels/radio config remotely carries the risk that you might
|
||||
* send an invalid config and the radio never talks to your mesh again.
|
||||
* Therefore if setting either of these properties remotely, you must send
|
||||
* a confirm_xxx message within 10 minutes. If you fail to do so, the radio
|
||||
* will assume loss of comms and revert your changes.
|
||||
/*
|
||||
* Setting channels/radio config remotely carries the risk that you might send an invalid config and the radio never talks to your mesh again.
|
||||
* Therefore if setting either of these properties remotely, you must send a confirm_xxx message within 10 minutes.
|
||||
* If you fail to do so, the radio will assume loss of comms and revert your changes.
|
||||
* These messages are optional when changing the local node.
|
||||
*/
|
||||
bool confirm_set_channel = 32;
|
||||
bool confirm_set_radio = 33;
|
||||
|
||||
/* This message is only supported for the simulator porduino build. If received the
|
||||
* simulator will exit successfully/
|
||||
/*
|
||||
* This message is only supported for the simulator porduino build.
|
||||
* If received the simulator will exit successfully.
|
||||
*/
|
||||
bool exit_simulator = 34;
|
||||
|
||||
/** Tell the node to reboot in this many seconds (or <0 to cancel reboot)
|
||||
/*
|
||||
* Tell the node to reboot in this many seconds (or <0 to cancel reboot)
|
||||
*/
|
||||
int32 reboot_seconds = 35;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,10 @@ import "channel.proto";
|
|||
option java_outer_classname = "AppOnlyProtos";
|
||||
|
||||
/*
|
||||
* This is the most compact possible representation for a set of channels. It includes only one PRIMARY channel (which must be first) and
|
||||
* any SECONDARY channels. No DISABLED channels are included.
|
||||
* This is the most compact possible representation for a set of channels.
|
||||
* It includes only one PRIMARY channel (which must be first) and
|
||||
* any SECONDARY channels.
|
||||
* No DISABLED channels are included.
|
||||
* This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL
|
||||
*/
|
||||
message ChannelSet {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
syntax = "proto3";
|
||||
/*
|
||||
/*
|
||||
* Meshtastic protobufs
|
||||
*
|
||||
* For more information on protobufs (and tools to use them with the language of your choice) see
|
||||
|
@ -35,23 +35,24 @@ option java_outer_classname = "ChannelProtos";
|
|||
* channel - so that if the user changes anything about the channel (which does
|
||||
* force a new PSK) this letter will also change. Thus preventing user confusion if
|
||||
* two friends try to type in a channel name of "BobsChan" and then can't talk
|
||||
* because their PSKs will be different. The PSK is hashed into this letter by
|
||||
* "0x41 + [xor all bytes of the psk ] modulo 26"
|
||||
* because their PSKs will be different.
|
||||
* The PSK is hashed into this letter by "0x41 + [xor all bytes of the psk ] modulo 26"
|
||||
* This also allows the option of someday if people have the PSK off (zero), the
|
||||
* users COULD type in a channel name and be able to talk.
|
||||
* Y is a lower case letter from a-z that represents the channel 'speed' settings
|
||||
* (for some future definition of speed)
|
||||
*
|
||||
* FIXME: Add description of multi-channel support and how primary vs secondary channels are used.
|
||||
* FIXME: explain how apps use channels for security. explain how remote settings and
|
||||
* remote gpio are managed as an example
|
||||
* FIXME: explain how apps use channels for security.
|
||||
* explain how remote settings and remote gpio are managed as an example
|
||||
*/
|
||||
message ChannelSettings {
|
||||
|
||||
/*
|
||||
* If zero then, use default max legal continuous power (ie. something that won't
|
||||
* burn out the radio hardware)
|
||||
* In most cases you should use zero here. Units are in dBm.
|
||||
* In most cases you should use zero here.
|
||||
* Units are in dBm.
|
||||
*/
|
||||
int32 tx_power = 1;
|
||||
|
||||
|
@ -104,19 +105,21 @@ message ChannelSettings {
|
|||
uint32 bandwidth = 6;
|
||||
|
||||
/*
|
||||
* A number from 7 to 12. Indicates number of chirps per symbol as
|
||||
* 1<<spread_factor.
|
||||
* A number from 7 to 12.
|
||||
* Indicates number of chirps per symbol as 1<<spread_factor.
|
||||
*/
|
||||
uint32 spread_factor = 7;
|
||||
|
||||
/*
|
||||
* The denominator of the coding rate. ie for 4/8, the value is 8. 5/8 the value is 5.
|
||||
* The denominator of the coding rate.
|
||||
* ie for 4/8, the value is 8. 5/8 the value is 5.
|
||||
*/
|
||||
uint32 coding_rate = 8;
|
||||
|
||||
/* NOTE: this field is _independent_ and unrelated to the concepts in channel.proto.
|
||||
* this is controlling the actual hardware frequency the radio is transmitting on. In a perfect world
|
||||
* we would have called it something else (band?) but I forgot to make this change during the big 1.2 renaming.
|
||||
/*
|
||||
* NOTE: this field is _independent_ and unrelated to the concepts in channel.proto.
|
||||
* this is controlling the actual hardware frequency the radio is transmitting on.
|
||||
* In a perfect world we would have called it something else (band?) but I forgot to make this change during the big 1.2 renaming.
|
||||
* Most users should never need to be exposed to this field/concept.
|
||||
* A channel number between 1 and 13 (or whatever the max is in the current
|
||||
* region). If ZERO then the rule is "use the old channel name hash based
|
||||
|
@ -136,38 +139,43 @@ message ChannelSettings {
|
|||
uint32 channel_num = 9;
|
||||
|
||||
/*
|
||||
* A simple pre-shared key for now for crypto. Must be either 0 bytes (no
|
||||
* crypto), 16 bytes (AES128), or 32 bytes (AES256)
|
||||
* A simple pre-shared key for now for crypto.
|
||||
* Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256).
|
||||
* A special shorthand is used for 1 byte long psks.
|
||||
* These psks should be treated as only minimally secure,
|
||||
* because they are listed in this source code. Those bytes are mapped using the following scheme:
|
||||
* because they are listed in this source code.
|
||||
* Those bytes are mapped using the following scheme:
|
||||
* `0` = No crypto
|
||||
* `1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf}
|
||||
* `2` through 10 = The default channel key, except with 1 through 9 added to the last byte. Shown to user as simple1 through 10
|
||||
* `2` through 10 = The default channel key, except with 1 through 9 added to the last byte.
|
||||
* Shown to user as simple1 through 10
|
||||
*/
|
||||
bytes psk = 4;
|
||||
|
||||
/*
|
||||
* A SHORT name that will be packed into the URL. Less than 12 bytes.
|
||||
* A SHORT name that will be packed into the URL.
|
||||
* Less than 12 bytes.
|
||||
* Something for end users to call the channel
|
||||
* If this is the empty string it is assumed that this channel
|
||||
* is the special (minimally secure) "Default"channel.
|
||||
* In user interfaces it should be rendered as a local language translation of "X". For channel_num
|
||||
* hashing empty string will be treated as "X".
|
||||
* In user interfaces it should be rendered as a local language translation of "X".
|
||||
* For channel_num hashing empty string will be treated as "X".
|
||||
* Where "X" is selected based on the English words listed above for ModemConfig
|
||||
*/
|
||||
string name = 5;
|
||||
|
||||
/*
|
||||
* Used to construct a globally unique channel ID. The full globally unique ID will be: "name.id"
|
||||
* where ID is shown as base36. Assuming that the number of meshtastic users is below 20K (true for a long time)
|
||||
* the chance of this 64 bit random number colliding with anyone else is super low. And the penalty for
|
||||
* collision is low as well, it just means that anyone trying to decrypt channel messages might need to
|
||||
* Used to construct a globally unique channel ID.
|
||||
* The full globally unique ID will be: "name.id" where ID is shown as base36.
|
||||
* Assuming that the number of meshtastic users is below 20K (true for a long time)
|
||||
* the chance of this 64 bit random number colliding with anyone else is super low.
|
||||
* And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to
|
||||
* try multiple candidate channels.
|
||||
* Any time a non wire compatible change is made to a channel, this field should be regenerated.
|
||||
* There are a small number of 'special' globally known (and fairly) insecure standard channels.
|
||||
* There are a small number of 'special' globally known (and fairly) insecure standard channels.
|
||||
* Those channels do not have a numeric id included in the settings, but instead it is pulled from
|
||||
* a table of well known IDs. (see Well Known Channels FIXME)
|
||||
* a table of well known IDs.
|
||||
* (see Well Known Channels FIXME)
|
||||
*/
|
||||
fixed32 id = 10;
|
||||
|
||||
|
@ -190,12 +198,14 @@ message Channel {
|
|||
/*
|
||||
* How this channel is being used (or not).
|
||||
*
|
||||
* Note: this field is an enum to give us options for the future. In particular, someday
|
||||
* we might make a 'SCANNING' option. SCANNING channels could have different frequencies and the radio would
|
||||
* Note: this field is an enum to give us options for the future.
|
||||
* In particular, someday we might make a 'SCANNING' option.
|
||||
* SCANNING channels could have different frequencies and the radio would
|
||||
* occasionally check that freq to see if anything is being transmitted.
|
||||
*
|
||||
* For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow
|
||||
* cross band routing as needed. If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
|
||||
* cross band routing as needed.
|
||||
* If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
|
||||
* (but any number of SECONDARY channels can't be sent received on that common frequency)
|
||||
*/
|
||||
enum Role {
|
||||
|
@ -210,8 +220,8 @@ message Channel {
|
|||
PRIMARY = 1;
|
||||
|
||||
/*
|
||||
* Secondary channels are only used for encryption/decryption/authentication purposes. Their radio settings (freq etc)
|
||||
* are ignored, only psk is used.
|
||||
* Secondary channels are only used for encryption/decryption/authentication purposes.
|
||||
* Their radio settings (freq etc) are ignored, only psk is used.
|
||||
*/
|
||||
SECONDARY = 2;
|
||||
}
|
||||
|
|
|
@ -9,14 +9,17 @@ import "radioconfig.proto";
|
|||
|
||||
option java_outer_classname = "DeviceOnly";
|
||||
|
||||
/* This is a stub version of the old 1.1 representation of RadioConfig. But only keeping the region info. The device firmware uses
|
||||
this stub while migrating old nodes to the new preferences system.
|
||||
*/
|
||||
/*
|
||||
* This is a stub version of the old 1.1 representation of RadioConfig.
|
||||
* But only keeping the region info.
|
||||
* The device firmware uses this stub while migrating old nodes to the new preferences system.
|
||||
*/
|
||||
message LegacyRadioConfig {
|
||||
message LegacyPreferences {
|
||||
|
||||
/*
|
||||
* The region code for my radio (US, CN, EU433, etc...)
|
||||
*/
|
||||
* The region code for my radio (US, CN, EU433, etc...)
|
||||
*/
|
||||
RegionCode region = 15;
|
||||
}
|
||||
|
||||
|
@ -37,7 +40,9 @@ message DeviceState {
|
|||
*/
|
||||
reserved 12;
|
||||
|
||||
// Moved to its own file, but we keep this here so we can automatically migrate old radio.region settings
|
||||
/*
|
||||
* Moved to its own file, but we keep this here so we can automatically migrate old radio.region settings
|
||||
*/
|
||||
LegacyRadioConfig legacyRadio = 1;
|
||||
|
||||
/*
|
||||
|
@ -72,8 +77,8 @@ message DeviceState {
|
|||
MeshPacket rx_text_message = 7;
|
||||
|
||||
/*
|
||||
* Used only during development. Indicates developer is testing and changes
|
||||
* should never be saved to flash.
|
||||
* Used only during development.
|
||||
* Indicates developer is testing and changes should never be saved to flash.
|
||||
*/
|
||||
bool no_save = 9;
|
||||
|
||||
|
@ -83,7 +88,9 @@ message DeviceState {
|
|||
bool did_gps_reset = 11;
|
||||
}
|
||||
|
||||
/** The on-disk saved channels */
|
||||
/*
|
||||
* The on-disk saved channels
|
||||
*/
|
||||
message ChannelFile {
|
||||
/*
|
||||
* The channels our node knows about
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*RouteDiscovery.route max_count:8
|
||||
|
||||
# FIXME, max out based on total Data size And do fragmentation and reassembly (for larger payloads) at the Android layer, not the esp32 layer.
|
||||
# note: this payload length is ONLY the bytes that are sent inside of the radiohead packet. The 16 byte header is outside of this envelope
|
||||
# note: this payload length is ONLY the bytes that are sent inside of the radiohead packet. The 16 byte header is outside of this envelope
|
||||
*Data.payload max_size:237
|
||||
|
||||
# Big enough for 1.2.28.568032c-d
|
||||
|
|
167
mesh.proto
167
mesh.proto
|
@ -1,5 +1,5 @@
|
|||
syntax = "proto3";
|
||||
/*
|
||||
/*
|
||||
* Meshtastic protobufs
|
||||
*
|
||||
* For more information on protobufs (and tools to use them with the language of your choice) see
|
||||
|
@ -74,10 +74,10 @@ message Position {
|
|||
fixed32 time = 9;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Note: these enum names must EXACTLY match the string used in the device
|
||||
* bin/build-all.sh script. Because they will be used to find firmware filenames
|
||||
* in the android app for OTA updates.
|
||||
* bin/build-all.sh script.
|
||||
* Because they will be used to find firmware filenames in the android app for OTA updates.
|
||||
* To match the old style filenames, _ is converted to -, p is converted to .
|
||||
*/
|
||||
enum HardwareModel {
|
||||
|
@ -92,15 +92,19 @@ message Position {
|
|||
TLORA_V1_1p3 = 8;
|
||||
RAK4631 = 9;
|
||||
|
||||
// Less common/prototype boards listed here (needs one more byte over the air)
|
||||
/*
|
||||
* Less common/prototype boards listed here (needs one more byte over the air)
|
||||
*/
|
||||
LORA_RELAY_V1 = 32;
|
||||
NRF52840DK = 33;
|
||||
PPR = 34;
|
||||
GENIEBLOCKS = 35;
|
||||
NRF52_UNKNOWN = 36;
|
||||
PORTDUINO = 37;
|
||||
|
||||
// The simulator built into the android app
|
||||
|
||||
/*
|
||||
* The simulator built into the android app
|
||||
*/
|
||||
ANDROID_SIM = 38;
|
||||
}
|
||||
|
||||
|
@ -117,8 +121,8 @@ message Position {
|
|||
* occurred and the following steps should happen:
|
||||
*
|
||||
* If the receiving node (that was already in the mesh)'s macaddr is LOWER than the
|
||||
* new User who just tried to sign in: it gets to keep its nodenum. We send a
|
||||
* broadcast message of OUR User (we use a broadcast so that the other node can
|
||||
* new User who just tried to sign in: it gets to keep its nodenum.
|
||||
* We send a broadcast message of OUR User (we use a broadcast so that the other node can
|
||||
* receive our message, considering we have the same id - it also serves to let
|
||||
* observers correct their nodedb) - this case is rare so it should be okay.
|
||||
*
|
||||
|
@ -133,9 +137,8 @@ message Position {
|
|||
message User {
|
||||
|
||||
/*
|
||||
* A globally unique ID string for this user. In the case of
|
||||
* Signal that would mean +16504442323, for the default macaddr
|
||||
* derived id it would be !<8 hexidecimal bytes>
|
||||
* A globally unique ID string for this user.
|
||||
* In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>.
|
||||
* Note: app developers are encouraged to also use the following standard
|
||||
* node IDs "^all" (for broadcast), "^local" (for the locally connected node)
|
||||
*/
|
||||
|
@ -147,26 +150,29 @@ message User {
|
|||
string long_name = 2;
|
||||
|
||||
/*
|
||||
* A VERY short name, ideally two characters. Suitable for a tiny OLED screen
|
||||
* A VERY short name, ideally two characters.
|
||||
* Suitable for a tiny OLED screen
|
||||
*/
|
||||
string short_name = 3;
|
||||
|
||||
/*
|
||||
* This is the addr of the radio. Not populated by the phone,
|
||||
* but added by the esp32 when broadcasting
|
||||
* This is the addr of the radio.
|
||||
* Not populated by the phone, but added by the esp32 when broadcasting
|
||||
*/
|
||||
bytes macaddr = 4;
|
||||
|
||||
/*
|
||||
* TBEAM, HELTEC, etc...
|
||||
* Starting in 1.2.11 moved to hw_model enum in the NodeInfo object. Apps will still need the string here for older builds
|
||||
* Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.
|
||||
* Apps will still need the string here for older builds
|
||||
* (so OTA update can find the right image), but if the enum is available it will be used instead.
|
||||
*/
|
||||
HardwareModel hw_model = 6;
|
||||
|
||||
/*
|
||||
* In some regions HAM radio operators have different bandwidth limitations than others. If this user is a licensed operator,
|
||||
* set this flag. Also, "long_name" should be their licence number.
|
||||
* In some regions HAM radio operators have different bandwidth limitations than others.
|
||||
* If this user is a licensed operator, set this flag.
|
||||
* Also, "long_name" should be their licence number.
|
||||
*/
|
||||
bool is_licensed = 7;
|
||||
}
|
||||
|
@ -271,8 +277,8 @@ message Routing {
|
|||
* Deprecated - this has been replced with error_reason == NONE && request_id != 0
|
||||
* This is an ack.
|
||||
* This packet is a requested acknoledgement indicating that we have received
|
||||
* the specified message ID. This packet type can be used both for immediate
|
||||
* (0 hops) messages or can be routed through multiple hops if dest is set.
|
||||
* the specified message ID.
|
||||
* This packet type can be used both for immediate (0 hops) messages or can be routed through multiple hops if dest is set.
|
||||
* Note: As an optimization, recipients can _also_ populate a field in payload
|
||||
* if they think the recipient would appreciate that extra state.
|
||||
*
|
||||
|
@ -316,8 +322,8 @@ message Data {
|
|||
* The address of the destination node.
|
||||
* This field is is filled in by the mesh radio device software, application
|
||||
* layer software should never need it.
|
||||
* RouteDiscovery messages _must_ populate this. Other message types might need
|
||||
* to if they are doing multihop routing.
|
||||
* RouteDiscovery messages _must_ populate this.
|
||||
* Other message types might need to if they are doing multihop routing.
|
||||
*/
|
||||
fixed32 dest = 4;
|
||||
|
||||
|
@ -329,8 +335,8 @@ message Data {
|
|||
fixed32 source = 5;
|
||||
|
||||
/*
|
||||
* Only used in routing or response messages. Indicates the original message ID that
|
||||
* this message is reporting failure on. (formerly called original_id)
|
||||
* Only used in routing or response messages.
|
||||
* Indicates the original message ID that this message is reporting failure on. (formerly called original_id)
|
||||
*/
|
||||
fixed32 request_id = 6;
|
||||
}
|
||||
|
@ -343,8 +349,8 @@ message Data {
|
|||
message MeshPacket {
|
||||
|
||||
/*
|
||||
* The priority of this message for sending. Higher priorities are sent first
|
||||
* (when managing the transmit queue).
|
||||
* The priority of this message for sending.
|
||||
* Higher priorities are sent first (when managing the transmit queue).
|
||||
* This field is never sent over the air, it is only used internally inside of a local device node.
|
||||
* API clients (either on the local node or connected directly to the node)
|
||||
* can set this parameter if necessary.
|
||||
|
@ -402,8 +408,8 @@ message MeshPacket {
|
|||
|
||||
/*
|
||||
* The sending node number.
|
||||
* Note: Our crypto implementation uses this field as well. See
|
||||
* docs/software/crypto.md for details.
|
||||
* Note: Our crypto implementation uses this field as well.
|
||||
* See docs/software/crypto.md for details.
|
||||
* FIXME - really should be fixed32 instead, this encoding only hurts the ble link though.
|
||||
*/
|
||||
fixed32 from = 1;
|
||||
|
@ -415,19 +421,19 @@ message MeshPacket {
|
|||
fixed32 to = 2;
|
||||
|
||||
/*
|
||||
* (Usually) If set, this indicates the index in the secondary_channels table that this packet
|
||||
* was sent/received on. If unset, packet was on the primary channel.
|
||||
* A particular node might know only a subset of channels in use on the mesh. Therefore channel_index
|
||||
* is inherently a local concept and meaningless to send between nodes.
|
||||
* (Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on.
|
||||
* If unset, packet was on the primary channel.
|
||||
* A particular node might know only a subset of channels in use on the mesh.
|
||||
* Therefore channel_index is inherently a local concept and meaningless to send between nodes.
|
||||
* Very briefly, while sending and receiving deep inside the device Router code, this field instead
|
||||
* contains the 'channel hash' instead of the index. This 'trick' is only used while the payloadVariant is
|
||||
* an 'encrypted'.
|
||||
* contains the 'channel hash' instead of the index.
|
||||
* This 'trick' is only used while the payloadVariant is an 'encrypted'.
|
||||
*/
|
||||
uint32 channel = 3;
|
||||
|
||||
/*
|
||||
* Internally to the mesh radios we will route SubPackets encrypted per
|
||||
* docs/software/crypto.md. However, when a particular node has the correct
|
||||
* Internally to the mesh radios we will route SubPackets encrypted per docs/software/crypto.md.
|
||||
* However, when a particular node has the correct
|
||||
* key to decode a particular packet, it will decode the payload into a SubPacket protobuf structure.
|
||||
* Software outside of the device nodes will never encounter a packet where
|
||||
* "decoded" is not populated (i.e. any encryption/decryption happens before reaching the applications)
|
||||
|
@ -440,29 +446,31 @@ message MeshPacket {
|
|||
}
|
||||
|
||||
/*
|
||||
* A unique ID for this packet. Always 0 for no-ack packets or non broadcast
|
||||
* packets (and therefore take zero bytes of space). Otherwise a unique ID for
|
||||
* this packet, useful for flooding algorithms.
|
||||
* A unique ID for this packet.
|
||||
* Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space).
|
||||
* Otherwise a unique ID for this packet, useful for flooding algorithms.
|
||||
* ID only needs to be unique on a _per sender_ basis, and it only
|
||||
* needs to be unique for a few minutes (long enough to last for the length of
|
||||
* any ACK or the completion of a mesh broadcast flood).
|
||||
* Note: Our crypto implementation uses this id as well. See docs/software/crypto.md for details.
|
||||
* Note: Our crypto implementation uses this id as well.
|
||||
* See docs/software/crypto.md for details.
|
||||
* FIXME - really should be fixed32 instead, this encoding only
|
||||
* hurts the ble link though.
|
||||
*/
|
||||
fixed32 id = 6;
|
||||
|
||||
/*
|
||||
* The time this message was received by the esp32 (secs since 1970). Note:
|
||||
* this field is _never_ sent on the radio link itself (to save space) Times
|
||||
* The time this message was received by the esp32 (secs since 1970).
|
||||
* Note: this field is _never_ sent on the radio link itself (to save space) Times
|
||||
* are typically not sent over the mesh, but they will be added to any Packet
|
||||
* (chain of SubPacket) sent to the phone (so the phone can know exact time of reception)
|
||||
*/
|
||||
fixed32 rx_time = 7;
|
||||
|
||||
/*
|
||||
* *Never* sent over the radio links. Set during reception to indicate the SNR
|
||||
* of this packet. Used to collect statistics on current link quality.
|
||||
* *Never* sent over the radio links.
|
||||
* Set during reception to indicate the SNR of this packet.
|
||||
* Used to collect statistics on current link quality.
|
||||
*/
|
||||
float rx_snr = 8;
|
||||
|
||||
|
@ -475,16 +483,14 @@ message MeshPacket {
|
|||
uint32 hop_limit = 10;
|
||||
|
||||
/*
|
||||
* This packet is being sent as a reliable message, we would prefer it to arrive
|
||||
* at the destination. We would like to receive a ack packet in response.
|
||||
* This packet is being sent as a reliable message, we would prefer it to arrive at the destination.
|
||||
* We would like to receive a ack packet in response.
|
||||
* Broadcasts messages treat this flag specially: Since acks for broadcasts would
|
||||
* rapidly flood the channel, the normal ack behavior is suppressed. Instead,
|
||||
* the original sender listens to see if at least one node is rebroadcasting this
|
||||
* packet (because naive flooding algorithm). If it hears that the odds (given
|
||||
* typical LoRa topologies) the odds are very high that every node should
|
||||
* eventually receive the message. So FloodingRouter.cpp generates an implicit
|
||||
* ack which is delivered to the original sender. If after some time we don't
|
||||
* hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic.
|
||||
* rapidly flood the channel, the normal ack behavior is suppressed.
|
||||
* Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm).
|
||||
* If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message.
|
||||
* So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender.
|
||||
* If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic.
|
||||
* Note: This flag is normally sent in a flag bit in the header when sent over the wire
|
||||
*/
|
||||
bool want_ack = 11;
|
||||
|
@ -556,8 +562,8 @@ message NodeInfo {
|
|||
User user = 2;
|
||||
|
||||
/*
|
||||
* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time.
|
||||
* That is no longer true. Position.time now indicates the last time we received a POSITION from that node.
|
||||
* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
|
||||
* Position.time now indicates the last time we received a POSITION from that node.
|
||||
*/
|
||||
Position position = 3;
|
||||
|
||||
|
@ -592,7 +598,9 @@ message NodeInfo {
|
|||
* fixed32 next_hop = 5;
|
||||
*/
|
||||
|
||||
/** Set to indicate the last time we received a packet from this node */
|
||||
/*
|
||||
* Set to indicate the last time we received a packet from this node
|
||||
*/
|
||||
fixed32 last_heard = 4;
|
||||
}
|
||||
|
||||
|
@ -648,7 +656,9 @@ enum CriticalErrorCode {
|
|||
*/
|
||||
TransmitFailed = 8;
|
||||
|
||||
/* We detected that the main CPU voltage dropped below the minumum acceptable value */
|
||||
/*
|
||||
* We detected that the main CPU voltage dropped below the minumum acceptable value
|
||||
*/
|
||||
Brownout = 9;
|
||||
|
||||
}
|
||||
|
@ -667,13 +677,15 @@ message MyNodeInfo {
|
|||
uint32 my_node_num = 1;
|
||||
|
||||
/*
|
||||
* Note: This flag merely means we detected a hardware GPS in our node. Not the same as UserPreferences.location_sharing
|
||||
* Note: This flag merely means we detected a hardware GPS in our node.
|
||||
* Not the same as UserPreferences.location_sharing
|
||||
*/
|
||||
bool has_gps = 2;
|
||||
|
||||
/*
|
||||
* # of frequencies that can be used (set at build time in the device flash image). Note: this is different from max_channels, this field
|
||||
* is telling the # of frequency bands this node can use. (old name was num_channels)
|
||||
* # of frequencies that can be used (set at build time in the device flash image).
|
||||
* Note: this is different from max_channels, this field is telling the # of frequency bands this node can use.
|
||||
* (old name was num_channels)
|
||||
*/
|
||||
uint32 num_bands = 3;
|
||||
|
||||
|
@ -685,17 +697,18 @@ message MyNodeInfo {
|
|||
/*
|
||||
* Deprecated! ONLY USED IN DEVICE CODE (for upgrading old 1.0 firmwares) DO NOT READ ELSEWHERE.
|
||||
* The region code for my radio (US, CN, etc...)
|
||||
* Note: This string is deprecated. The 1.0 builds populate it based on the
|
||||
* flashed firmware name. But for newer builds this string will be unpopulated
|
||||
* (missing/null). For those builds you should instead look at the new
|
||||
* read/write region enum in UserSettings
|
||||
* Note: This string is deprecated.
|
||||
* The 1.0 builds populate it based on the flashed firmware name.
|
||||
* But for newer builds this string will be unpopulated (missing/null).
|
||||
* For those builds you should instead look at the new read/write region enum in UserSettings
|
||||
* The format of this string was 1.0-US or 1.0-CN etc.. Or empty string if unset.
|
||||
*/
|
||||
string region = 4 [deprecated = true];
|
||||
|
||||
/*
|
||||
* TBEAM, HELTEC, etc...
|
||||
* Starting in 1.2.11 moved to hw_model enum in the NodeInfo object. Apps will still need the string here for older builds
|
||||
* Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.
|
||||
* Apps will still need the string here for older builds
|
||||
* (so OTA update can find the right image), but if the enum is available it will be used instead.
|
||||
*/
|
||||
string hw_model_deprecated = 5 [deprecated = true];
|
||||
|
@ -735,15 +748,14 @@ message MyNodeInfo {
|
|||
/*
|
||||
* How long before we consider a message abandoned and we can clear our
|
||||
* caches of any messages in flight Normally quite large to handle the worst case
|
||||
* message delivery time, 5 minutes. Formerly called FLOOD_EXPIRE_TIME in the
|
||||
* device code
|
||||
* message delivery time, 5 minutes.
|
||||
* Formerly called FLOOD_EXPIRE_TIME in the device code
|
||||
*/
|
||||
uint32 message_timeout_msec = 13;
|
||||
|
||||
/*
|
||||
* The minimum app version that can talk to this device. Phone/PC apps should
|
||||
* compare this to their build number and if too low tell the user they must
|
||||
* update their app
|
||||
* The minimum app version that can talk to this device.
|
||||
* Phone/PC apps should compare this to their build number and if too low tell the user they must update their app
|
||||
*/
|
||||
uint32 min_app_version = 14;
|
||||
|
||||
|
@ -842,12 +854,13 @@ message FromRadio {
|
|||
* sent as true once the device has finished sending all of the responses to want_config
|
||||
* recipient should check if this ID matches our original request nonce, if
|
||||
* not, it means your config responses haven't started yet.
|
||||
* NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps.
|
||||
* NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps.
|
||||
*/
|
||||
uint32 config_complete_id = 8;
|
||||
|
||||
/*
|
||||
* Sent to tell clients the radio has just rebooted. Set to true if present.
|
||||
* Sent to tell clients the radio has just rebooted.
|
||||
* Set to true if present.
|
||||
* Not used on all transports, currently just used for the serial console.
|
||||
* NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps.
|
||||
*/
|
||||
|
@ -873,7 +886,8 @@ message ToRadio {
|
|||
uint32 app_version = 1;
|
||||
|
||||
/*
|
||||
* True if the peer device can gateway MQTT packets. If true, the device will not try to send packets to the internet directly,
|
||||
* True if the peer device can gateway MQTT packets.
|
||||
* If true, the device will not try to send packets to the internet directly,
|
||||
* instead it will pass the packets to the peer for dispatching.
|
||||
* This feature is optional, if set to false the device will assume the client can not gateway to MQTT.
|
||||
*/
|
||||
|
@ -894,7 +908,8 @@ message ToRadio {
|
|||
MeshPacket packet = 2;
|
||||
|
||||
/*
|
||||
* Information about the peer, sent after the phone sneds want_config_id. Old clients do not send this, which is fine.
|
||||
* Information about the peer, sent after the phone sneds want_config_id.
|
||||
* Old clients do not send this, which is fine.
|
||||
*/
|
||||
PeerInfo peer_info = 3;
|
||||
|
||||
|
@ -911,8 +926,8 @@ message ToRadio {
|
|||
uint32 want_config_id = 100;
|
||||
|
||||
/*
|
||||
* Tell API server we are disconnecting now. This is useful for serial links where there is no hardware/protocol based
|
||||
* notification that the client has dropped the link.
|
||||
* Tell API server we are disconnecting now.
|
||||
* This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link.
|
||||
* (Sending this message is optional for clients)
|
||||
*/
|
||||
bool disconnect = 104;
|
||||
|
|
|
@ -5,8 +5,8 @@ syntax = "proto3";
|
|||
*/
|
||||
|
||||
/*
|
||||
* Placeholder for data we will eventually set during initial programming. This
|
||||
* will allow us to stop having a load for each region.
|
||||
* Placeholder for data we will eventually set during initial programming.
|
||||
* This will allow us to stop having a load for each region.
|
||||
*/
|
||||
message ManufacturingData {
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ option optimize_for = LITE_RUNTIME;
|
|||
* unique 'portnum' for their application.
|
||||
*
|
||||
* If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this
|
||||
* master table. PortNums should be assigned in the following range:
|
||||
* master table.
|
||||
* PortNums should be assigned in the following range:
|
||||
*
|
||||
* 0-63 Core Meshtastic use, do not use for third party apps
|
||||
* 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to register your application
|
||||
|
@ -42,8 +43,8 @@ enum PortNum {
|
|||
/*
|
||||
* A message receive acknowledgment, sent in cleartext - allows radio to
|
||||
* show user that a message has been read by the recipient, optional
|
||||
* Note: this concept has been removed for now. Once READACK is implemented, use the
|
||||
* new packet type/port number stuff?
|
||||
* Note: this concept has been removed for now.
|
||||
* Once READACK is implemented, use the new packet type/port number stuff?
|
||||
* @exclude
|
||||
* CLEAR_READACK = 2;
|
||||
* Reserved for built-in GPIO/example app.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
syntax = "proto3";
|
||||
/*
|
||||
/*
|
||||
* Meshtastic protobufs
|
||||
*
|
||||
* For more information on protobufs (and tools to use them with the language of your choice) see
|
||||
|
@ -77,7 +77,8 @@ enum ChargeCurrent {
|
|||
|
||||
/*
|
||||
* How the GPS hardware in this unit is operated.
|
||||
* Note: This is independent of how our location is shared with other devices. For that see LocationSharing
|
||||
* Note: This is independent of how our location is shared with other devices.
|
||||
* For that see LocationSharing
|
||||
*/
|
||||
enum GpsOperation {
|
||||
|
||||
|
@ -111,7 +112,7 @@ enum GpsOperation {
|
|||
GpsOpDisabled = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* How our location is shared with other nodes (or the local phone)
|
||||
*/
|
||||
enum LocationSharing {
|
||||
|
@ -246,7 +247,8 @@ message RadioConfig {
|
|||
ChargeCurrent charge_current = 16;
|
||||
|
||||
/*
|
||||
* Are we operating as a router. Changes behavior in the following ways:
|
||||
* Are we operating as a router.
|
||||
* Changes behavior in the following ways:
|
||||
* The device will only sleep for critically low battery level (i.e. always tries to stay alive for the mesh)
|
||||
* In the future routing decisions will preferentially route packets through nodes with this attribute (because assumed
|
||||
* good line of sight)
|
||||
|
@ -255,14 +257,14 @@ message RadioConfig {
|
|||
|
||||
/*
|
||||
* If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in
|
||||
* we should try to minimize power consumption as much as possible. YOU DO NOT NEED TO SET THIS IF YOU'VE
|
||||
* set is_router (it is implied in that case).
|
||||
* we should try to minimize power consumption as much as possible.
|
||||
* YOU DO NOT NEED TO SET THIS IF YOU'VE set is_router (it is implied in that case).
|
||||
*/
|
||||
bool is_low_power = 38;
|
||||
|
||||
/*
|
||||
* If set, this node is at a fixed position. We will generate GPS position updates
|
||||
* at the regular interval, but use whatever the last lat/lon/alt we have for the node.
|
||||
* If set, this node is at a fixed position.
|
||||
* We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node.
|
||||
* The lat/lon/alt can be set by an internal GPS or with the help of the app.
|
||||
*/
|
||||
bool fixed_position = 39;
|
||||
|
@ -279,7 +281,8 @@ message RadioConfig {
|
|||
|
||||
/*
|
||||
* How the GPS hardware in this unit is operated.
|
||||
* Note: This is independent of how our location is shared with other devices. For that see LocationSharing
|
||||
* Note: This is independent of how our location is shared with other devices.
|
||||
* For that see LocationSharing
|
||||
*/
|
||||
GpsOperation gps_operation = 33;
|
||||
|
||||
|
@ -298,33 +301,35 @@ message RadioConfig {
|
|||
*/
|
||||
uint32 gps_attempt_time = 36;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This parameter is for advanced users with advanced test equipment, we do not recommend most users use it.
|
||||
* A frequency offset that is added to to the calculated band center frequency. Used to correct for crystal calibration errors.
|
||||
* A frequency offset that is added to to the calculated band center frequency.
|
||||
* Used to correct for crystal calibration errors.
|
||||
*/
|
||||
float frequency_offset = 41;
|
||||
|
||||
/**
|
||||
* The server to use for our MQTT global message gateway feature. If not set, the default server will be used
|
||||
*/
|
||||
/*
|
||||
* The server to use for our MQTT global message gateway feature.
|
||||
* If not set, the default server will be used
|
||||
*/
|
||||
string mqtt_server = 42;
|
||||
|
||||
/**
|
||||
/*
|
||||
* If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as
|
||||
* is_uplink_enabled or is_downlink_enabled.
|
||||
* is_uplink_enabled or is_downlink_enabled.
|
||||
* But if this flag is set, all MQTT features will be disabled and no servers will be contacted.
|
||||
*/
|
||||
bool mqtt_disabled = 43;
|
||||
|
||||
/*
|
||||
* This setting is never saved to disk, but if set, all device settings will be
|
||||
* returned to factory defaults. (Region, serial number etc... will be preserved)
|
||||
* This setting is never saved to disk, but if set, all device settings will be returned to factory defaults.
|
||||
* (Region, serial number etc... will be preserved)
|
||||
*/
|
||||
bool factory_reset = 100;
|
||||
|
||||
/*
|
||||
* By default we turn off logging as soon as an API client connects (to keep
|
||||
* shared serial link quiet). Set this to true to leave the debug log outputting even when API is active.
|
||||
* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
||||
* Set this to true to leave the debug log outputting even when API is active.
|
||||
*/
|
||||
bool debug_log_enabled = 101;
|
||||
|
||||
|
@ -384,22 +389,25 @@ message RadioConfig {
|
|||
* Enable/Disable the environmental measurement plugin measurement collection
|
||||
*/
|
||||
bool environmental_measurement_plugin_measurement_enabled = 140;
|
||||
|
||||
/*
|
||||
* Enable/Disable the environmental measurement plugin on-device display
|
||||
*/
|
||||
bool environmental_measurement_plugin_screen_enabled = 141;
|
||||
/*
|
||||
* Sometimes sensor reads can fail. If this happens, we
|
||||
* will retry a configurable number of attempts
|
||||
* Each attempt will be delayed by the minimum
|
||||
* required refresh rate for that sensor
|
||||
|
||||
/*
|
||||
* Sometimes sensor reads can fail.
|
||||
* If this happens, we will retry a configurable number of attempts,
|
||||
* each attempt will be delayed by the minimum required refresh rate for that sensor
|
||||
*/
|
||||
uint32 environmental_measurement_plugin_read_error_count_threshold = 142;
|
||||
|
||||
/*
|
||||
* Interval in seconds of how often we should try to send our
|
||||
* measurements to the mesh
|
||||
*/
|
||||
uint32 environmental_measurement_plugin_update_interval = 143;
|
||||
|
||||
/*
|
||||
* Sometimes we can end up with more than read_error_count_threshold failures.
|
||||
* In this case, we will stop trying to read from the sensor for a while.
|
||||
|
|
Ładowanie…
Reference in New Issue