diff --git a/docs/docs.md b/docs/docs.md index 15cdf54..7ef0a3d 100644 --- a/docs/docs.md +++ b/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 their radio to join the same channel. A note aboute how channel names are shown to users: -#channelname-Xy -# is a prefix used to indicate this is a channel name (idea from @professr). +channelname-Xy +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 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 @@ -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_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 | -| 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. | +| 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. | | fail_id | [uint32](#uint32) | | This is a nak, we failed to deliver this message. | -| 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). | +| 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). | | 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 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. -// 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) The algorithm is as follows: @@ -438,13 +430,9 @@ A few nodenums are reserved and will never be requested: | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | 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> - -A full name for this user, i.e. "Kevin Hester" | +| long_name | [string](#string) | | A full name for this user, i.e. "Kevin Hester" | | short_name | [string](#string) | | A VERY short name, ideally two characters. Suitable | -| macaddr | [bytes](#bytes) | | for a tiny OLED screen - -This is the addr of the radio. Not populated by the | +| macaddr | [bytes](#bytes) | | 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 | | ---- | ------ | ----------- | | Bw125Cr45Sf128 | 0 | < Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC | -| Bw500Cr45Sf128 | 1 | < on. Default medium range - -/< Bw = 500 kHz, Cr = 4/5, Sf = 128chips/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 | +| 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, | +| Bw125Cr48Sf4096 | 3 | < Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/symbol, CRC | diff --git a/mesh.proto b/mesh.proto index 27c9d33..b444f6c 100644 --- a/mesh.proto +++ b/mesh.proto @@ -62,9 +62,9 @@ message Data { } /* 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. -// 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) 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 // Signal that would mean +16504442323, for the default macaddr // derived id it would be !<6 hexidecimal bytes> + 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 // for a tiny OLED screen + bytes macaddr = 4; // This is the addr of the radio. Not populated by the // 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 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. */ @@ -179,10 +181,8 @@ message SubPacket { /** 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. */ @@ -190,7 +190,6 @@ message SubPacket { /** The address of the original sender for this message. - This field should _only_ be populated for reliable multihop packets (to keep packets small). */ @@ -337,14 +336,17 @@ message ChannelSettings { Note: these mappings must match ModemConfigChoice in the device code. */ enum ModemConfig { - Bw125Cr45Sf128 = 0 ; ///< Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC - ///< on. Default medium range - Bw500Cr45Sf128 = 1; ///< Bw = 500 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC - ///< on. Fast+short range - Bw31_25Cr48Sf512 = 2; ///< Bw = 31.25 kHz, Cr = 4/8, Sf = 512chips/symbol, + Bw125Cr45Sf128 = 0 ; // < Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC + // < on. Default medium range + + Bw500Cr45Sf128 = 1; // < Bw = 500 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC + // < on. Fast+short range + + Bw31_25Cr48Sf512 = 2; // < Bw = 31.25 kHz, Cr = 4/8, Sf = 512chips/symbol, ///< 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.