diff --git a/docs/docs.md b/docs/docs.md index f3c61a4..6fe6ca0 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -90,13 +90,13 @@ Y is a lower case letter from a-z that represents the channel 'speed' se | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | tx_power | [int32](#int32) | | 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. | -| modem_config | [ChannelSettings.ModemConfig](#ChannelSettings.ModemConfig) | | Note: This is the 'old' mechanism for specifying channel parameters. / Either modem_config or bandwidth/spreading/coding will be specified - NOT / BOTH. As a heuristic: If bandwidth is specified, do not use modem_config. / Because protobufs take ZERO space when the value is zero this works out / nicely. / This value is replaced by bandwidth/spread_factor/coding_rate. If you'd / like to experiment with other options add them to MeshRadio.cpp in the / device code. | +| modem_config | [ChannelSettings.ModemConfig](#ChannelSettings.ModemConfig) | | Note: This is the 'old' mechanism for specifying channel parameters. Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. As a heuristic: If bandwidth is specified, do not use modem_config. Because protobufs take ZERO space when the value is zero this works out nicely. This value is replaced by bandwidth/spread_factor/coding_rate. If you'd like to experiment with other options add them to MeshRadio.cpp in the device code. | | bandwidth | [uint32](#uint32) | | Bandwidth in MHz Certain bandwidth numbers are 'special' and will be converted to the appropriate floating point value: 31 -> 31.25MHz | | spread_factor | [uint32](#uint32) | | A number from 7 to 12. Indicates number of chirps per symbol as 1<<spread_factor. | | coding_rate | [uint32](#uint32) | | The denominator of the coding rate. ie for 4/8, the value is 8. 5/8 the value is 5. | | channel_num | [uint32](#uint32) | | 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 algoritm to derive the channel number") If using the hash algorithm the channel number will be: hash(channel_name) % NUM_CHANNELS (Where num channels depends on the regulatory region). NUM_CHANNELS_US is 13, for other values see MeshRadio.h in the device code. hash a string into an integer - djb2 by Dan Bernstein. - http://www.cse.yorku.ca/~oz/hash.html unsigned long hash(char *str) { unsigned long hash = 5381; int c; while ((c = *str++) != 0) hash = ((hash << 5) + hash) + (unsigned char) c; return hash; } | -| psk | [bytes](#bytes) | | A simple preshared key for now for crypto. Must be either 0 bytes (no / crypto), 16 bytes (AES128), or 32 bytes (AES256) | -| name | [string](#string) | | A SHORT name that will be packed into the URL. Less than 12 bytes. / Something for end users to call the channel | +| psk | [bytes](#bytes) | | A simple preshared 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: 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 | +| name | [string](#string) | | 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 (minimially 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". Where "X" is selected based on the english words listed above for ModemConfig | @@ -591,6 +591,7 @@ This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT val | REMOTE_HARDWARE_APP | 2 | Reserved for built-in GPIO/example app. See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number | | POSITION_APP | 3 | The built-in position messaging app. See Position for details on the message sent to this port number. | | NODEINFO_APP | 4 | The built-in user info app. See User for details on the message sent to this port number. | +| REPLY_APP | 32 | Provides a 'ping' service that replies to any packet it receives. Also this serves as a small example plugin. | | PRIVATE_APP | 256 | Private applications should use portnums >= 256. To simplify initial development and testing you can use "PRIVATE_APP" in your code without needing to rebuild protobuf files (via bin/regin_protos.sh) | | IP_TUNNEL_APP | 1024 | 1024-66559 Are reserved for use by IP tunneling (see FIXME for more information) |