From 7db1c2edb2e62e90b1f297be2f11aff0df35330a Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Mon, 22 Feb 2021 10:25:29 +0800 Subject: [PATCH] 1.2 trim sizes --- docs/docs.md | 1 + mesh.options | 15 ++++++++++++--- portnums.proto | 3 +++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/docs.md b/docs/docs.md index 5a2fc0e..4e44743 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -904,6 +904,7 @@ Maintained by Jm Casler (MC Hamster) : jm@casler.org | Maintained by Jm Casler (MC Hamster) : jm@casler.org | | 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) | | ATAK_FORWARDER | 257 | ATAK Forwarder Plugin https://github.com/paulmandal/atak-forwarder | +| MAX | 511 | Currently we limit port nums to no higher than this value | diff --git a/mesh.options b/mesh.options index 092fc9f..f780a95 100644 --- a/mesh.options +++ b/mesh.options @@ -9,18 +9,25 @@ *RouteDiscovery.route max_count:8 -# FIXME, max out based on total SubPacket 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 -*Data.payload max_size:240 +# 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 +*Data.payload max_size:237 *Data.payloadVariant anonymous_oneof:true *UserPreferences.wifi_ssid max_size:33 *UserPreferences.wifi_password max_size:64 *UserPreferences.region max_size:6 +*Channel.index int_size:8 + # 256 bit or 128 bit psk key *ChannelSettings.psk max_size:32 *ChannelSettings.name max_size:12 +*ChannelSettings.tx_power int_size:8 +*ChannelSettings.bandwidth int_size:16 +*ChannelSettings.coding_rate int_size:8 +*ChannelSettings.channel_num int_size:8 + *MyNodeInfo.firmware_version max_size:12 *MyNodeInfo.hw_model max_size:16 @@ -32,6 +39,8 @@ # here because we might need to fill with zeros for padding to encryption block size (16 bytes per block) *MeshPacket.encrypted max_size:256 *MeshPacket.payloadVariant anonymous_oneof:true +*MeshPacket.hop_limit int_size:8 +*MeshPacket.channel_index int_size:8 *ToRadio.payloadVariant anonymous_oneof:true diff --git a/portnums.proto b/portnums.proto index 91107fb..6763c19 100644 --- a/portnums.proto +++ b/portnums.proto @@ -120,4 +120,7 @@ enum PortNum { * ATAK Forwarder Plugin https://github.com/paulmandal/atak-forwarder */ ATAK_FORWARDER = 257; + + /** Currently we limit port nums to no higher than this value */ + MAX = 511; }