kopia lustrzana https://github.com/meshtastic/protobufs
fix doc formatting
rodzic
613433e321
commit
8b24fbab19
42
docs/docs.md
42
docs/docs.md
|
@ -68,8 +68,8 @@ needed to configure a radio for speaking on a particlar channel This
|
||||||
information can be encoded as a QRcode/url so that other users can configure
|
information can be encoded as a QRcode/url so that other users can configure
|
||||||
their radio to join the same channel.
|
their radio to join the same channel.
|
||||||
A note aboute how channel names are shown to users:
|
A note aboute how channel names are shown to users:
|
||||||
#channelname-Xy
|
channelname-Xy
|
||||||
# is a prefix used to indicate this is a channel name (idea from @professr).
|
poundsymbol is a prefix used to indicate this is a channel name (idea from @professr).
|
||||||
Where X is a letter from A-Z (base 26) representing a hash of the PSK for this
|
Where X is a letter from A-Z (base 26) representing a hash of the PSK for this
|
||||||
channel - so that if the user changes anything about the channel (which does
|
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
|
force a new PSK) this letter will also change. Thus preventing user confusion if
|
||||||
|
@ -365,18 +365,10 @@ inside a radio packet (because from/to are broken out by the comms library)
|
||||||
| route_reply | [RouteDiscovery](#RouteDiscovery) | | A route reply |
|
| route_reply | [RouteDiscovery](#RouteDiscovery) | | A route reply |
|
||||||
| route_error | [RouteError](#RouteError) | | A failure in a routed message |
|
| route_error | [RouteError](#RouteError) | | A failure in a routed message |
|
||||||
| want_response | [bool](#bool) | | Not normally used, but for testing a sender can request that recipient / responds in kind (i.e. if it received a position, it should unicast back / its position). Note: that if you set this on a broadcast you will receive many replies. FIXME - unify (i.e. remove) this with the new reliable messaging at the MeshPacket level |
|
| want_response | [bool](#bool) | | Not normally used, but for testing a sender can request that recipient / responds in kind (i.e. if it received a position, it should unicast back / its position). Note: that if you set this on a broadcast you will receive many replies. FIXME - unify (i.e. remove) this with the new reliable messaging at the MeshPacket level |
|
||||||
| success_id | [uint32](#uint32) | | 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.
|
| success_id | [uint32](#uint32) | | 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. Note: As an optimization, recipients can _also_ populate a field in payload if they think the recipient would appreciate that extra state. |
|
||||||
|
|
||||||
Note: As an optimization, recipients can _also_ populate a field in payload if they think the recipient would appreciate that extra state. |
|
|
||||||
| fail_id | [uint32](#uint32) | | This is a nak, we failed to deliver this message. |
|
| fail_id | [uint32](#uint32) | | This is a nak, we failed to deliver this message. |
|
||||||
| dest | [uint32](#uint32) | | The address of the destination node.
|
| dest | [uint32](#uint32) | | The address of the destination node. This field is is filled in by the mesh radio device software, applicaiton layer software should never need it. RouteDiscovery messages _must_ populate this. Other message types might need to if they are doing multihop routing. |
|
||||||
|
| source | [uint32](#uint32) | | The address of the original sender for this message. This field should _only_ be populated for reliable multihop packets (to keep packets small). |
|
||||||
This field is is filled in by the mesh radio device software, applicaiton layer software should never need it.
|
|
||||||
|
|
||||||
RouteDiscovery messages _must_ populate this. Other message types might need to if they are doing multihop routing. |
|
|
||||||
| source | [uint32](#uint32) | | The address of the original sender for this message.
|
|
||||||
|
|
||||||
This field should _only_ be populated for reliable multihop packets (to keep packets small). |
|
|
||||||
| original_id | [uint32](#uint32) | | Only used in route_error messages. Indicates the original message ID that this message is reporting failure on. |
|
| original_id | [uint32](#uint32) | | Only used in route_error messages. Indicates the original message ID that this message is reporting failure on. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -407,9 +399,9 @@ characteristic. Once the write completes the phone can assume it is handled.
|
||||||
|
|
||||||
### User
|
### User
|
||||||
Broadcast when a newly powered mesh node wants to find a node num it can use
|
Broadcast when a newly powered mesh node wants to find a node num it can use
|
||||||
// Sent from the phone over bluetooth to set the user id for the owner of this
|
Sent from the phone over bluetooth to set the user id for the owner of this
|
||||||
node.
|
node.
|
||||||
// Also sent from nodes to each other when a new node signs on (so all clients
|
Also sent from nodes to each other when a new node signs on (so all clients
|
||||||
can have this info)
|
can have this info)
|
||||||
|
|
||||||
The algorithm is as follows:
|
The algorithm is as follows:
|
||||||
|
@ -438,13 +430,9 @@ A few nodenums are reserved and will never be requested:
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| id | [string](#string) | | a globally unique ID string for this user. In the case of |
|
| id | [string](#string) | | a globally unique ID string for this user. In the case of |
|
||||||
| long_name | [string](#string) | | Signal that would mean +16504442323, for the default macaddr derived id it would be !<6 hexidecimal bytes>
|
| long_name | [string](#string) | | A full name for this user, i.e. "Kevin Hester" |
|
||||||
|
|
||||||
A full name for this user, i.e. "Kevin Hester" |
|
|
||||||
| short_name | [string](#string) | | A VERY short name, ideally two characters. Suitable |
|
| short_name | [string](#string) | | A VERY short name, ideally two characters. Suitable |
|
||||||
| macaddr | [bytes](#bytes) | | for a tiny OLED screen
|
| macaddr | [bytes](#bytes) | | This is the addr of the radio. Not populated by the |
|
||||||
|
|
||||||
This is the addr of the radio. Not populated by the |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -462,15 +450,9 @@ Note: these mappings must match ModemConfigChoice in the device code.
|
||||||
| Name | Number | Description |
|
| Name | Number | Description |
|
||||||
| ---- | ------ | ----------- |
|
| ---- | ------ | ----------- |
|
||||||
| Bw125Cr45Sf128 | 0 | < Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC |
|
| Bw125Cr45Sf128 | 0 | < Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC |
|
||||||
| Bw500Cr45Sf128 | 1 | < on. Default medium range
|
| Bw500Cr45Sf128 | 1 | < Bw = 500 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC |
|
||||||
|
| Bw31_25Cr48Sf512 | 2 | < Bw = 31.25 kHz, Cr = 4/8, Sf = 512chips/symbol, |
|
||||||
/< Bw = 500 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC |
|
| Bw125Cr48Sf4096 | 3 | < Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/symbol, CRC |
|
||||||
| Bw31_25Cr48Sf512 | 2 | < on. Fast+short range
|
|
||||||
|
|
||||||
/< Bw = 31.25 kHz, Cr = 4/8, Sf = 512chips/symbol, |
|
|
||||||
| Bw125Cr48Sf4096 | 3 | < CRC on. Slow+long range
|
|
||||||
|
|
||||||
/< Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/symbol, CRC |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
28
mesh.proto
28
mesh.proto
|
@ -62,9 +62,9 @@ message Data {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Broadcast when a newly powered mesh node wants to find a node num it can use
|
/* Broadcast when a newly powered mesh node wants to find a node num it can use
|
||||||
// Sent from the phone over bluetooth to set the user id for the owner of this
|
Sent from the phone over bluetooth to set the user id for the owner of this
|
||||||
node.
|
node.
|
||||||
// Also sent from nodes to each other when a new node signs on (so all clients
|
Also sent from nodes to each other when a new node signs on (so all clients
|
||||||
can have this info)
|
can have this info)
|
||||||
|
|
||||||
The algorithm is as follows:
|
The algorithm is as follows:
|
||||||
|
@ -94,9 +94,12 @@ message User {
|
||||||
string id = 1; // a globally unique ID string for this user. In the case of
|
string id = 1; // a globally unique ID string for this user. In the case of
|
||||||
// Signal that would mean +16504442323, for the default macaddr
|
// Signal that would mean +16504442323, for the default macaddr
|
||||||
// derived id it would be !<6 hexidecimal bytes>
|
// derived id it would be !<6 hexidecimal bytes>
|
||||||
|
|
||||||
string long_name = 2; // A full name for this user, i.e. "Kevin Hester"
|
string long_name = 2; // A full name for this user, i.e. "Kevin Hester"
|
||||||
|
|
||||||
string short_name = 3; // A VERY short name, ideally two characters. Suitable
|
string short_name = 3; // A VERY short name, ideally two characters. Suitable
|
||||||
// for a tiny OLED screen
|
// for a tiny OLED screen
|
||||||
|
|
||||||
bytes macaddr = 4; // This is the addr of the radio. Not populated by the
|
bytes macaddr = 4; // This is the addr of the radio. Not populated by the
|
||||||
// phone, but added by the esp32 when broadcasting
|
// phone, but added by the esp32 when broadcasting
|
||||||
}
|
}
|
||||||
|
@ -166,7 +169,6 @@ message SubPacket {
|
||||||
This packet is a requested acknoledgement indicating that we have received
|
This packet is a requested acknoledgement indicating that we have received
|
||||||
the specified message ID. This packet type can be used both for immediate
|
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.
|
(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
|
Note: As an optimization, recipients can _also_ populate a field in payload
|
||||||
if they think the recipient would appreciate that extra state.
|
if they think the recipient would appreciate that extra state.
|
||||||
*/
|
*/
|
||||||
|
@ -179,10 +181,8 @@ message SubPacket {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The address of the destination node.
|
The address of the destination node.
|
||||||
|
|
||||||
This field is is filled in by the mesh radio device software, applicaiton
|
This field is is filled in by the mesh radio device software, applicaiton
|
||||||
layer software should never need it.
|
layer software should never need it.
|
||||||
|
|
||||||
RouteDiscovery messages _must_ populate this. Other message types might need
|
RouteDiscovery messages _must_ populate this. Other message types might need
|
||||||
to if they are doing multihop routing.
|
to if they are doing multihop routing.
|
||||||
*/
|
*/
|
||||||
|
@ -190,7 +190,6 @@ message SubPacket {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The address of the original sender for this message.
|
The address of the original sender for this message.
|
||||||
|
|
||||||
This field should _only_ be populated for reliable multihop packets (to keep
|
This field should _only_ be populated for reliable multihop packets (to keep
|
||||||
packets small).
|
packets small).
|
||||||
*/
|
*/
|
||||||
|
@ -337,14 +336,17 @@ message ChannelSettings {
|
||||||
Note: these mappings must match ModemConfigChoice in the device code.
|
Note: these mappings must match ModemConfigChoice in the device code.
|
||||||
*/
|
*/
|
||||||
enum ModemConfig {
|
enum ModemConfig {
|
||||||
Bw125Cr45Sf128 = 0 ; ///< Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC
|
Bw125Cr45Sf128 = 0 ; // < Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC
|
||||||
///< on. Default medium range
|
// < on. Default medium range
|
||||||
Bw500Cr45Sf128 = 1; ///< Bw = 500 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC
|
|
||||||
///< on. Fast+short range
|
Bw500Cr45Sf128 = 1; // < Bw = 500 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC
|
||||||
Bw31_25Cr48Sf512 = 2; ///< Bw = 31.25 kHz, Cr = 4/8, Sf = 512chips/symbol,
|
// < on. Fast+short range
|
||||||
|
|
||||||
|
Bw31_25Cr48Sf512 = 2; // < Bw = 31.25 kHz, Cr = 4/8, Sf = 512chips/symbol,
|
||||||
///< CRC on. Slow+long range
|
///< CRC on. Slow+long range
|
||||||
Bw125Cr48Sf4096 = 3; ///< Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/symbol, CRC
|
|
||||||
///< on. Slow+long range
|
Bw125Cr48Sf4096 = 3; // < Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/symbol, CRC
|
||||||
|
// < on. Slow+long range
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Note: This is the 'old' mechanism for specifying channel parameters.
|
/// Note: This is the 'old' mechanism for specifying channel parameters.
|
||||||
|
|
Ładowanie…
Reference in New Issue