From f8f668394777577b9056ff485c3d65be868f9c35 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 27 Jun 2023 19:07:49 -0500 Subject: [PATCH 001/137] Description clarification --- meshtastic/deviceonly.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index fd2d61f..60203f4 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -81,7 +81,7 @@ message DeviceState { repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13; /* - * New lite version of NodeDB to decrease + * New lite version of NodeDB to decrease memory footprint */ repeated NodeInfoLite node_db_lite = 14; } From 432d68ef91e13831bd592fe87dd0875a77047a3a Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 28 Jun 2023 11:05:28 -0400 Subject: [PATCH 002/137] AmbientLightingModule --- meshtastic/module_config.options | 5 +++++ meshtastic/module_config.proto | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/meshtastic/module_config.options b/meshtastic/module_config.options index 32647b3..ed45932 100644 --- a/meshtastic/module_config.options +++ b/meshtastic/module_config.options @@ -18,3 +18,8 @@ *RemoteHardwareConfig.available_pins max_count:4 *RemoteHardwarePin.name max_size:15 *RemoteHardwarePin.gpio_pin int_size:8 + +*AmbientLightingConfig.current int_size:8 +*AmbientLightingConfig.red int_size:8 +*AmbientLightingConfig.green int_size:8 +*AmbientLightingConfig.blue int_size:8 \ No newline at end of file diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 5008afb..ad055d7 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -583,6 +583,26 @@ message ModuleConfig { */ NeighborInfoConfig neighbor_info = 10; } + + /*Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. +Initially created for the RAK14001 RGB LED module. +*/ + +message AmblientLightingConfig { + +/*Sets the overall current for the LED, range for the RAK14001 is 1-31*/ + uint32 current = 1; + +/*Sets the red level of the LED, values are 0-255*/ + + uint32 red = 2; // Red level + +/*Sets the green level of the LED, values are 0-255*/ + uint32 green = 3; // Green level + +/*Sets the blue level of the LED, values are 0-255*/ + uint32 blue = 4; // Blue level +} } /* From 6f0aeb756f210f61814b9511bb25c31511678e60 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 28 Jun 2023 19:59:12 -0400 Subject: [PATCH 003/137] PR edits --- meshtastic/module_config.proto | 42 +++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index ad055d7..07659cb 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -529,6 +529,25 @@ message ModuleConfig { bool send_bell = 11; } + /*Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. + Initially created for the RAK14001 RGB LED module. + */ + message AmbientLightingConfig { + + /*Sets the overall current for the LED, firmware side range for the RAK14001 is 1-31, but users should be given a range of 0-100% */ + uint32 current = 1; + + /*Sets the red level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ + + uint32 red = 2; // Red level + + /*Sets the green level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ + uint32 green = 3; // Green level + + /*Sets the blue level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ + uint32 blue = 4; // Blue level + } + /* * TODO: REPLACE */ @@ -582,27 +601,14 @@ message ModuleConfig { * TODO: REPLACE */ NeighborInfoConfig neighbor_info = 10; + + /* + * TODO: REPLACE + */ + AmbientLightingConfig ambient_lighting = 11; } - /*Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. -Initially created for the RAK14001 RGB LED module. -*/ -message AmblientLightingConfig { - -/*Sets the overall current for the LED, range for the RAK14001 is 1-31*/ - uint32 current = 1; - -/*Sets the red level of the LED, values are 0-255*/ - - uint32 red = 2; // Red level - -/*Sets the green level of the LED, values are 0-255*/ - uint32 green = 3; // Green level - -/*Sets the blue level of the LED, values are 0-255*/ - uint32 blue = 4; // Blue level -} } /* From 4c648a82470cf480f9c4b0d3cc04667bc20a3fc0 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 28 Jun 2023 20:04:35 -0400 Subject: [PATCH 004/137] On/Off function added --- meshtastic/module_config.proto | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 07659cb..e60820f 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -534,18 +534,21 @@ message ModuleConfig { */ message AmbientLightingConfig { + /*Sets LED to on or off. */ + bool led_state = 1; + /*Sets the overall current for the LED, firmware side range for the RAK14001 is 1-31, but users should be given a range of 0-100% */ - uint32 current = 1; + uint32 current = 2; /*Sets the red level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 red = 2; // Red level + uint32 red = 3; // Red level /*Sets the green level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 green = 3; // Green level + uint32 green = 4; // Green level /*Sets the blue level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 blue = 4; // Blue level + uint32 blue = 5; // Blue level } /* From 0d1614b4c889038bbc223a2f05ff1ddae197e791 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 29 Jun 2023 07:17:21 -0500 Subject: [PATCH 005/137] Infrastructure for clients to proxy MQTT traffic to node --- meshtastic/mqtt.options | 4 +++- meshtastic/mqtt.proto | 14 ++++++++++++++ meshtastic/portnums.proto | 10 ++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/meshtastic/mqtt.options b/meshtastic/mqtt.options index 261a74b..f37fb9a 100644 --- a/meshtastic/mqtt.options +++ b/meshtastic/mqtt.options @@ -1,3 +1,5 @@ *ServiceEnvelope.packet type:FT_POINTER *ServiceEnvelope.channel_id type:FT_POINTER -*ServiceEnvelope.gateway_id type:FT_POINTER \ No newline at end of file +*ServiceEnvelope.gateway_id type:FT_POINTER + +*MqttClientProxyMessage.topic type:FT_POINTER \ No newline at end of file diff --git a/meshtastic/mqtt.proto b/meshtastic/mqtt.proto index 0487f33..e8e8451 100644 --- a/meshtastic/mqtt.proto +++ b/meshtastic/mqtt.proto @@ -31,3 +31,17 @@ message ServiceEnvelope { */ string gateway_id = 3; } + +/* + * This message will be proxied over the PhoneAPI for client to deliver to the MQTT server + */ +message MqttClientProxyMessage { + /* + * The MQTT topic this message will be sent /received on + */ + string topic = 1; + /* + * The actual payload for mqtt delivery + */ + ServiceEnvelope envelope = 2; +} \ No newline at end of file diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 0fee327..970bd0a 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -78,11 +78,17 @@ enum PortNum { */ WAYPOINT_APP = 8; - /* Audio Payloads. + /* + * Audio Payloads. * Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now */ AUDIO_APP = 9; + /* + * Payloads for clients with a network connection proxying MQTT pub/sub to the device + */ + MQTT_CLIENT_PROXY_APP = 10; + /* * Provides a 'ping' service that replies to any packet it receives. * Also serves as a small example module. @@ -162,4 +168,4 @@ enum PortNum { * Currently we limit port nums to no higher than this value */ MAX = 511; -} +} \ No newline at end of file From b29933a4a01a5b4a75ac3acf6bb6f9eb33697e58 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 30 Jun 2023 07:51:51 -0500 Subject: [PATCH 006/137] Move proxy message and just convert to bytes instead --- meshtastic/mesh.options | 5 ++++- meshtastic/mesh.proto | 19 +++++++++++++++++++ meshtastic/mqtt.options | 4 +--- meshtastic/mqtt.proto | 14 -------------- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 35e4dc6..c384185 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -53,4 +53,7 @@ *NeighborInfo.neighbors max_count:10 -*DeviceMetadata.firmware_version max_size:18 \ No newline at end of file +*DeviceMetadata.firmware_version max_size:18 + +*MqttClientProxyMessage.topic type:FT_POINTER +*MqttClientProxyMessage.data max_size:500 \ No newline at end of file diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 8c50965..eb55795 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -674,6 +674,20 @@ message Waypoint { fixed32 icon = 8; } +/* + * This message will be proxied over the PhoneAPI for client to deliver to the MQTT server + */ + message MqttClientProxyMessage { + /* + * The MQTT topic this message will be sent /received on + */ + string topic = 1; + /* + * The actual service envelope payload for mqtt delivery + */ + bytes data = 2; +} + /* * A packet envelope sent/received over the mesh * only payload_variant is sent in the payload portion of the LORA packet. @@ -1320,6 +1334,11 @@ message FromRadio { * Device metadata message */ DeviceMetadata metadata = 13; + + /* + * MQTT Client Proxy Message + */ + MqttClientProxyMessage mqttClientProxyMessage = 14; } } diff --git a/meshtastic/mqtt.options b/meshtastic/mqtt.options index f37fb9a..261a74b 100644 --- a/meshtastic/mqtt.options +++ b/meshtastic/mqtt.options @@ -1,5 +1,3 @@ *ServiceEnvelope.packet type:FT_POINTER *ServiceEnvelope.channel_id type:FT_POINTER -*ServiceEnvelope.gateway_id type:FT_POINTER - -*MqttClientProxyMessage.topic type:FT_POINTER \ No newline at end of file +*ServiceEnvelope.gateway_id type:FT_POINTER \ No newline at end of file diff --git a/meshtastic/mqtt.proto b/meshtastic/mqtt.proto index e8e8451..7631435 100644 --- a/meshtastic/mqtt.proto +++ b/meshtastic/mqtt.proto @@ -30,18 +30,4 @@ message ServiceEnvelope { * the globally trusted nodenum */ string gateway_id = 3; -} - -/* - * This message will be proxied over the PhoneAPI for client to deliver to the MQTT server - */ -message MqttClientProxyMessage { - /* - * The MQTT topic this message will be sent /received on - */ - string topic = 1; - /* - * The actual payload for mqtt delivery - */ - ServiceEnvelope envelope = 2; } \ No newline at end of file From 74f3c56c9b59149d7bbbdd053e062aa95a4f0fe4 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 1 Jul 2023 08:53:13 -0500 Subject: [PATCH 007/137] Config and payload variant --- meshtastic/mesh.options | 5 +++-- meshtastic/mesh.proto | 18 +++++++++++++++++- meshtastic/module_config.proto | 5 +++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index c384185..ad8bd71 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -55,5 +55,6 @@ *DeviceMetadata.firmware_version max_size:18 -*MqttClientProxyMessage.topic type:FT_POINTER -*MqttClientProxyMessage.data max_size:500 \ No newline at end of file +*MqttClientProxyMessage.topic max_size:60 +*MqttClientProxyMessage.data max_size:435 +*MqttClientProxyMessage.text max_size:435 \ No newline at end of file diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index eb55795..8055028 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -682,10 +682,26 @@ message Waypoint { * The MQTT topic this message will be sent /received on */ string topic = 1; + /* * The actual service envelope payload for mqtt delivery */ - bytes data = 2; + oneof payload_variant { + /* + * Bytes + */ + bytes data = 2; + + /* + * Text + */ + string text = 3; + } + + /* + * Whether the message should be retained (or not) + */ + bool retained = 4; } /* diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 5008afb..3f429d9 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -65,6 +65,11 @@ message ModuleConfig { * This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs */ string root = 8; + + /* + * If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection + */ + bool proxy_to_client_enabled = 9; } /* From c8b90c700607ddbab0d99322635f6a73abb64259 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 2 Jul 2023 14:56:32 -0500 Subject: [PATCH 008/137] Add toradio --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 8055028..a063bf9 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1396,6 +1396,11 @@ message ToRadio { */ XModem xmodemPacket = 5; + + /* + * MQTT Client Proxy Message + */ + MqttClientProxyMessage mqttClientProxyMessage = 6; } } From 223b53e6cf427f5a868b4a0e69078e873e4d3e60 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 3 Jul 2023 07:42:56 -0500 Subject: [PATCH 009/137] Update mesh.proto --- meshtastic/mesh.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index a063bf9..2b92a66 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -675,7 +675,7 @@ message Waypoint { } /* - * This message will be proxied over the PhoneAPI for client to deliver to the MQTT server + * This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server */ message MqttClientProxyMessage { /* @@ -684,7 +684,7 @@ message Waypoint { string topic = 1; /* - * The actual service envelope payload for mqtt delivery + * The actual service envelope payload or text for mqtt pub / sub */ oneof payload_variant { /* @@ -1505,4 +1505,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} \ No newline at end of file +} From c6f4d4f6498a28d0e53935202282d746cb8a8cca Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 7 Jul 2023 07:00:23 -0500 Subject: [PATCH 010/137] Hardware models --- meshtastic/mesh.proto | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 8c50965..5bee2c6 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -397,6 +397,26 @@ enum HardwareModel { */ RPI_PICO = 47; + /* + * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + */ + HELTEC_WIRELESS_TRACKER = 48; + + /* + * Heltec Wireless Paper with ESP32-S3 CPU and E-Ink display + */ + HELTEC_WIRELESS_PAPER = 49; + + /* + * LilyGo T-Deck with ESP32-S3 CPU, Keyboard, and IPS display + */ + T_DECK = 50; + + /* + * LilyGo T-Watch S3 with ESP32-S3 CPU and IPS display + */ + T_WATCH_S3 = 51; + /* * ------------------------------------------------------------------------------------------------------------------------------------------ * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. From 5ecbbb8680efef4ed41fbaae9aa8c665bc924ffb Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 13 Jul 2023 13:29:57 -0500 Subject: [PATCH 011/137] Mega-ohms casing correction --- meshtastic/telemetry.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 777653f..0ee910b 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -53,7 +53,7 @@ message EnvironmentMetrics { float barometric_pressure = 3; /* - * Gas resistance in mOhm measured + * Gas resistance in MOhm measured */ float gas_resistance = 4; From f70efbc6f2eead575ef9d1ca6a5471225de18302 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 22 Jul 2023 08:44:45 -0500 Subject: [PATCH 012/137] Clarification --- meshtastic/mesh.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 0f25ab8..f39b746 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1372,7 +1372,7 @@ message FromRadio { DeviceMetadata metadata = 13; /* - * MQTT Client Proxy Message + * MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) */ MqttClientProxyMessage mqttClientProxyMessage = 14; } @@ -1418,7 +1418,7 @@ message ToRadio { XModem xmodemPacket = 5; /* - * MQTT Client Proxy Message + * MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) */ MqttClientProxyMessage mqttClientProxyMessage = 6; } @@ -1525,4 +1525,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} +} \ No newline at end of file From 29ec07a25e4bdea0c644d55ecc80a3dd71cf05b2 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 24 Jul 2023 09:56:10 -0500 Subject: [PATCH 013/137] Removing Portnum we didn't actually use --- meshtastic/portnums.proto | 5 ----- 1 file changed, 5 deletions(-) diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 970bd0a..514593a 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -84,11 +84,6 @@ enum PortNum { */ AUDIO_APP = 9; - /* - * Payloads for clients with a network connection proxying MQTT pub/sub to the device - */ - MQTT_CLIENT_PROXY_APP = 10; - /* * Provides a 'ping' service that replies to any packet it receives. * Also serves as a small example module. From 16dbe1e7e62e09bfebaf71ca5f3ec10928667230 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 25 Jul 2023 16:24:48 -0500 Subject: [PATCH 014/137] Completely remove deprecated fields --- meshtastic/channel.proto | 7 +-- meshtastic/deviceonly.proto | 6 --- meshtastic/mesh.proto | 85 ------------------------------------- 3 files changed, 1 insertion(+), 97 deletions(-) diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index 6667874..82401e0 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -26,11 +26,6 @@ option swift_prefix = ""; * explain how remote settings and remote gpio are managed as an example */ message ChannelSettings { - /* - * Deprecated in favor of LoraConfig.channel_num - */ - uint32 channel_num = 1 [deprecated = true]; - /* * A simple pre-shared key for now for crypto. * Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256). @@ -132,4 +127,4 @@ message Channel { * TODO: REPLACE */ Role role = 3; -} +} \ No newline at end of file diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 60203f4..4f6b9a9 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -32,12 +32,6 @@ message DeviceState { */ User owner = 3; - /* - * Deprecated in 2.1.x - * Old node_db. See NodeInfoLite node_db_lite - */ - repeated NodeInfo node_db = 4 [deprecated = true]; - /* * Received packets saved for delivery to the phone */ diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index f39b746..f6e083f 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1105,102 +1105,17 @@ message MyNodeInfo { */ uint32 my_node_num = 1; - /* - * Deprecated in 2.1.x (Source from device_metadata) - * Note: This flag merely means we detected a hardware GPS in our node. - * Not the same as UserPreferences.location_sharing - */ - bool has_gps = 2 [deprecated = true]; - - /* - * Deprecated in 2.1.x - * The maximum number of 'software' channels that can be set on this node. - */ - uint32 max_channels = 3 [deprecated = true]; - - /* - * Deprecated in 2.1.x (Source from device_metadata) - * 0.0.5 etc... - */ - string firmware_version = 4 [deprecated = true]; - - /* - * An error message we'd like to report back to the mothership through analytics. - * It indicates a serious bug occurred on the device, the device coped with it, - * but we still want to tell the devs about the bug. - * This field will be cleared after the phone reads MyNodeInfo - * (i.e. it will only be reported once) - * a numeric error code to go with error message, zero means no error - */ - CriticalErrorCode error_code = 5 [deprecated = true]; - - /* - * A numeric error address (nonzero if available) - */ - uint32 error_address = 6 [deprecated = true]; - - /* - * The total number of errors this node has ever encountered - * (well - since the last time we discarded preferences) - */ - uint32 error_count = 7 [deprecated = true]; - /* * The total number of reboots this node has ever encountered * (well - since the last time we discarded preferences) */ uint32 reboot_count = 8; - /* - * Deprecated in 2.1.x - * Calculated bitrate of the current channel (in Bytes Per Second) - */ - float bitrate = 9 [deprecated = true]; - - /* - * Deprecated in 2.1.x - * 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 - */ - uint32 message_timeout_msec = 10 [deprecated = true]; - /* * 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 = 11; - - /* - * Deprecated in 2.1.x (Only used on device to keep track of utilization) - * 24 time windows of 1hr each with the airtime transmitted out of the device per hour. - */ - repeated uint32 air_period_tx = 12 [deprecated = true]; - - /* - * Deprecated in 2.1.x (Only used on device to keep track of utilization) - * 24 time windows of 1hr each with the airtime of valid packets for your mesh. - */ - repeated uint32 air_period_rx = 13 [deprecated = true]; - - /* - * Deprecated in 2.1.x (Source from DeviceMetadata instead) - * Is the device wifi capable? - */ - bool has_wifi = 14 [deprecated = true]; - - /* - * Deprecated in 2.1.x (Source from DeviceMetrics telemetry payloads) - * Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). - */ - float channel_utilization = 15 [deprecated = true]; - - /* - * Deprecated in 2.1.x (Source from DeviceMetrics telemetry payloads) - * Percent of airtime for transmission used within the last hour. - */ - float air_util_tx = 16 [deprecated = true]; } /* From 45ccd172d7f1173515519cbb75afb6232d7e71e0 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 25 Jul 2023 17:29:31 -0500 Subject: [PATCH 015/137] Remove count --- meshtastic/deviceonly.options | 1 - 1 file changed, 1 deletion(-) diff --git a/meshtastic/deviceonly.options b/meshtastic/deviceonly.options index c164888..b03209b 100644 --- a/meshtastic/deviceonly.options +++ b/meshtastic/deviceonly.options @@ -2,7 +2,6 @@ # https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options # FIXME pick a higher number someday? or do dynamic alloc in nanopb? -*DeviceState.node_db max_count:80 *DeviceState.node_db_lite max_count:80 # FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in RAM From 7bf13761bbeebd6cfe0604d851cbce818655999d Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 25 Jul 2023 19:09:08 -0500 Subject: [PATCH 016/137] Shouldn't have removed this one. It's too risky --- meshtastic/channel.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index 82401e0..7d2361a 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -26,6 +26,11 @@ option swift_prefix = ""; * explain how remote settings and remote gpio are managed as an example */ message ChannelSettings { + /* + * Deprecated in favor of LoraConfig.channel_num + */ + uint32 channel_num = 1 [deprecated = true]; + /* * A simple pre-shared key for now for crypto. * Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256). From c9e5dd76cffda02bb420a5e42ece782b05e47970 Mon Sep 17 00:00:00 2001 From: Neil Hao Date: Thu, 27 Jul 2023 13:59:22 +0800 Subject: [PATCH 017/137] Update mesh.proto Added Nano G2 Ultra NANO_G2_ULTRA = 52; has been added. --- meshtastic/mesh.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index f39b746..98ca75d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -417,6 +417,11 @@ enum HardwareModel { */ T_WATCH_S3 = 51; + /* + * B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra + */ + NANO_G2_ULTRA = 52; + /* * ------------------------------------------------------------------------------------------------------------------------------------------ * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. @@ -1525,4 +1530,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} \ No newline at end of file +} From 8ad70564fcd9b31078d843e241e65b6af77e213c Mon Sep 17 00:00:00 2001 From: Neil Hao Date: Thu, 27 Jul 2023 17:55:40 +0800 Subject: [PATCH 018/137] Added Nano G2 Ultra to 18 NANO_G2_ULTRA = 18; has been added for new board. More info about nano g2 ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra --- meshtastic/mesh.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 98ca75d..bc7bff6 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -305,6 +305,11 @@ enum HardwareModel { */ NANO_G1_EXPLORER = 17; + /* + * B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra + */ + NANO_G2_ULTRA = 18; + /* * B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */ @@ -417,11 +422,6 @@ enum HardwareModel { */ T_WATCH_S3 = 51; - /* - * B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra - */ - NANO_G2_ULTRA = 52; - /* * ------------------------------------------------------------------------------------------------------------------------------------------ * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. From 0d5b0942fe4a462e3c3c1b214fd4e41c588c9c44 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 27 Jul 2023 12:16:07 -0500 Subject: [PATCH 019/137] Add Neighborinfo to adminmessage ModuleConfigType --- meshtastic/admin.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 191707c..6bf7d06 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -109,6 +109,11 @@ message AdminMessage { * TODO: REPLACE */ REMOTEHARDWARE_CONFIG = 8; + + /* + * TODO: REPLACE + */ + NEIGHBORINFO_CONFIG = 9; } /* @@ -325,4 +330,4 @@ message NodeRemoteHardwarePinsResponse { * Nodes and their respective remote hardware GPIO pins */ repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1; -} +} \ No newline at end of file From 2cb0aeb668686edf68cfb8a682b988e7b64ed238 Mon Sep 17 00:00:00 2001 From: charminULTRA Date: Thu, 27 Jul 2023 14:09:17 -0400 Subject: [PATCH 020/137] ALM --- meshtastic/admin.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 191707c..c8c2a1f 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -109,6 +109,11 @@ message AdminMessage { * TODO: REPLACE */ REMOTEHARDWARE_CONFIG = 8; + + /* + * TODO: REPLACE + */ + AMBIENTLIGHTING_CONFIG = 10; } /* From 34e550ee2a177e4d8d8443afcc03d5b1d1ba9109 Mon Sep 17 00:00:00 2001 From: charminULTRA Date: Thu, 27 Jul 2023 14:12:37 -0400 Subject: [PATCH 021/137] space --- meshtastic/admin.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index c8c2a1f..952ecaa 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -113,7 +113,7 @@ message AdminMessage { /* * TODO: REPLACE */ - AMBIENTLIGHTING_CONFIG = 10; + AMBIENTLIGHTING_CONFIG = 10; } /* From 7f047d6357a299f7704debdb2968e7818a1a81e7 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 27 Jul 2023 14:39:13 -0400 Subject: [PATCH 022/137] added expeceted code for neighborinfo for simplicity of merge --- meshtastic/admin.proto | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 952ecaa..ac2fd5d 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -109,7 +109,12 @@ message AdminMessage { * TODO: REPLACE */ REMOTEHARDWARE_CONFIG = 8; - + + /* + * TODO: REPLACE + */ + NEIGHBORINFO_CONFIG = 9; + /* * TODO: REPLACE */ @@ -330,4 +335,4 @@ message NodeRemoteHardwarePinsResponse { * Nodes and their respective remote hardware GPIO pins */ repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1; -} +} \ No newline at end of file From c48e4085628166943bd94fbf875722cc6605b4cb Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 27 Jul 2023 16:42:58 -0400 Subject: [PATCH 023/137] space fix --- meshtastic/admin.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index ac2fd5d..e629a87 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -114,7 +114,7 @@ message AdminMessage { * TODO: REPLACE */ NEIGHBORINFO_CONFIG = 9; - + /* * TODO: REPLACE */ From 1c3ed70144eab6b939f1c758a48e3548d2202610 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 28 Jul 2023 06:38:53 -0500 Subject: [PATCH 024/137] Add Neighbor.node_broadcast_interval_secs --- meshtastic/mesh.options | 1 + meshtastic/mesh.proto | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index ad8bd71..c40b2d2 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -52,6 +52,7 @@ *Waypoint.description max_size:100 *NeighborInfo.neighbors max_count:10 +*Neighbor.node_broadcast_interval_secs max_size:16 *DeviceMetadata.firmware_version max_size:18 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index f6e083f..ee7757d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1385,6 +1385,11 @@ message Neighbor { * SNR of last heard message */ float snr = 2; + + /* + * Broadcast interval of the represented node (in seconds) + */ + uint32 node_broadcast_interval_secs = 3; } /* From af693fe022bc73c2fb3245c54f6e3abf8f086bd8 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 28 Jul 2023 06:42:42 -0500 Subject: [PATCH 025/137] Int_size, not max_size --- meshtastic/mesh.options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index c40b2d2..2d1a438 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -52,7 +52,7 @@ *Waypoint.description max_size:100 *NeighborInfo.neighbors max_count:10 -*Neighbor.node_broadcast_interval_secs max_size:16 +*Neighbor.node_broadcast_interval_secs int_size:16 *DeviceMetadata.firmware_version max_size:18 From 673832e45c68d8651b626673cc00e11a07c642f5 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 28 Jul 2023 11:03:43 -0400 Subject: [PATCH 026/137] test --- meshtastic/admin.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index e629a87..a8f87aa 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -119,6 +119,7 @@ message AdminMessage { * TODO: REPLACE */ AMBIENTLIGHTING_CONFIG = 10; + } /* From b69559e22b1da9fd7bbea62231da2d0069a92950 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 28 Jul 2023 11:07:05 -0400 Subject: [PATCH 027/137] check --- meshtastic/admin.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index a8f87aa..e629a87 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -119,7 +119,6 @@ message AdminMessage { * TODO: REPLACE */ AMBIENTLIGHTING_CONFIG = 10; - } /* From 22b6681c86fb6253742af82e1e692d85e8c208d7 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 28 Jul 2023 11:07:48 -0400 Subject: [PATCH 028/137] Trying to fix TOKEN error From 869b4831452e6ce80f4029fdc58c69b2f2dad29a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 28 Jul 2023 10:15:25 -0500 Subject: [PATCH 029/137] Move node_broadcast_interval_secs to NeighborInfo --- meshtastic/mesh.options | 1 - meshtastic/mesh.proto | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 2d1a438..ad8bd71 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -52,7 +52,6 @@ *Waypoint.description max_size:100 *NeighborInfo.neighbors max_count:10 -*Neighbor.node_broadcast_interval_secs int_size:16 *DeviceMetadata.firmware_version max_size:18 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index ee7757d..da85c53 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1366,10 +1366,15 @@ message NeighborInfo { * Field to pass neighbor info for the next sending cycle */ uint32 last_sent_by_id = 2; + + /* + * Broadcast interval of the represented node (in seconds) + */ + uint32 node_broadcast_interval_secs = 3; /* * The list of out edges from this node */ - repeated Neighbor neighbors = 3; + repeated Neighbor neighbors = 4; } /* @@ -1385,11 +1390,6 @@ message Neighbor { * SNR of last heard message */ float snr = 2; - - /* - * Broadcast interval of the represented node (in seconds) - */ - uint32 node_broadcast_interval_secs = 3; } /* From 6f88374ec6939fabc3ef79771843c291db063fae Mon Sep 17 00:00:00 2001 From: Eugene Maksymenko Date: Fri, 28 Jul 2023 23:35:44 +0300 Subject: [PATCH 030/137] Fix unmappable character (0x98) for encoding windows-1251 #373 --- meshtastic/mesh.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index bc7bff6..c88c44b 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -750,9 +750,9 @@ message MeshPacket { * to make sure that critical packets are sent ASAP. * In the case of meshtastic that means we want to send protocol acks as soon as possible * (to prevent unneeded retransmissions), we want routing messages to be sent next, - * then messages marked as reliable and finally ‘background’ packets like periodic position updates. + * then messages marked as reliable and finally 'background' packets like periodic position updates. * So I bit the bullet and implemented a new (internal - not sent over the air) - * field in MeshPacket called ‘priority’. + * field in MeshPacket called 'priority'. * And the transmission queue in the router object is now a priority queue. */ enum Priority { From 29fbfc2330076ec5bcd8e03b0380f1b0d3546ec8 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sun, 30 Jul 2023 16:49:13 +0200 Subject: [PATCH 031/137] Add last_rx_time and node_broadcast_interval_secs to Neighbor --- meshtastic/mesh.proto | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index da85c53..0e11d86 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1390,6 +1390,18 @@ message Neighbor { * SNR of last heard message */ float snr = 2; + + /* + * Reception time (in secs since 1970) of last message that was last sent by this ID. + * Note: this is for local storage only and will not be sent out over the mesh. + */ + fixed32 last_rx_time = 3; + + /* + * Broadcast interval of this neighbor (in seconds). + * Note: this is for local storage only and will not be sent out over the mesh. + */ + uint32 node_broadcast_interval_secs = 4; } /* From 4628e5960b3e39196057a3e552c3900837fb58d9 Mon Sep 17 00:00:00 2001 From: Jon Date: Sun, 30 Jul 2023 11:17:06 -0400 Subject: [PATCH 032/137] leave out neighbor --- meshtastic/admin.proto | 5 ----- 1 file changed, 5 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index e629a87..b71588e 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -110,11 +110,6 @@ message AdminMessage { */ REMOTEHARDWARE_CONFIG = 8; - /* - * TODO: REPLACE - */ - NEIGHBORINFO_CONFIG = 9; - /* * TODO: REPLACE */ From 950121a33b4a9cf0810424adacc1d381b9ed01ad Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 3 Aug 2023 06:25:14 -0500 Subject: [PATCH 033/137] Deprecate unused mesh_sds_timeout_secs --- meshtastic/config.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 7025a7b..4bfa52a 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -307,12 +307,13 @@ message Config { uint32 wait_bluetooth_secs = 4; /* + * Deprecated in 2.1.X * Mesh Super Deep Sleep Timeout Seconds * While in Light Sleep if this value is exceeded we will lower into super deep sleep * for sds_secs (default 1 year) or a button press * 0 for default of two hours, MAXUINT for disabled */ - uint32 mesh_sds_timeout_secs = 5; + uint32 mesh_sds_timeout_secs = 5 [deprecated = true]; /* * Super Deep Sleep Seconds @@ -868,4 +869,4 @@ message Config { LoRaConfig lora = 6; BluetoothConfig bluetooth = 7; } -} \ No newline at end of file +} From bf237d047027d9eee417985c2fddf1514ebf6570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 7 Aug 2023 19:04:17 +0200 Subject: [PATCH 034/137] Add Picomputer --- meshtastic/mesh.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 85ba046..bace066 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -413,7 +413,7 @@ enum HardwareModel { HELTEC_WIRELESS_PAPER = 49; /* - * LilyGo T-Deck with ESP32-S3 CPU, Keyboard, and IPS display + * LilyGo T-Deck with ESP32-S3 CPU, Keyboard and IPS display */ T_DECK = 50; @@ -421,6 +421,11 @@ enum HardwareModel { * LilyGo T-Watch S3 with ESP32-S3 CPU and IPS display */ T_WATCH_S3 = 51; + + /* + * Bobricius Picomputer with ESP32-S3 CPU, Keyboard and IPS display + */ + PICOMPUTER_S3 = 52; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From 3105696a1e92a44adb40a623770513654b45e39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 3 Aug 2023 14:19:56 +0200 Subject: [PATCH 035/137] Add hints how the payload of a certain portnum is encoded --- meshtastic/portnums.proto | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 514593a..4f546cb 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -27,6 +27,7 @@ enum PortNum { * Deprecated: do not use in new code (formerly called OPAQUE) * A message sent from a device outside of the mesh, in a form the mesh does not understand * NOTE: This must be 0, because it is documented in IMeshService.aidl to be so + * ENCODING: binary undefined */ UNKNOWN_APP = 0; @@ -34,64 +35,80 @@ enum PortNum { * A simple UTF-8 text message, which even the little micros in the mesh * can understand and show on their screen eventually in some circumstances * even signal might send messages in this form (see below) + * ENCODING: UTF-8 Plaintext (?) */ TEXT_MESSAGE_APP = 1; /* * Reserved for built-in GPIO/example app. * See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number + * ENCODING: Protobuf */ REMOTE_HARDWARE_APP = 2; /* * The built-in position messaging app. * Payload is a [Position](/docs/developers/protobufs/api#position) message + * ENCODING: Protobuf */ POSITION_APP = 3; /* * The built-in user info app. * Payload is a [User](/docs/developers/protobufs/api#user) message + * ENCODING: Protobuf */ NODEINFO_APP = 4; /* * Protocol control packets for mesh protocol use. * Payload is a [Routing](/docs/developers/protobufs/api#routing) message + * ENCODING: Protobuf */ ROUTING_APP = 5; /* * Admin control packets. * Payload is a [AdminMessage](/docs/developers/protobufs/api#adminmessage) message + * ENCODING: Protobuf */ ADMIN_APP = 6; /* * Compressed TEXT_MESSAGE payloads. + * ENCODING: UTF-8 Plaintext (?) with Unishox2 Compression + * NOTE: The Device Firmware converts a TEXT_MESSAGE_APP to TEXT_MESSAGE_COMPRESSED_APP if the compressed + * payload is shorter. There's no need for app developers to do this themselves. Also the firmware will decompress + * any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP. */ TEXT_MESSAGE_COMPRESSED_APP = 7; /* * Waypoint payloads. * Payload is a [Waypoint](/docs/developers/protobufs/api#waypoint) message + * ENCODING: Protobuf */ WAYPOINT_APP = 8; /* * Audio Payloads. * Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now + * ENCODING: codec2 audio frames + * NOTE: audio frames contain a 3 byte header (0xc0 0xde 0xc2) and a one byte marker for the decompressed bitrate. + * This marker comes from the 'moduleConfig.audio.bitrate' enum minus one. */ AUDIO_APP = 9; /* * Provides a 'ping' service that replies to any packet it receives. * Also serves as a small example module. + * ENCODING: ASCII Plaintext */ REPLY_APP = 32; /* * Used for the python IP tunnel feature + * ENCODING: IP Packet. Handled by the python API, firmware ignores this one and pases on. */ IP_TUNNEL_APP = 33; @@ -101,23 +118,27 @@ enum PortNum { * network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network. * Maximum packet size of 240 bytes. * Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp. + * ENCODING: binary undefined */ SERIAL_APP = 64; /* * STORE_FORWARD_APP (Work in Progress) * Maintained by Jm Casler (MC Hamster) : jm@casler.org + * ENCODING: Protobuf */ STORE_FORWARD_APP = 65; /* * Optional port for messages for the range test module. + * ENCODING: ASCII Plaintext */ RANGE_TEST_APP = 66; /* * Provides a format to send and receive telemetry data from the Meshtastic network. * Maintained by Charles Crossan (crossan007) : crossan007@gmail.com + * ENCODING: Protobuf */ TELEMETRY_APP = 67; @@ -125,6 +146,7 @@ enum PortNum { * Experimental tools for estimating node position without a GPS * Maintained by Github user a-f-G-U-C (a Meshtastic contributor) * Project files at https://github.com/a-f-G-U-C/Meshtastic-ZPS + * ENCODING: arrays of int64 fields */ ZPS_APP = 68; @@ -133,17 +155,20 @@ enum PortNum { * as if they did using their LoRa chip. * Maintained by GitHub user GUVWAF. * Project files at https://github.com/GUVWAF/Meshtasticator + * ENCODING: Protobuf (?) */ SIMULATOR_APP = 69; /* * Provides a traceroute functionality to show the route a packet towards * a certain destination would take on the mesh. + * ENCODING: Protobuf */ TRACEROUTE_APP = 70; /* * Aggregates edge info for the network by sending out a list of each node's neighbors + * ENCODING: Protobuf */ NEIGHBORINFO_APP = 71; @@ -156,6 +181,7 @@ enum PortNum { /* * ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder + * ENCODING: libcotshrink */ ATAK_FORWARDER = 257; @@ -163,4 +189,4 @@ enum PortNum { * Currently we limit port nums to no higher than this value */ MAX = 511; -} \ No newline at end of file +} From 773592a4a4508a7d4b62efea4a50bb48881d9967 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 11 Aug 2023 13:23:15 -0500 Subject: [PATCH 036/137] Add LoraType hardware model --- meshtastic/mesh.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index bace066..2e93e3d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -310,6 +310,11 @@ enum HardwareModel { */ NANO_G2_ULTRA = 18; + /* + * LoRAType device: https://loratype.org/ + */ + LORA_TYPE = 19; + /* * B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */ @@ -1467,4 +1472,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} +} \ No newline at end of file From ca0942e9100f03e43cca47367dd6aae4dabbec00 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 11 Aug 2023 20:25:44 -0500 Subject: [PATCH 037/137] Remove mesh_sds_timeout_secs and bump node_db_lite to 100 for now --- meshtastic/config.proto | 11 +---------- meshtastic/deviceonly.options | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 4bfa52a..e72c39c 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -306,15 +306,6 @@ message Config { */ uint32 wait_bluetooth_secs = 4; - /* - * Deprecated in 2.1.X - * Mesh Super Deep Sleep Timeout Seconds - * While in Light Sleep if this value is exceeded we will lower into super deep sleep - * for sds_secs (default 1 year) or a button press - * 0 for default of two hours, MAXUINT for disabled - */ - uint32 mesh_sds_timeout_secs = 5 [deprecated = true]; - /* * Super Deep Sleep Seconds * While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep @@ -869,4 +860,4 @@ message Config { LoRaConfig lora = 6; BluetoothConfig bluetooth = 7; } -} +} \ No newline at end of file diff --git a/meshtastic/deviceonly.options b/meshtastic/deviceonly.options index b03209b..3992bf5 100644 --- a/meshtastic/deviceonly.options +++ b/meshtastic/deviceonly.options @@ -2,7 +2,7 @@ # https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options # FIXME pick a higher number someday? or do dynamic alloc in nanopb? -*DeviceState.node_db_lite max_count:80 +*DeviceState.node_db_lite max_count:100 # FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in RAM *DeviceState.receive_queue max_count:1 From 9e9ffc5c05ff05824e81b0652735ec3877d8ecfb Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 13 Aug 2023 06:43:07 -0500 Subject: [PATCH 038/137] Added new Detection module for easier detection of state changes --- meshtastic/admin.proto | 5 ++++ meshtastic/localonly.proto | 12 ++++++++- meshtastic/module_config.options | 5 +++- meshtastic/module_config.proto | 46 ++++++++++++++++++++++++++++++-- 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index e629a87..e628757 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -119,6 +119,11 @@ message AdminMessage { * TODO: REPLACE */ AMBIENTLIGHTING_CONFIG = 10; + + /* + * TODO: REPLACE + */ + DETECTION_CONFIG = 11; } /* diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index 4b51795..fed0cbf 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -111,10 +111,20 @@ message LocalModuleConfig { */ ModuleConfig.NeighborInfoConfig neighbor_info = 11; + /* + * The part of the config that is specific to the Neighbor Info module + */ + ModuleConfig.AmbientLightingConfig ambient_lighting = 12; + + /* + * The part of the config that is specific to the Neighbor Info module + */ + ModuleConfig.DetectionConfig detection = 13; + /* * A version integer used to invalidate old save files when we make * incompatible changes This integer is set at build time and is private to * NodeDB.cpp in the device code. */ uint32 version = 8; -} +} \ No newline at end of file diff --git a/meshtastic/module_config.options b/meshtastic/module_config.options index ed45932..558a209 100644 --- a/meshtastic/module_config.options +++ b/meshtastic/module_config.options @@ -22,4 +22,7 @@ *AmbientLightingConfig.current int_size:8 *AmbientLightingConfig.red int_size:8 *AmbientLightingConfig.green int_size:8 -*AmbientLightingConfig.blue int_size:8 \ No newline at end of file +*AmbientLightingConfig.blue int_size:8 + +*DetectionConfig.monitor_pin int_size:8 +*DetectionConfig.name max_size:20 \ No newline at end of file diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 75fb96f..232bdb7 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -108,6 +108,45 @@ message ModuleConfig { uint32 update_interval = 2; } + /* + * Detection Module Config + */ + message DetectionConfig { + /* + * Whether the Module is enabled + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we can send a message, if a state change is detected + */ + uint32 minumum_update_interval = 2; + + /* + * GPIO pin to monitor for state changes + */ + uint32 monitor_pin = 3; + + /* + * Whether or not the GPIO pin state detection is triggered on HIGH (1) + * Otherwise LOW (0) + */ + bool detection_triggered_high = 4; + + /* + * Send ASCII bell with alert message + * Useful for trigger ext. notification on bell + */ + bool send_bell = 5; + + /* + * Friendly name used to format message sent to mesh + * Example: A name "Motion" would result in a message "Motion detected" + * Maximum length of 20 characters + */ + string name = 6; + } + /* * Audio Config for codec2 voice */ @@ -614,9 +653,12 @@ message ModuleConfig { * TODO: REPLACE */ AmbientLightingConfig ambient_lighting = 11; + + /* + * TODO: REPLACE + */ + DetectionConfig detection = 12; } - - } /* From 3c5c9acf923197fcb28867bfb5710d9367d45816 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 13 Aug 2023 06:47:58 -0500 Subject: [PATCH 039/137] Words --- meshtastic/module_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 232bdb7..e9ee092 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -118,7 +118,7 @@ message ModuleConfig { bool enabled = 1; /* - * Interval in seconds of how often we can send a message, if a state change is detected + * Interval in seconds of how often we can send a message to the mesh when a state change is detected */ uint32 minumum_update_interval = 2; From a726d6242e2e48ebac6efd7e5d0a37e3a38209f8 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 13 Aug 2023 08:10:24 -0500 Subject: [PATCH 040/137] Renamed to Detection Sensor --- meshtastic/admin.proto | 2 +- meshtastic/localonly.proto | 4 ++-- meshtastic/module_config.options | 4 ++-- meshtastic/module_config.proto | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index e628757..1fcd78d 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -123,7 +123,7 @@ message AdminMessage { /* * TODO: REPLACE */ - DETECTION_CONFIG = 11; + DETECTIONSENSOR_CONFIG = 11; } /* diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index fed0cbf..bc46b1c 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -117,9 +117,9 @@ message LocalModuleConfig { ModuleConfig.AmbientLightingConfig ambient_lighting = 12; /* - * The part of the config that is specific to the Neighbor Info module + * The part of the config that is specific to the Detection Sensor module */ - ModuleConfig.DetectionConfig detection = 13; + ModuleConfig.DetectionSensorConfig detection_sensor = 13; /* * A version integer used to invalidate old save files when we make diff --git a/meshtastic/module_config.options b/meshtastic/module_config.options index 558a209..fdc46d5 100644 --- a/meshtastic/module_config.options +++ b/meshtastic/module_config.options @@ -24,5 +24,5 @@ *AmbientLightingConfig.green int_size:8 *AmbientLightingConfig.blue int_size:8 -*DetectionConfig.monitor_pin int_size:8 -*DetectionConfig.name max_size:20 \ No newline at end of file +*DetectionSensorConfig.monitor_pin int_size:8 +*DetectionSensorConfig.name max_size:20 \ No newline at end of file diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index e9ee092..3491ca6 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -109,9 +109,9 @@ message ModuleConfig { } /* - * Detection Module Config + * Detection Sensor Module Config */ - message DetectionConfig { + message DetectionSensorConfig { /* * Whether the Module is enabled */ @@ -657,7 +657,7 @@ message ModuleConfig { /* * TODO: REPLACE */ - DetectionConfig detection = 12; + DetectionSensorConfig detection_sensor = 12; } } From e94a5f16645507f6961582ea1613f132b4a19366 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 13 Aug 2023 08:11:21 -0500 Subject: [PATCH 041/137] Spelling --- meshtastic/module_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 3491ca6..e6a1b34 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -120,7 +120,7 @@ message ModuleConfig { /* * Interval in seconds of how often we can send a message to the mesh when a state change is detected */ - uint32 minumum_update_interval = 2; + uint32 minimum_update_interval = 2; /* * GPIO pin to monitor for state changes From e6a12394c2b996d1c1bb6d92e956c49dea58e01c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 13 Aug 2023 08:12:14 -0500 Subject: [PATCH 042/137] More minumums! --- meshtastic/config.proto | 2 +- meshtastic/mesh.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index e72c39c..5da460f 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -268,7 +268,7 @@ message Config { uint32 broadcast_smart_minimum_distance = 10; /* - * The minumum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + * The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled */ uint32 broadcast_smart_minimum_interval_secs = 11; } diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 2e93e3d..4d0ec0f 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1094,7 +1094,7 @@ enum CriticalErrorCode { TRANSMIT_FAILED = 8; /* - * We detected that the main CPU voltage dropped below the minumum acceptable value + * We detected that the main CPU voltage dropped below the minimum acceptable value */ BROWNOUT = 9; From 56f62b29377e1f43be49e6beb55a17c8aca1b4c5 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 13 Aug 2023 14:10:38 -0500 Subject: [PATCH 043/137] Added state_broadcast_secs --- meshtastic/module_config.proto | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index e6a1b34..9fabbf8 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -120,31 +120,38 @@ message ModuleConfig { /* * Interval in seconds of how often we can send a message to the mesh when a state change is detected */ - uint32 minimum_update_interval = 2; + uint32 minimum_broadcast_secs = 2; + + /* + * Interval in seconds of how often we should send a message to the mesh with the current state regardless of changes + * When set to 0, only state changes will be broadcasted + * Works as a sort of status heartbeat for peace of mind + */ + uint32 state_broadcast_secs = 3; /* * GPIO pin to monitor for state changes */ - uint32 monitor_pin = 3; + uint32 monitor_pin = 43; /* * Whether or not the GPIO pin state detection is triggered on HIGH (1) * Otherwise LOW (0) */ - bool detection_triggered_high = 4; + bool detection_triggered_high = 5; /* * Send ASCII bell with alert message - * Useful for trigger ext. notification on bell + * Useful for triggering ext. notification on bell */ - bool send_bell = 5; + bool send_bell = 6; /* * Friendly name used to format message sent to mesh * Example: A name "Motion" would result in a message "Motion detected" * Maximum length of 20 characters */ - string name = 6; + string name = 7; } /* From 9993a1df74e02c18e9c586c494904103c50c7f5d Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 13 Aug 2023 19:02:39 -0500 Subject: [PATCH 044/137] Fixed copy pasta and index --- meshtastic/localonly.proto | 2 +- meshtastic/module_config.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index bc46b1c..5f46f9a 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -112,7 +112,7 @@ message LocalModuleConfig { ModuleConfig.NeighborInfoConfig neighbor_info = 11; /* - * The part of the config that is specific to the Neighbor Info module + * The part of the config that is specific to the Ambient Lighting module */ ModuleConfig.AmbientLightingConfig ambient_lighting = 12; diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 9fabbf8..89b053a 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -132,7 +132,7 @@ message ModuleConfig { /* * GPIO pin to monitor for state changes */ - uint32 monitor_pin = 43; + uint32 monitor_pin = 4; /* * Whether or not the GPIO pin state detection is triggered on HIGH (1) From 04864570c561212ba6f66cbb113abcd3c292ac24 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 14 Aug 2023 06:34:35 -0500 Subject: [PATCH 045/137] use_pullup --- meshtastic/module_config.proto | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 89b053a..649a343 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -128,30 +128,35 @@ message ModuleConfig { * Works as a sort of status heartbeat for peace of mind */ uint32 state_broadcast_secs = 3; - - /* - * GPIO pin to monitor for state changes - */ - uint32 monitor_pin = 4; - - /* - * Whether or not the GPIO pin state detection is triggered on HIGH (1) - * Otherwise LOW (0) - */ - bool detection_triggered_high = 5; - /* * Send ASCII bell with alert message * Useful for triggering ext. notification on bell */ - bool send_bell = 6; + bool send_bell = 4; /* * Friendly name used to format message sent to mesh * Example: A name "Motion" would result in a message "Motion detected" * Maximum length of 20 characters */ - string name = 7; + string name = 5; + + /* + * GPIO pin to monitor for state changes + */ + uint32 monitor_pin = 6; + + /* + * Whether or not the GPIO pin state detection is triggered on HIGH (1) + * Otherwise LOW (0) + */ + bool detection_triggered_high = 7; + + /* + * Whether or not use INPUT_PULLUP mode for GPIO pin + * Only applicable if the board uses pull-up resistors on the pin + */ + bool use_pullup = 8; } /* From 4f543adbd6a1c7847b772c5d3b9a9bf2b5da876f Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 18 Aug 2023 07:43:31 -0500 Subject: [PATCH 046/137] Add DETECTION_SENSOR_APP portnum --- meshtastic/portnums.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 4f546cb..3332a60 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -99,6 +99,11 @@ enum PortNum { */ AUDIO_APP = 9; + /* + * Same as Text Message but originating from Detection Sensor Module. + */ + DETECTION_SENSOR_APP = 10; + /* * Provides a 'ping' service that replies to any packet it receives. * Also serves as a small example module. @@ -189,4 +194,4 @@ enum PortNum { * Currently we limit port nums to no higher than this value */ MAX = 511; -} +} \ No newline at end of file From 67ebc7c61b0dbdb1bacc5fc81a407eeb12441a32 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Tue, 22 Aug 2023 16:47:27 +0200 Subject: [PATCH 047/137] Update mesh.proto --- meshtastic/mesh.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 4d0ec0f..e96a52c 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -432,6 +432,11 @@ enum HardwareModel { */ PICOMPUTER_S3 = 52; + /* + * Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa + */ + PICOMPUTER_S3 = 53; + /* * ------------------------------------------------------------------------------------------------------------------------------------------ * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. @@ -1472,4 +1477,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} \ No newline at end of file +} From 47bf250938723f2d1b32702653ad9635f19ee842 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Tue, 22 Aug 2023 16:49:55 +0200 Subject: [PATCH 048/137] Update mesh.proto --- meshtastic/mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e96a52c..26c5f00 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -435,7 +435,7 @@ enum HardwareModel { /* * Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa */ - PICOMPUTER_S3 = 53; + HELTEC_HT62 = 53; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From 6e0333191c345db0f2ab38dd270cd3532238584f Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Tue, 22 Aug 2023 18:09:08 +0200 Subject: [PATCH 049/137] Update mesh.proto --- meshtastic/mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 26c5f00..bf7534d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -431,7 +431,7 @@ enum HardwareModel { * Bobricius Picomputer with ESP32-S3 CPU, Keyboard and IPS display */ PICOMPUTER_S3 = 52; - + /* * Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa */ From 666e6043635ac74c304d757ff588ede8b317485a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 4 Sep 2023 18:06:20 -0500 Subject: [PATCH 050/137] Update to indicate the new default flags --- meshtastic/config.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 5da460f..7ed6377 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -142,8 +142,9 @@ message Config { message PositionConfig { /* * Bit field of boolean configuration options, indicating which optional - * fields to include when assembling POSITION messages - * Longitude and latitude are always included (also time if GPS-synced) + * fields to include when assembling POSITION messages. + * Longitude, latitude, altitude, speed, heading, and DOP + * are always included (also time if GPS-synced) * NOTE: the more fields are included, the larger the message will be - * leading to longer airtime and a higher risk of packet loss */ From 1d38ee2e58e8118d44258733a529cd6a9fb6fcd5 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 8 Sep 2023 06:14:59 -0500 Subject: [PATCH 051/137] Cleanup ambient lighting comments --- meshtastic/module_config.proto | 36 ++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 649a343..3790310 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -585,26 +585,36 @@ message ModuleConfig { bool send_bell = 11; } - /*Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. - Initially created for the RAK14001 RGB LED module. + /* + Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. + Initially created for the RAK14001 RGB LED module. */ message AmbientLightingConfig { - /*Sets LED to on or off. */ - bool led_state = 1; + /* + * Sets LED to on or off. + */ + bool led_state = 1; - /*Sets the overall current for the LED, firmware side range for the RAK14001 is 1-31, but users should be given a range of 0-100% */ - uint32 current = 2; + /* + * Sets the current for the LED output. Default is 10. + */ + uint32 current = 2; - /*Sets the red level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ + /* + * Sets the red LED level. Values are 0-255. + */ + uint32 red = 3; - uint32 red = 3; // Red level + /* + * Sets the green LED level. Values are 0-255. + */ + uint32 green = 4; - /*Sets the green level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 green = 4; // Green level - - /*Sets the blue level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% */ - uint32 blue = 5; // Blue level + /* + * Sets the blue LED level. Values are 0-255. + */ + uint32 blue = 5; } /* From 018f4c8db092bd1b98c7343e154a69423938df56 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 12 Sep 2023 13:42:57 -0500 Subject: [PATCH 052/137] Updating time comments --- meshtastic/mesh.proto | 7 +++---- meshtastic/telemetry.proto | 8 ++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index bf7534d..aff0e4f 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -37,9 +37,8 @@ message Position { /* * This is usually not sent over the mesh (to save space), but it is sent - * from the phone so that the local device can set its RTC If it is sent over - * the mesh (because there are devices on the mesh without GPS), it will only - * be sent by devices which has a hardware GPS clock. + * from the phone so that the local device can set its time If it is sent over + * the mesh (because there are devices on the mesh without GPS or RTC). * seconds since 1970 */ fixed32 time = 4; @@ -1477,4 +1476,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} +} \ No newline at end of file diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 0ee910b..041acc5 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -138,11 +138,7 @@ message AirQualityMetrics { */ message Telemetry { /* - * This is usually not sent over the mesh (to save space), but it is sent - * from the phone so that the local device can set its RTC If it is sent over - * the mesh (because there are devices on the mesh without GPS), it will only - * be sent by devices which has a hardware GPS clock (IE Mobile Phone). - * seconds since 1970 + * Seconds since 1970 - or 0 for unknown/unset */ fixed32 time = 1; @@ -237,4 +233,4 @@ enum TelemetrySensorType { * PM2.5 air quality sensor */ PMSA003I = 13; -} +} \ No newline at end of file From ebfd5de415ea61f1ece876a85248280a96874eb4 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 12 Sep 2023 13:44:46 -0500 Subject: [PATCH 053/137] case --- meshtastic/mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index aff0e4f..e69e064 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -37,7 +37,7 @@ message Position { /* * This is usually not sent over the mesh (to save space), but it is sent - * from the phone so that the local device can set its time If it is sent over + * from the phone so that the local device can set its time if it is sent over * the mesh (because there are devices on the mesh without GPS or RTC). * seconds since 1970 */ From 17a1f299913249b65434aadf5f0aa657e274991c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 18 Sep 2023 12:53:55 -0500 Subject: [PATCH 054/137] Hop limit overflow comments --- meshtastic/config.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 7ed6377..ae5cc16 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -758,6 +758,7 @@ message Config { /* * Maximum number of hops. This can't be greater than 7. * Default of 3 + * Attempting to set a value > 7 results in the default */ uint32 hop_limit = 8; @@ -861,4 +862,4 @@ message Config { LoRaConfig lora = 6; BluetoothConfig bluetooth = 7; } -} \ No newline at end of file +} From 524819facebc70ad381f765fedc36003f6994783 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 18 Sep 2023 18:30:38 -0500 Subject: [PATCH 055/137] Adds gps_en_able to indicate GPS enable pin, or 0 for none Adds enable_triple_click to enable the GPS toggle on triple press --- meshtastic/config.proto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index ae5cc16..7fe84c6 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -134,6 +134,11 @@ message Config { * Clients should then limit available configuration and administrative options inside the user interface */ bool is_managed = 9; + + /* + * Enables the triple-press of user button to enable or disable GPS + */ + bool enable_triple_click = 10; } /* @@ -272,6 +277,11 @@ message Config { * The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled */ uint32 broadcast_smart_minimum_interval_secs = 11; + + /* + * (Re)define PIN_GPS_EN for your board. + */ + uint32 gps_en_gpio = 12; } /* From 44701ff4e267ad21a15064db3983b0f09e40dbfd Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Tue, 19 Sep 2023 10:44:01 -0500 Subject: [PATCH 056/137] Flip-flop the default state of enable_triple_click --- meshtastic/config.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 7fe84c6..03838ea 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -136,9 +136,9 @@ message Config { bool is_managed = 9; /* - * Enables the triple-press of user button to enable or disable GPS + * Disables the triple-press of user button to enable or disable GPS */ - bool enable_triple_click = 10; + bool disable_triple_click = 10; } /* From 10db8bc43ea5cfbf22e3b7d47b0e4f45327569d4 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 26 Sep 2023 06:33:37 -0500 Subject: [PATCH 057/137] Notes about public mqtt traffic --- meshtastic/portnums.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 3332a60..598de93 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -101,6 +101,7 @@ enum PortNum { /* * Same as Text Message but originating from Detection Sensor Module. + * NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 */ DETECTION_SENSOR_APP = 10; @@ -137,6 +138,7 @@ enum PortNum { /* * Optional port for messages for the range test module. * ENCODING: ASCII Plaintext + * NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 */ RANGE_TEST_APP = 66; From 4a9300c504c0517d9f97473fa2eb97175ae2cf2f Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 30 Sep 2023 14:59:12 -0500 Subject: [PATCH 058/137] Documentation about sleepy tracker and sensor roles --- meshtastic/config.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 03838ea..22355ed 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -52,12 +52,16 @@ message Config { /* * Tracker device role * Position Mesh packets will be prioritized higher and sent more frequently by default. + * When used in conjunction with power.is_power_saving = true, nodes will wake up, + * send position, and then sleep for position.position_broadcast_secs seconds. */ TRACKER = 5; /* * Sensor device role * Telemetry Mesh packets will be prioritized higher and sent more frequently by default. + * When used in conjunction with power.is_power_saving = true, nodes will wake up, + * send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. */ SENSOR = 6; } From 82f6b6083f2445b07b07906bf5a91b38f1ee0d95 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Tue, 3 Oct 2023 09:09:46 +1100 Subject: [PATCH 059/137] update CI (#392) * update CI * allow create_tag to write --- .github/workflows/ci.yml | 7 +++++-- .github/workflows/create_tag.yml | 9 ++++++--- .github/workflows/nightly.yml | 19 ------------------- .github/workflows/publish.yml | 7 +++++-- .github/workflows/pull_request.yml | 12 ++++++++---- .trunk/.gitignore | 2 +- .trunk/trunk.yaml | 21 ++++++++++++--------- 7 files changed, 37 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fb8676..9322ba5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,8 @@ name: Push commit to schema registry +permissions: + contents: read + on: push: branches: @@ -11,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Buf - uses: bufbuild/buf-setup-action@v1.18.0 + uses: bufbuild/buf-setup-action@v1.26.1 with: github_token: ${{ github.token }} diff --git a/.github/workflows/create_tag.yml b/.github/workflows/create_tag.yml index 3c49457..482ea79 100644 --- a/.github/workflows/create_tag.yml +++ b/.github/workflows/create_tag.yml @@ -1,5 +1,8 @@ name: Create tag +permissions: + contents: write + on: workflow_dispatch: inputs: @@ -18,7 +21,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - id: version @@ -47,7 +50,7 @@ jobs: echo "NEW_VERSION=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_OUTPUT - name: Create release - uses: ncipollo/release-action@v1.12.0 + uses: ncipollo/release-action@v1.13.0 with: name: Meshtastic Protobufs ${{ steps.version.outputs.NEW_VERSION }} tag: ${{ steps.version.outputs.NEW_VERSION }} @@ -55,7 +58,7 @@ jobs: token: ${{ github.token }} - name: Setup Buf - uses: bufbuild/buf-setup-action@v1 + uses: bufbuild/buf-setup-action@v1.26.1 with: github_token: ${{ github.token }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index d9d52a2..0000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Nightly -on: - schedule: - - cron: 0 8 * * 1-5 - workflow_dispatch: {} - -jobs: - trunk_check: - name: Trunk Check Upload - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Trunk Check - uses: trunk-io/trunk-action@v1 - with: - trunk-token: ${{ secrets.TRUNK_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index da3d251..a54687d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,8 @@ name: Push new version to schema registry +permissions: + contents: read + on: push: tags: @@ -11,10 +14,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Buf - uses: bufbuild/buf-setup-action@v1 + uses: bufbuild/buf-setup-action@v1.26.1 with: github_token: ${{ github.token }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a7b6e68..598c808 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,4 +1,8 @@ name: pull-request + +permissions: + contents: read + on: pull_request jobs: build: @@ -6,18 +10,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Buf - uses: bufbuild/buf-setup-action@v1 + uses: bufbuild/buf-setup-action@v1.26.1 with: github_token: ${{ github.token }} - name: Lint - uses: bufbuild/buf-lint-action@v1 + uses: bufbuild/buf-lint-action@v1.0.3 - name: Push to schema registry - uses: bufbuild/buf-push-action@v1 + uses: bufbuild/buf-push-action@v1.1.1 with: buf_token: ${{ secrets.BUF_TOKEN }} draft: ${{ github.ref_name != 'master'}} diff --git a/.trunk/.gitignore b/.trunk/.gitignore index 8130ba6..1e24652 100644 --- a/.trunk/.gitignore +++ b/.trunk/.gitignore @@ -2,7 +2,7 @@ *logs *actions *notifications +*tools plugins user_trunk.yaml user.yaml -shims diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index b685b59..acdfaad 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,25 +1,28 @@ version: 0.1 cli: - version: 1.10.0 + version: 1.16.2 plugins: sources: - id: trunk - ref: v0.0.17 + ref: v1.2.5 uri: https://github.com/trunk-io/plugins lint: enabled: + - checkov@2.4.9 + - trivy@0.45.1 + - trufflehog@3.57.0 - yamllint@1.32.0 - - buf-lint@1.20.0 - - buf-breaking@1.20.0 - - actionlint@1.6.24 - - markdownlint@0.34.0 - - prettier@2.8.8 - - gitleaks@8.16.3 + - buf-lint@1.26.1 + - buf-breaking@1.26.1 + - actionlint@1.6.26 + - markdownlint@0.37.0 + - prettier@3.0.3 + - gitleaks@8.18.0 - git-diff-check runtimes: enabled: - python@3.10.8 - - go@1.19.5 + - go@1.21.0 - node@18.12.1 actions: disabled: From abb98c81f7f948f6f9b04221356b6620585f4d88 Mon Sep 17 00:00:00 2001 From: S5NC <145265251+S5NC@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:01:23 +0100 Subject: [PATCH 060/137] Update mesh.proto --- meshtastic/mesh.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e69e064..593f411 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -435,6 +435,11 @@ enum HardwareModel { * Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa */ HELTEC_HT62 = 53; + + /* + * E22-900M series modules with ESP32-S3 + */ + E22_900M_S3 = 54; /* * ------------------------------------------------------------------------------------------------------------------------------------------ @@ -1476,4 +1481,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} \ No newline at end of file +} From cb5696dc04529dd841e5c34b524eb2a6e45e7afe Mon Sep 17 00:00:00 2001 From: S5NC <145265251+S5NC@users.noreply.github.com> Date: Wed, 11 Oct 2023 00:33:57 +0100 Subject: [PATCH 061/137] Update mesh.proto --- meshtastic/mesh.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 593f411..1cf8abd 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -437,9 +437,9 @@ enum HardwareModel { HELTEC_HT62 = 53; /* - * E22-900M series modules with ESP32-S3 + * Boards with EBYTE SPI LoRa modules and ESP32-S3 MCU */ - E22_900M_S3 = 54; + EBYTE_ESP32_S3 = 54; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From 850d95f6801f7c6d04118dfdb1f20ca7172da8a3 Mon Sep 17 00:00:00 2001 From: S5NC <145265251+S5NC@users.noreply.github.com> Date: Wed, 11 Oct 2023 00:35:57 +0100 Subject: [PATCH 062/137] Update mesh.proto --- meshtastic/mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 1cf8abd..e8eda53 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -437,7 +437,7 @@ enum HardwareModel { HELTEC_HT62 = 53; /* - * Boards with EBYTE SPI LoRa modules and ESP32-S3 MCU + * EBYTE SPI LoRa module and ESP32-S3 */ EBYTE_ESP32_S3 = 54; From 54e43ff60c12d8a6c9b91433e66513cd3d70bd24 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 12 Oct 2023 18:13:55 -0500 Subject: [PATCH 063/137] TAK specific role --- meshtastic/config.proto | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 22355ed..894a32d 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -64,6 +64,14 @@ message Config { * send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. */ SENSOR = 6; + + /* + * TAK device role + * Used for nodes dedicated for connection to an ATAK EUD. + * Turns off many of the routine broadcasts to favor CoT packet stream + * from the Meshtastic ATAK plugin -> IMeshService -> Node + */ + TAK = 7; } /* @@ -876,4 +884,4 @@ message Config { LoRaConfig lora = 6; BluetoothConfig bluetooth = 7; } -} +} \ No newline at end of file From bcef87cc3bce58095b5e191bb2fbccc6bd003d56 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 23 Oct 2023 15:40:29 -0500 Subject: [PATCH 064/137] Ext. Notification use i2s audio interface as buzzer --- meshtastic/module_config.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 3790310..8cad265 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -379,6 +379,12 @@ message ModuleConfig { * and/or beep for 60 seconds */ uint32 nag_timeout = 14; + + /* + * When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer + * T-Watch S3 and T-Deck for example have this capability + */ + bool use_i2s_as_buzzer = 15; } /* From 9bf93e1cb95bf367933c468a297cf5a1c9e1c6d5 Mon Sep 17 00:00:00 2001 From: Ric In New Mexico <78682404+RicInNewMexico@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:04:31 -0600 Subject: [PATCH 065/137] Addition of PowerMetrics to telemetry.proto modified: meshtastic/telemetry.proto --- meshtastic/telemetry.proto | 44 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 041acc5..5914331 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -58,16 +58,51 @@ message EnvironmentMetrics { float gas_resistance = 4; /* - * Voltage measured + * Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */ float voltage = 5; /* - * Current measured + * Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */ float current = 6; } +/* + * Power Metrics (voltage / current / etc) + */ +message PowerMetrics { + /* + * Voltage (Ch1) + */ + float ch1_voltage = 1; + + /* + * Current (Ch1) + */ + float ch1_current = 2; + + /* + * Voltage (Ch2) + */ + float ch2_voltage = 3; + + /* + * Current (Ch2) + */ + float ch2_current = 4; + + /* + * Voltage (Ch3) + */ + float ch3_voltage = 5; + + /* + * Current (Ch3) + */ + float ch3_current = 6; +} + /* * Air quality metrics */ @@ -157,6 +192,11 @@ message Telemetry { * Air quality metrics */ AirQualityMetrics air_quality_metrics = 4; + + /* + * Power Metrics + */ + PowerMetrics power_metrics = 5; } } From 960e65133a5cc73bdf128fcd1591a13f5bb74acc Mon Sep 17 00:00:00 2001 From: RicInNewMexico Date: Thu, 26 Oct 2023 20:29:02 -0600 Subject: [PATCH 066/137] Adding Power Metrics Telemetry Variant modified: meshtastic/module_config.proto modified: meshtastic/telemetry.proto --- meshtastic/module_config.proto | 27 +++++++++++++++++++++++++++ meshtastic/telemetry.proto | 8 ++++++++ 2 files changed, 35 insertions(+) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 8cad265..ee2fdaa 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -482,6 +482,33 @@ message ModuleConfig { * air quality metrics to the mesh */ uint32 air_quality_interval = 7; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + bool power_measurement_enabled = 8; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + uint32 power_update_interval = 9; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + bool power_screen_enabled = 10; + + + + + + + + + } /* diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 5914331..3843631 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -273,4 +273,12 @@ enum TelemetrySensorType { * PM2.5 air quality sensor */ PMSA003I = 13; + + /* + * INA3221 3 Channel Voltage / Current Sensor + */ + INA3221 = 14; + + + } \ No newline at end of file From 36bd105cd56fd0563694eb73ab982e263966e59d Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 15 Nov 2023 06:27:46 -0600 Subject: [PATCH 067/137] Admin message for removing node by nodenum --- meshtastic/admin.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 1fcd78d..a14cc0e 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -260,6 +260,11 @@ message AdminMessage { */ string set_ringtone_message = 37; + /* + * Remove the node by the specified node-num from the NodeDB on the device + */ + uint32 remove_by_nodenum = 38; + /* * Begins an edit transaction for config, module config, owner, and channel settings changes * This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) From c845b7848eebb11150ca0427773303bf8758e533 Mon Sep 17 00:00:00 2001 From: tobi-sys <126721458+tobi-sys@users.noreply.github.com> Date: Fri, 10 Nov 2023 21:07:57 +0100 Subject: [PATCH 068/137] Changed the variable length of wifi_psk WiFi PSK can be 256 bits = 32 Bytes and can be represented by a 64 character long hexadecimal string The size of the variable must be 65 bytes to hold the string and the trailing \0 --- meshtastic/config.options | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/config.options b/meshtastic/config.options index 3448af5..4490f08 100644 --- a/meshtastic/config.options +++ b/meshtastic/config.options @@ -1,5 +1,5 @@ *NetworkConfig.wifi_ssid max_size:33 -*NetworkConfig.wifi_psk max_size:64 +*NetworkConfig.wifi_psk max_size:65 *NetworkConfig.ntp_server max_size:33 *NetworkConfig.rsyslog_server max_size:33 @@ -11,4 +11,4 @@ *LoRaConfig.coding_rate int_size:8 *LoRaConfig.channel_num int_size:16 -*PowerConfig.device_battery_ina_address int_size:8 \ No newline at end of file +*PowerConfig.device_battery_ina_address int_size:8 From da22c442b3d13fad02de3b04d4dd6c4f2480b25b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 26 Nov 2023 06:53:52 -0600 Subject: [PATCH 069/137] Add role to NodeInfo/Lite --- meshtastic/deviceonly.proto | 5 +++++ meshtastic/mesh.proto | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 4f6b9a9..75f9913 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -116,6 +116,11 @@ message NodeInfoLite { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; + + /* + * Indicates that the device's role in the mesh + */ + Config.DeviceConfig.Role role = 8; } /* diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e8eda53..4d7542c 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1046,6 +1046,11 @@ message NodeInfo { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; + + /* + * Indicates that the device's role in the mesh + */ + Config.DeviceConfig.Role role = 8; } /* From 371d76d9eea0705e916ce2d093efc6e9ad5d2b2b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 26 Nov 2023 08:17:50 -0600 Subject: [PATCH 070/137] Config include --- meshtastic/deviceonly.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 75f9913..864b4b1 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -7,6 +7,7 @@ import "meshtastic/localonly.proto"; import "meshtastic/mesh.proto"; import "meshtastic/telemetry.proto"; import "meshtastic/module_config.proto"; +import "meshtastic/config.proto"; option csharp_namespace = "Meshtastic.Protobufs"; option go_package = "github.com/meshtastic/go/generated"; @@ -116,7 +117,7 @@ message NodeInfoLite { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; - + /* * Indicates that the device's role in the mesh */ From 4f3e5f8b81229f50eb8de22c3d237f621eb5d149 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 26 Nov 2023 14:07:06 -0600 Subject: [PATCH 071/137] Revert "Add role to NodeInfo/Lite" --- meshtastic/deviceonly.proto | 6 ------ meshtastic/mesh.proto | 5 ----- 2 files changed, 11 deletions(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 864b4b1..4f6b9a9 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -7,7 +7,6 @@ import "meshtastic/localonly.proto"; import "meshtastic/mesh.proto"; import "meshtastic/telemetry.proto"; import "meshtastic/module_config.proto"; -import "meshtastic/config.proto"; option csharp_namespace = "Meshtastic.Protobufs"; option go_package = "github.com/meshtastic/go/generated"; @@ -117,11 +116,6 @@ message NodeInfoLite { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; - - /* - * Indicates that the device's role in the mesh - */ - Config.DeviceConfig.Role role = 8; } /* diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 4d7542c..e8eda53 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1046,11 +1046,6 @@ message NodeInfo { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; - - /* - * Indicates that the device's role in the mesh - */ - Config.DeviceConfig.Role role = 8; } /* From 2966ac6fad94f8ecffd21379b33200a4a7513a66 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 26 Nov 2023 14:10:31 -0600 Subject: [PATCH 072/137] Add role to User instead --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e8eda53..6a73ee3 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -512,6 +512,11 @@ message User { * Also, "long_name" should be their licence number. */ bool is_licensed = 6; + + /* + * Indicates that the user's role in the mesh + */ + Config.DeviceConfig.Role role = 7; } /* From bf2f5c2fa54b9496ae3ec8b403074862de244afa Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 4 Dec 2023 20:38:53 -0600 Subject: [PATCH 073/137] Added client-hidden and lost-and-found roles --- meshtastic/config.proto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 894a32d..f959fe7 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -72,6 +72,23 @@ message Config { * from the Meshtastic ATAK plugin -> IMeshService -> Node */ TAK = 7; + + /* + * Client Hidden device role + * Used for nodes that "only speak when spoken to" + * Turns all of the routine broadcasts but allows for ad-hoc communication + * Still rebroadcasts, but with local only rebroadcast mode (known meshes only) + * Can be used for clandestine operation or to dramatically reduce airtime / power consumption + */ + CLIENT_HIDDEN = 8; + + /* + * Lost and Found device role + * Used to automatically send a text message to the mesh + * with the current position of the device on a frequent interval: + * "I'm lost! Position: lat / long" + */ + LOST_AND_FOUND = 9; } /* From aff14ea529b286003f9a68a413db953fdd36aef9 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 5 Dec 2023 20:21:14 -0600 Subject: [PATCH 074/137] Added KNOWN_ONLY rebroadcast mode --- meshtastic/config.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index f959fe7..871ed1f 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -112,6 +112,12 @@ message Config { * Only rebroadcasts message on the nodes local primary / secondary channels. */ LOCAL_ONLY = 2; + + /* + * Ignores observed messages from foreign meshes like LOCAL_ONLY, + * but takes it step further by also ignoring messages from nodenums not in the node's known list (NodeDB) + */ + KNOWN_ONLY = 3; } /* From 1560e855096eac3675e5d05d7ffdf0230d1b4765 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 6 Dec 2023 15:50:46 -0600 Subject: [PATCH 075/137] Makerfabs SenseLoRA targets --- meshtastic/mesh.proto | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 6a73ee3..d1dae07 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -324,6 +324,16 @@ enum HardwareModel { */ RAK11310 = 26; + /* + * Makerfabs SenseLoRA Receiver (RP2040 + RFM96) + */ + SENSELORA_RP2040 = 27; + + /* + * Makerfabs SenseLoRA Industrial Monitor (ESP32-S3 + RFM96) + */ + SENSELORA_S3 = 28; + /* * --------------------------------------------------------------------------- * Less common/prototype boards listed here (needs one more byte over the air) @@ -1486,4 +1496,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} +} \ No newline at end of file From c1e179ecfd86c88deaf1140e7a9c6902b763cc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sun, 17 Dec 2023 14:36:48 +0100 Subject: [PATCH 076/137] Add paxcounter protobuf and config --- meshtastic/admin.options | 1 - meshtastic/admin.proto | 5 +++++ meshtastic/localonly.proto | 5 +++++ meshtastic/module_config.proto | 22 ++++++++++++++++++++++ meshtastic/paxcount.proto | 29 +++++++++++++++++++++++++++++ meshtastic/portnums.proto | 6 ++++++ 6 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 meshtastic/paxcount.proto diff --git a/meshtastic/admin.options b/meshtastic/admin.options index 1cd0ab4..9f646e5 100644 --- a/meshtastic/admin.options +++ b/meshtastic/admin.options @@ -6,7 +6,6 @@ *AdminMessage.set_ringtone_message max_size:231 *AdminMessage.get_ringtone_response max_size:231 - *HamParameters.call_sign max_size:8 *HamParameters.short_name max_size:6 *NodeRemoteHardwarePinsResponse.node_remote_hardware_pins max_count:16 \ No newline at end of file diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index a14cc0e..e0675b6 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -124,6 +124,11 @@ message AdminMessage { * TODO: REPLACE */ DETECTIONSENSOR_CONFIG = 11; + + /* + * TODO: REPLACE + */ + PAXCOUNTER_CONFIG = 12; } /* diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index 5f46f9a..9297dff 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -121,6 +121,11 @@ message LocalModuleConfig { */ ModuleConfig.DetectionSensorConfig detection_sensor = 13; + /* + * Paxcounter Config + */ + ModuleConfig.PaxcounterConfig paxcounter = 14; + /* * A version integer used to invalidate old save files when we make * incompatible changes This integer is set at build time and is private to diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index ee2fdaa..d55d2c3 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -214,6 +214,23 @@ message ModuleConfig { uint32 i2s_sck = 7; } + /* + * Config for the Paxcounter Module + */ + message PaxcounterConfig { + /* + * Enable the Paxcounter Module + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we should try to send our + * metrics to the mesh + */ + + uint32 paxcounter_update_interval = 2; + } + /* * Serial Config */ @@ -713,6 +730,11 @@ message ModuleConfig { * TODO: REPLACE */ DetectionSensorConfig detection_sensor = 12; + + /* + * TODO: REPLACE + */ + PaxcounterConfig paxcounter = 13; } } diff --git a/meshtastic/paxcount.proto b/meshtastic/paxcount.proto new file mode 100644 index 0000000..47b2639 --- /dev/null +++ b/meshtastic/paxcount.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "PaxcountProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * TODO: REPLACE + */ +message Paxcount { + /* + * seen Wifi devices + */ + uint32 wifi = 1; + + /* + * Seen BLE devices + */ + uint32 ble = 2; + + /* + * Uptime in seconds + */ + uint32 uptime = 3; +} diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 598de93..cd6bced 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -118,6 +118,12 @@ enum PortNum { */ IP_TUNNEL_APP = 33; + /* + * Paxcounter lib included in the firmware + * ENCODING: protobuf + */ + PAXCOUNTER_APP = 34; + /* * Provides a hardware serial interface to send and receive from the Meshtastic network. * Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic From ad2810fab26a1d798a88830b7e61881df2ff1848 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 27 Dec 2023 12:32:53 -0600 Subject: [PATCH 077/137] Add Enter DFU mode admin message --- meshtastic/admin.proto | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index e0675b6..305f98d 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -231,6 +231,12 @@ message AdminMessage { */ NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response = 20; + /* + * Enter (serial) DFU mode + * Only implemented on NRF52 currently + */ + bool enter_dfu_mode_request = 21; + /* * Set the owner for this node */ @@ -350,4 +356,4 @@ message NodeRemoteHardwarePinsResponse { * Nodes and their respective remote hardware GPIO pins */ repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1; -} \ No newline at end of file +} From be12427c1ee9ceda4d35a004394aaa20667ba753 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 27 Dec 2023 13:27:16 -0600 Subject: [PATCH 078/137] Clarify DFU mode --- meshtastic/admin.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 305f98d..d031ad0 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -232,7 +232,7 @@ message AdminMessage { NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response = 20; /* - * Enter (serial) DFU mode + * Enter (UF2) DFU mode * Only implemented on NRF52 currently */ bool enter_dfu_mode_request = 21; From 97a97fdea2e9e9aefec6ccc7a4138b82fad70c4f Mon Sep 17 00:00:00 2001 From: Amin Husni Date: Fri, 5 Jan 2024 01:22:51 +0800 Subject: [PATCH 079/137] Add Malaysia Frequency meshtastic/firmware#3053 --- meshtastic/config.proto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 871ed1f..ce17416 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -706,6 +706,16 @@ message Config { * Ukraine 868mhz */ UA_868 = 15; + + /* + * Malaysia 433mhz + */ + MY_433 = 16; + + /* + * Malaysia 919mhz + */ + MY_919 = 17; } /* From 3f25787f43e9c753b59a0e3a1a73c7d9c4ad6532 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 6 Jan 2024 07:17:41 -0600 Subject: [PATCH 080/137] Deprecate attempt time --- meshtastic/config.proto | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index ce17416..27ec65d 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -280,12 +280,9 @@ message Config { uint32 gps_update_interval = 5; /* - * How long should we try to get our position during each gps_update_interval attempt? (in seconds) - * Or if zero, use the default of 30 seconds. - * If we don't get a new gps fix in that time, the gps will be put into sleep until the next gps_update_rate - * window. + * Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time */ - uint32 gps_attempt_time = 6; + uint32 gps_attempt_time = 6 [deprecated = true]; /* * Bit field of boolean configuration options for POSITION messages @@ -917,4 +914,4 @@ message Config { LoRaConfig lora = 6; BluetoothConfig bluetooth = 7; } -} \ No newline at end of file +} From 3e19c405b7d2e5b331ef7676cc015270083a7943 Mon Sep 17 00:00:00 2001 From: Andre K Date: Tue, 9 Jan 2024 17:22:56 -0300 Subject: [PATCH 081/137] deprecate `MeshPacket.delayed` --- meshtastic/mesh.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index d1dae07..e2b79f9 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -959,7 +959,7 @@ message MeshPacket { /* * Describe if this message is delayed */ - Delayed delayed = 13; + Delayed delayed = 13 [deprecated = true]; } /* @@ -1496,4 +1496,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} \ No newline at end of file +} From a4047d387f34344e2db0612c432b5db0fc7c9faf Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Thu, 11 Jan 2024 19:27:25 +0200 Subject: [PATCH 082/137] Update mesh.proto --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e2b79f9..ccfc586 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -450,6 +450,11 @@ enum HardwareModel { * EBYTE SPI LoRa module and ESP32-S3 */ EBYTE_ESP32_S3 = 54; + + /* + * Waveshare ESP32-S3-PICO with PICO LoRa HAT and 2.9inch e-Ink + */ + EBYTE_ESP32_S3 = 55; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From 7e8828c36c2954f15a3849987aaf4b8178c1263d Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Thu, 11 Jan 2024 21:10:26 +0200 Subject: [PATCH 083/137] Update mesh.proto --- meshtastic/mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index ccfc586..bc234aa 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -454,7 +454,7 @@ enum HardwareModel { /* * Waveshare ESP32-S3-PICO with PICO LoRa HAT and 2.9inch e-Ink */ - EBYTE_ESP32_S3 = 55; + ESP32_S3_PICO = 55; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From e37d5322d82988801f1ab637dd4caf932737dcea Mon Sep 17 00:00:00 2001 From: GPSFan Date: Mon, 15 Jan 2024 10:19:44 -0700 Subject: [PATCH 084/137] update mesh.proto to add CircuitMess Chatter 2 --- meshtastic/mesh.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index bc234aa..e8c2f43 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -455,6 +455,13 @@ enum HardwareModel { * Waveshare ESP32-S3-PICO with PICO LoRa HAT and 2.9inch e-Ink */ ESP32_S3_PICO = 55; + + /* + * CircuitMess Chatter 2 LLCC68 Lora Module and ESP32 Wroom + * Lora module can be swapped out for a Heltec RA-62 which is "almost" pin compatible + * with one cut and one jumper Meshtastic works + */ + CHATTER_2 = 56; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From b8d0ce96311af673125482310c33ce59db6bcfe7 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 20 Jan 2024 10:46:07 +0100 Subject: [PATCH 085/137] Add `via_mqtt` tag to MeshPacket --- meshtastic/mesh.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e8c2f43..488b3bd 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -972,6 +972,11 @@ message MeshPacket { * Describe if this message is delayed */ Delayed delayed = 13 [deprecated = true]; + + /* + * Describes whether this packet passed via MQTT somewhere along the path it currently took. + */ + bool via_mqtt = 14; } /* @@ -1508,4 +1513,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} +} \ No newline at end of file From 44e369e1813f8ec9c7aefe1aac7d0adc75e11f8a Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 20 Jan 2024 10:46:27 +0100 Subject: [PATCH 086/137] Add `ignore_mqtt` to LoRa config --- meshtastic/config.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 27ec65d..a844065 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -866,6 +866,11 @@ message Config { * in ignore_incoming will have packets they send dropped on receive (by router.cpp) */ repeated uint32 ignore_incoming = 103; + + /* + * If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. + */ + bool ignore_mqtt = 104; } message BluetoothConfig { @@ -914,4 +919,4 @@ message Config { LoRaConfig lora = 6; BluetoothConfig bluetooth = 7; } -} +} \ No newline at end of file From 79164b870b9261feb65d76c1a8cc51f8c892bfaf Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 28 Jan 2024 07:36:56 -0600 Subject: [PATCH 087/137] Delete files admin message --- meshtastic/admin.options | 1 + meshtastic/admin.proto | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/meshtastic/admin.options b/meshtastic/admin.options index 9f646e5..1d582e2 100644 --- a/meshtastic/admin.options +++ b/meshtastic/admin.options @@ -2,6 +2,7 @@ *AdminMessage.set_canned_message_module_messages max_size:201 *AdminMessage.get_canned_message_module_messages_response max_size:201 +*AdminMessage.delete_file_request max_size:201 *AdminMessage.set_ringtone_message max_size:231 *AdminMessage.get_ringtone_response max_size:231 diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index d031ad0..01295f4 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -237,6 +237,11 @@ message AdminMessage { */ bool enter_dfu_mode_request = 21; + /* + * Delete the file by the specified path from the device + */ + string delete_file_request = 22; + /* * Set the owner for this node */ From 397af9851954bccb5e5001c45df9f672e6d60beb Mon Sep 17 00:00:00 2001 From: hdngr <1875033+hdngr@users.noreply.github.com> Date: Tue, 30 Jan 2024 07:26:17 -0800 Subject: [PATCH 088/137] add CanaryOne to HardwareModel --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 488b3bd..8f50b3c 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -334,6 +334,11 @@ enum HardwareModel { */ SENSELORA_S3 = 28; + /* + * Canary Radio Company - CanaryOne: https://canaryradio.io/products/canaryone + */ + CANARYONE = 29; + /* * --------------------------------------------------------------------------- * Less common/prototype boards listed here (needs one more byte over the air) From c2ce7eb206ac70c4eb6d35929e469e9470d6f73e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 31 Jan 2024 13:39:08 -0600 Subject: [PATCH 089/137] Triple state GPS mode --- meshtastic/config.proto | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index a844065..8db17a6 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -249,6 +249,23 @@ message Config { SPEED = 0x0200; } + enum GpsMode { + /* + * GPS is present but disabled + */ + DISABLED = 0; + + /* + * GPS is present and enabled + */ + ENABLED = 1; + + /* + * GPS is not present on the device + */ + NOT_PRESENT = 2; + } + /* * We should send our position this often (but only if it has changed significantly) * Defaults to 15 minutes @@ -270,7 +287,7 @@ message Config { /* * Is GPS enabled for this node? */ - bool gps_enabled = 4; + bool gps_enabled = 4[deprecated = true]; /* * How often should we try to get GPS position (in seconds) @@ -314,6 +331,11 @@ message Config { * (Re)define PIN_GPS_EN for your board. */ uint32 gps_en_gpio = 12; + + /* + * Set where GPS is enabled, disabled, or not present + */ + GpsMode gps_mode = 13; } /* From 51765f3d16ae5774d63aabdb74339feb54926ff9 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 1 Feb 2024 19:11:15 -0600 Subject: [PATCH 090/137] TAK Packets --- meshtastic/mesh.proto | 44 ++++++++++++++++++++++++++++++++++++++- meshtastic/portnums.proto | 6 ++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 8f50b3c..118764b 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1518,4 +1518,46 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} \ No newline at end of file +} + +/* + * Packets for the official ATAK Plugin + */ +message TAK_Packet +{ + string call_sign = 1; + /* + * The payload of the packet + */ + oneof payload_variant { + /* + * TAK position report + */ + TAK_PLI tak_pli = 1; + /* + * Other binary data + */ + bytes data = 2; + } +} +/* + * Position Location Information from ATAK + */ +message TAK_PLI { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 longitude_i = 2; + + /* + * Altitude + */ + int32 altitude = 3; +} diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index cd6bced..f781a35 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -184,6 +184,12 @@ enum PortNum { * ENCODING: Protobuf */ NEIGHBORINFO_APP = 71; + + /* + * ATAK Plugin + * Portnum for payloads from the official Meshtastic ATAK plugin + */ + ATAK_PLUGIN = 72; /* * Private applications should use portnums >= 256. From b171a4d8420bc843d23a7325a37aa181f66df948 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 1 Feb 2024 20:23:12 -0600 Subject: [PATCH 091/137] Indexing --- meshtastic/mesh.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 118764b..8344dee 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1533,11 +1533,11 @@ message TAK_Packet /* * TAK position report */ - TAK_PLI tak_pli = 1; + TAK_PLI tak_pli = 2; /* * Other binary data */ - bytes data = 2; + bytes data = 3; } } /* From cbc940238510ad8138bc18d30c64bc9a4220d6b5 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 2 Feb 2024 11:29:38 -0600 Subject: [PATCH 092/137] Compressed vs uncompressed variants --- meshtastic/mesh.options | 6 ++++-- meshtastic/mesh.proto | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index ad8bd71..d50e5f1 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -44,7 +44,6 @@ # MyMessage.name max_size:40 # or fixed_length or fixed_count, or max_count - #This value may want to be a few bytes smaller to compensate for the parent fields. *Compressed.data max_size:237 @@ -57,4 +56,7 @@ *MqttClientProxyMessage.topic max_size:60 *MqttClientProxyMessage.data max_size:435 -*MqttClientProxyMessage.text max_size:435 \ No newline at end of file +*MqttClientProxyMessage.text max_size:435 + +*TAK_Packet.callsign_variant.uncompressed max_size:64 +*TAK_Packet.callsign_variant.compressed max_size:64 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 8344dee..3271df4 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1525,7 +1525,16 @@ message DeviceMetadata { */ message TAK_Packet { - string call_sign = 1; + oneof callsign_variant { + /* + * Uncompressed callsign from ATAK + */ + string uncompressed = 1; + /* + * Compressed callsign using unishox2 for the wire + */ + string compressed = 2; + } /* * The payload of the packet */ @@ -1533,11 +1542,11 @@ message TAK_Packet /* * TAK position report */ - TAK_PLI tak_pli = 2; + TAK_PLI tak_pli = 3; /* * Other binary data */ - bytes data = 3; + bytes data = 4; } } /* From 4ace085e2d40c5ce4b59c09dc1e3d632303497b1 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 2 Feb 2024 11:33:29 -0600 Subject: [PATCH 093/137] Prefix --- meshtastic/mesh.options | 4 ++-- meshtastic/mesh.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index d50e5f1..6996bee 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -58,5 +58,5 @@ *MqttClientProxyMessage.data max_size:435 *MqttClientProxyMessage.text max_size:435 -*TAK_Packet.callsign_variant.uncompressed max_size:64 -*TAK_Packet.callsign_variant.compressed max_size:64 +*TAK_Packet.callsign_variant.callsign_uncompressed max_size:64 +*TAK_Packet.callsign_variant.callsign_compressed max_size:64 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 3271df4..4804866 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1529,11 +1529,11 @@ message TAK_Packet /* * Uncompressed callsign from ATAK */ - string uncompressed = 1; + string callsign_uncompressed = 1; /* * Compressed callsign using unishox2 for the wire */ - string compressed = 2; + string callsign_compressed = 2; } /* * The payload of the packet From a5ecd23eddb74bd53bd8c147c0dd98d4645c70d2 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 2 Feb 2024 12:32:54 -0600 Subject: [PATCH 094/137] Correct options --- meshtastic/mesh.options | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 6996bee..a2fe333 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -58,5 +58,5 @@ *MqttClientProxyMessage.data max_size:435 *MqttClientProxyMessage.text max_size:435 -*TAK_Packet.callsign_variant.callsign_uncompressed max_size:64 -*TAK_Packet.callsign_variant.callsign_compressed max_size:64 +*TAK_Packet.callsign_uncompressed max_size:64 +*TAK_Packet.callsign_compressed max_size:64 From 7ede214a3b382be83719a95343c83809b32c0445 Mon Sep 17 00:00:00 2001 From: Todd Herbert Date: Sat, 3 Feb 2024 16:46:30 +1300 Subject: [PATCH 095/137] add Heltec Wireless Paper V1.0 to HardwareModel --- meshtastic/mesh.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 8f50b3c..3c78229 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -467,6 +467,15 @@ enum HardwareModel { * with one cut and one jumper Meshtastic works */ CHATTER_2 = 56; + + /* + * Heltec Wireless Paper, With ESP32-S3 CPU and E-Ink display + * Older "V1.0" Variant, has no "version sticker" + * E-Ink model is DEPG0213BNS800 + * Tab on the screen protector is RED + * Flex connector marking is FPC-7528B + */ + HELTEC_WIRELESS_PAPER_V1_0 = 57; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From f37ee6b8da0e0e1986b0f51e813d819fd79a62da Mon Sep 17 00:00:00 2001 From: Andrew Yong Date: Mon, 5 Feb 2024 12:38:27 +0800 Subject: [PATCH 096/137] Add Singapore Region Add 923MHz band for Singapore. Regulatory reference: https://www.imda.gov.sg/-/media/imda/files/regulation-licensing-and-consultations/ict-standards/telecommunication-standards/radio-comms/imdatssrd.pdf band 30d. --- meshtastic/config.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 8db17a6..8853a10 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -735,6 +735,11 @@ message Config { * Malaysia 919mhz */ MY_919 = 17; + + /* + * Singapore 923mhz + */ + SG_923 = 18; } /* From 9288737832409c691b23659dd80d0715ee7d40c8 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 6 Feb 2024 15:03:32 -0600 Subject: [PATCH 097/137] Update sizes --- meshtastic/mesh.options | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index a2fe333..c61015e 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -58,5 +58,5 @@ *MqttClientProxyMessage.data max_size:435 *MqttClientProxyMessage.text max_size:435 -*TAK_Packet.callsign_uncompressed max_size:64 -*TAK_Packet.callsign_compressed max_size:64 +*TAK_Packet.callsign_uncompressed max_size:512 +*TAK_Packet.callsign_compressed max_size:241 From c1ebf710dcb6ccd8839ec6fc169d5cf3b50298f8 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 07:42:36 -0600 Subject: [PATCH 098/137] ATAK overhaul --- meshtastic/atak.options | 4 + meshtastic/atak.proto | 226 ++++++++++++++++++++++++++++++++++++++++ meshtastic/mesh.options | 3 - meshtastic/mesh.proto | 50 --------- 4 files changed, 230 insertions(+), 53 deletions(-) create mode 100644 meshtastic/atak.options create mode 100644 meshtastic/atak.proto diff --git a/meshtastic/atak.options b/meshtastic/atak.options new file mode 100644 index 0000000..59de6e8 --- /dev/null +++ b/meshtastic/atak.options @@ -0,0 +1,4 @@ +*TakPacket.callsign_uncompressed max_size:120 +*TakPacket.callsign_compressed max_size:64 + +*Status.battery int_size:8 \ No newline at end of file diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto new file mode 100644 index 0000000..7f09540 --- /dev/null +++ b/meshtastic/atak.proto @@ -0,0 +1,226 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ATAKProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; +/* + * Packets for the official ATAK Plugin + */ +message Packet +{ + /* + * The contact / callsign for ATAK user + */ + Contact contact = 1; + /* + * The group for ATAK user + */ + Group group = 2; + /* + * The status of the ATAK EUD + */ + Status status = 5; + /* + * The payload of the packet + */ + oneof payload_variant { + /* + * TAK position report + */ + PLI pli = 3; + /* + * Other binary data + */ + bytes data = 4; + } +} + +/* + * ATAK Group + * <__group role='Team Member' name='Cyan'/> + */ +message Group { + /* + * Role of the group member + */ + MemberRole role = 1; + /* + * Team (color) + * Default Cyan + */ + Team team = 2; +} + +enum Team { + /* + * Unspecifed + */ + Unspecifed_Color = 0; + /* + * White + */ + White = 1; + /* + * Yellow + */ + Yellow = 2; + /* + * Orange + */ + Orange = 3; + /* + * Magenta + */ + Magenta = 4; + /* + * Red + */ + Red = 5; + /* + * Maroon + */ + Maroon = 6; + /* + * Purple + */ + Purple = 7; + /* + * Dark Blue + */ + Dark_Blue = 8; + /* + * Blue + */ + Blue = 9; + /* + * Cyan + */ + Cyan = 10; + /* + * Teal + */ + Teal = 11; + /* + * Green + */ + Green = 12; + /* + * Dark Green + */ + Dark_Green = 13; + /* + * Brown + */ + Brown = 14; +} + +/* + * Role of the group member + */ +enum MemberRole { + /* + * Unspecifed + */ + Unspecifed = 0; + /* + * Team Member + */ + TeamMember = 1; + /* + * Team Lead + */ + TeamLead = 2; + /* + * Headquarters + */ + HQ = 3; + /* + * Airsoft enthusiast + */ + Sniper = 4; + /* + * Medic + */ + Medic = 5; + /* + * ForwardObserver + */ + ForwardObserver = 6; + /* + * Radio Telephone Operator + */ + RTO = 7; + /* + * Doggo + */ + K9 = 8; +} + +/* + * ATAK EUD Status + * + */ +message Status { + /* + * Battery level + */ + uint32 battery = 1; +} +/* + * ATAK Contact + * + */ +message Contact { + /* + * Compressed or uncompressed callsign + */ + oneof callsign_variant { + /* + * Uncompressed callsign from ATAK + */ + string callsign_uncompressed = 1; + /* + * Compressed callsign using unishox2 for the wire + */ + string callsign_compressed = 2; + } + /* + * IP address of endpoint in integer form (0.0.0.0 default) + */ + // fixed32 enpoint_address = 3; + /* + * Port of endpoint (4242 default) + */ + // uint32 endpoint_port = 4; + /* + * Phone represented as integer + * Terrible practice, but we really need the wire savings + */ + // uint32 phone = 4; +} + +/* + * Position Location Information from ATAK + */ +message PLI { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 longitude_i = 2; + + /* + * Altitude + */ + int32 altitude = 3; +} diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index c61015e..731b3bc 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -57,6 +57,3 @@ *MqttClientProxyMessage.topic max_size:60 *MqttClientProxyMessage.data max_size:435 *MqttClientProxyMessage.text max_size:435 - -*TAK_Packet.callsign_uncompressed max_size:512 -*TAK_Packet.callsign_compressed max_size:241 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 4804866..95f378f 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1520,53 +1520,3 @@ message DeviceMetadata { bool hasRemoteHardware = 10; } -/* - * Packets for the official ATAK Plugin - */ -message TAK_Packet -{ - oneof callsign_variant { - /* - * Uncompressed callsign from ATAK - */ - string callsign_uncompressed = 1; - /* - * Compressed callsign using unishox2 for the wire - */ - string callsign_compressed = 2; - } - /* - * The payload of the packet - */ - oneof payload_variant { - /* - * TAK position report - */ - TAK_PLI tak_pli = 3; - /* - * Other binary data - */ - bytes data = 4; - } -} -/* - * Position Location Information from ATAK - */ -message TAK_PLI { - /* - * The new preferred location encoding, multiply by 1e-7 to get degrees - * in floating point - */ - sfixed32 latitude_i = 1; - - /* - * The new preferred location encoding, multiply by 1e-7 to get degrees - * in floating point - */ - sfixed32 longitude_i = 2; - - /* - * Altitude - */ - int32 altitude = 3; -} From c5c8d2c5d18b627a5f759b6b6f36b06faad8e4ad Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 07:45:27 -0600 Subject: [PATCH 099/137] Name --- meshtastic/atak.options | 4 ++-- meshtastic/atak.proto | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meshtastic/atak.options b/meshtastic/atak.options index 59de6e8..917b2f3 100644 --- a/meshtastic/atak.options +++ b/meshtastic/atak.options @@ -1,4 +1,4 @@ -*TakPacket.callsign_uncompressed max_size:120 -*TakPacket.callsign_compressed max_size:64 +*TAKPacket.callsign_uncompressed max_size:120 +*TAKPacket.callsign_compressed max_size:64 *Status.battery int_size:8 \ No newline at end of file diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 7f09540..268ae5c 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -10,7 +10,7 @@ option swift_prefix = ""; /* * Packets for the official ATAK Plugin */ -message Packet +message TAKPacket { /* * The contact / callsign for ATAK user From 57d65d69d46831b75141ffcb83f471ea16c0c71d Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 08:05:53 -0600 Subject: [PATCH 100/137] Length --- meshtastic/atak.options | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/atak.options b/meshtastic/atak.options index 917b2f3..ffce4d9 100644 --- a/meshtastic/atak.options +++ b/meshtastic/atak.options @@ -1,4 +1,4 @@ -*TAKPacket.callsign_uncompressed max_size:120 -*TAKPacket.callsign_compressed max_size:64 +*Contact.callsign_uncompressed max_size:120 +*Contact.callsign_compressed max_size:64 *Status.battery int_size:8 \ No newline at end of file From ca5b4deaaedee9f06c92f483f9a345d14dcbc86a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 09:53:31 -0600 Subject: [PATCH 101/137] Remove compression --- meshtastic/atak.options | 3 +-- meshtastic/atak.proto | 13 ++----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/meshtastic/atak.options b/meshtastic/atak.options index ffce4d9..fbfbc6e 100644 --- a/meshtastic/atak.options +++ b/meshtastic/atak.options @@ -1,4 +1,3 @@ -*Contact.callsign_uncompressed max_size:120 -*Contact.callsign_compressed max_size:64 +*Contact.callsign max_size:120 *Status.battery int_size:8 \ No newline at end of file diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 268ae5c..6d3edca 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -176,18 +176,9 @@ message Status { */ message Contact { /* - * Compressed or uncompressed callsign + * Callsign */ - oneof callsign_variant { - /* - * Uncompressed callsign from ATAK - */ - string callsign_uncompressed = 1; - /* - * Compressed callsign using unishox2 for the wire - */ - string callsign_compressed = 2; - } + string callsign = 1; /* * IP address of endpoint in integer form (0.0.0.0 default) */ From 07ac3a02089f30de0ce669d7a5d2b2f04a1ad687 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 12:50:33 -0600 Subject: [PATCH 102/137] Track speed and course --- meshtastic/atak.options | 3 ++- meshtastic/atak.proto | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meshtastic/atak.options b/meshtastic/atak.options index fbfbc6e..1f0f7e6 100644 --- a/meshtastic/atak.options +++ b/meshtastic/atak.options @@ -1,3 +1,4 @@ *Contact.callsign max_size:120 -*Status.battery int_size:8 \ No newline at end of file +*Status.battery int_size:8 +*PLI.course int_size:16 \ No newline at end of file diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 6d3edca..669205a 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -211,7 +211,12 @@ message PLI { sfixed32 longitude_i = 2; /* - * Altitude + * Speed */ - int32 altitude = 3; + uint32 speed = 3; + + /* + * Course in degrees + */ + uint32 course = 4; } From 5fca196a6295873344eb0f4180a875d391eddf6d Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 13:22:55 -0600 Subject: [PATCH 103/137] Oops --- meshtastic/atak.proto | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 669205a..5569091 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -210,13 +210,18 @@ message PLI { */ sfixed32 longitude_i = 2; + /* + * Altitude (ATAK prefers HAE) + */ + uint32 altitude = 3; + /* * Speed */ - uint32 speed = 3; + uint32 speed = 4; /* * Course in degrees */ - uint32 course = 4; + uint32 course = 5; } From 703a85f4d8b3897b74aba1e982ee026b40f85773 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 16:42:54 -0600 Subject: [PATCH 104/137] Geochat --- meshtastic/atak.options | 4 ++-- meshtastic/atak.proto | 28 +++++++++++++++++++++------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/meshtastic/atak.options b/meshtastic/atak.options index 1f0f7e6..b567331 100644 --- a/meshtastic/atak.options +++ b/meshtastic/atak.options @@ -1,4 +1,4 @@ *Contact.callsign max_size:120 - *Status.battery int_size:8 -*PLI.course int_size:16 \ No newline at end of file +*PLI.course int_size:16 +*GeoChat.message max_size:200 \ No newline at end of file diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 5569091..7c525f4 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -12,18 +12,22 @@ option swift_prefix = ""; */ message TAKPacket { + /* + * Are the payloads strings compressed for LoRA transport? + */ + boolean is_compressed = 1; /* * The contact / callsign for ATAK user */ - Contact contact = 1; + Contact contact = 2; /* * The group for ATAK user */ - Group group = 2; + Group group = 3; /* * The status of the ATAK EUD */ - Status status = 5; + Status status = 4; /* * The payload of the packet */ @@ -31,14 +35,24 @@ message TAKPacket /* * TAK position report */ - PLI pli = 3; + PLI pli = 5; /* - * Other binary data + * ATAK GeoChat message */ - bytes data = 4; + GeoChat chat = 6; } } +/* + * ATAK GeoChat message + */ +message GeoChat { + /* + * The text message + */ + string message = 1; +} + /* * ATAK Group * <__group role='Team Member' name='Cyan'/> @@ -224,4 +238,4 @@ message PLI { * Course in degrees */ uint32 course = 5; -} +} \ No newline at end of file From 16c05e31a970070b91f408ec483a2570fdd05728 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 7 Feb 2024 16:44:15 -0600 Subject: [PATCH 105/137] bool --- meshtastic/atak.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 7c525f4..5b07e82 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -15,7 +15,7 @@ message TAKPacket /* * Are the payloads strings compressed for LoRA transport? */ - boolean is_compressed = 1; + bool is_compressed = 1; /* * The contact / callsign for ATAK user */ From eda5e8cee28182b6ad5ea1a411669b7fe787d6dd Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 8 Feb 2024 10:12:37 -0600 Subject: [PATCH 106/137] Add to --- meshtastic/atak.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 5b07e82..ae8092e 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -51,6 +51,11 @@ message GeoChat { * The text message */ string message = 1; + + /* + * Uid recipient of the message + */ + optional string to = 2; } /* From a79560a6aef49c26f66bb5319cf6463874585524 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 8 Feb 2024 18:50:14 -0600 Subject: [PATCH 107/137] Add device callsign --- meshtastic/atak.options | 1 + meshtastic/atak.proto | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/meshtastic/atak.options b/meshtastic/atak.options index b567331..61e1b4c 100644 --- a/meshtastic/atak.options +++ b/meshtastic/atak.options @@ -1,4 +1,5 @@ *Contact.callsign max_size:120 +*Contact.device_callsign max_size:120 *Status.battery int_size:8 *PLI.course int_size:16 *GeoChat.message max_size:200 \ No newline at end of file diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index ae8092e..182d739 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -198,6 +198,11 @@ message Contact { * Callsign */ string callsign = 1; + + /* + * Device callsign + */ + string device_callsign = 2; /* * IP address of endpoint in integer form (0.0.0.0 default) */ From 4b97cf82ac0b0c1b94b9fcd3e22f70c241eea3a2 Mon Sep 17 00:00:00 2001 From: Gabrielerusso Date: Fri, 9 Feb 2024 02:50:39 +0100 Subject: [PATCH 108/137] divided heltec tracker 1.0 and 1.1 --- meshtastic/mesh.proto | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e6e277f..5837644 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -423,8 +423,9 @@ enum HardwareModel { /* * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + * Newer V1.1, version is written on the PCB near the display. */ - HELTEC_WIRELESS_TRACKER = 48; + HELTEC_WIRELESS_TRACKER_V1_1 = 48; /* * Heltec Wireless Paper with ESP32-S3 CPU and E-Ink display @@ -476,6 +477,12 @@ enum HardwareModel { * Flex connector marking is FPC-7528B */ HELTEC_WIRELESS_PAPER_V1_0 = 57; + + /* + * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + * Older "V1.0" Variant + */ + HELTEC_WIRELESS_TRACKER_V1_0 = 58; /* * ------------------------------------------------------------------------------------------------------------------------------------------ From f5299ca5c730ab77f463f1f1ba7da4155a5fa3b3 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 9 Feb 2024 20:35:35 -0600 Subject: [PATCH 109/137] Waveshare RP2040 LoRa --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e6e277f..160bab8 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -339,6 +339,11 @@ enum HardwareModel { */ CANARYONE = 29; + /* + * Waveshare RP2040 LoRa - https://www.waveshare.com/rp2040-lora.htm + */ + RP2040_LORA = 30; + /* * --------------------------------------------------------------------------- * Less common/prototype boards listed here (needs one more byte over the air) From b99a0343a8e26609431e50c003b07ecba02e2e6d Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 10 Feb 2024 12:38:35 +0100 Subject: [PATCH 110/137] StoreForward: replace "empty" by "text" and improve comments --- meshtastic/storeforward.options | 1 + meshtastic/storeforward.proto | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 meshtastic/storeforward.options diff --git a/meshtastic/storeforward.options b/meshtastic/storeforward.options new file mode 100644 index 0000000..8580aab --- /dev/null +++ b/meshtastic/storeforward.options @@ -0,0 +1 @@ +*StoreAndForward.text max_size:237 \ No newline at end of file diff --git a/meshtastic/storeforward.proto b/meshtastic/storeforward.proto index 425edf9..a9a83db 100644 --- a/meshtastic/storeforward.proto +++ b/meshtastic/storeforward.proto @@ -130,12 +130,12 @@ message StoreAndForward { bool heartbeat = 7; /* - * Is the heartbeat enabled on the server? + * Maximum number of messages the server will return. */ uint32 return_max = 8; /* - * Is the heartbeat enabled on the server? + * Maximum history window in minutes the server will return messages from. */ uint32 return_window = 9; } @@ -155,7 +155,8 @@ message StoreAndForward { uint32 window = 2; /* - * The window of messages that was used to filter the history client requested + * Index in the packet history of the last message sent in a previous request to the server. + * Will be sent to the client before sending the history and can be set in a subsequent request to avoid getting packets the server already sent to the client. */ uint32 last_request = 3; } @@ -165,7 +166,7 @@ message StoreAndForward { */ message Heartbeat { /* - * Number of that will be sent to the client + * Period in seconds that the heartbeat is sent out that will be sent to the client */ uint32 period = 1; @@ -200,8 +201,8 @@ message StoreAndForward { Heartbeat heartbeat = 4; /* - * Empty Payload + * Text from history message. */ - bool empty = 5; + bytes text = 5; } -} +} \ No newline at end of file From 07bec8347760534377c72cfc6a0361240d06fdfe Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 10 Feb 2024 11:37:11 -0600 Subject: [PATCH 111/137] Add length to GeoChat.to --- meshtastic/atak.options | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshtastic/atak.options b/meshtastic/atak.options index 61e1b4c..c341400 100644 --- a/meshtastic/atak.options +++ b/meshtastic/atak.options @@ -2,4 +2,5 @@ *Contact.device_callsign max_size:120 *Status.battery int_size:8 *PLI.course int_size:16 -*GeoChat.message max_size:200 \ No newline at end of file +*GeoChat.message max_size:200 +*GeoChat.to max_size:120 \ No newline at end of file From 5fde3338a999facc2559e947757a702fe5a76d82 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sun, 11 Feb 2024 14:18:38 +0100 Subject: [PATCH 112/137] StoreForward: add `TEXT_DIRECT` and `TEXT_BROADCAST` RequestResponse tags --- meshtastic/storeforward.proto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meshtastic/storeforward.proto b/meshtastic/storeforward.proto index a9a83db..ef7de2c 100644 --- a/meshtastic/storeforward.proto +++ b/meshtastic/storeforward.proto @@ -58,6 +58,16 @@ message StoreAndForward { */ ROUTER_STATS = 7; + /* + * Router sends a text message from its history that was a direct message. + */ + ROUTER_TEXT_DIRECT = 8; + + /* + * Router sends a text message from its history that was a broadcast. + */ + ROUTER_TEXT_BROADCAST = 9; + /* * Client is an in error state. */ From 0c036448953d1ff7d995c1557282028916b4e97d Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 11 Feb 2024 11:43:54 -0600 Subject: [PATCH 113/137] Add channel_precision for location data --- meshtastic/config.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 8853a10..a2981bb 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -336,6 +336,11 @@ message Config { * Set where GPS is enabled, disabled, or not present */ GpsMode gps_mode = 13; + + /* + * Set GPS precision in bits, or 0 for disabled + */ + uint32 channel_precision[8] = 14; } /* From 9339bbb8e959760697948a5fc4b5c791f5ca4103 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 11 Feb 2024 11:51:37 -0600 Subject: [PATCH 114/137] Update config.proto --- meshtastic/config.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index a2981bb..d9fd421 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -338,9 +338,9 @@ message Config { GpsMode gps_mode = 13; /* - * Set GPS precision in bits, or 0 for disabled + * Set GPS precision in bits per channel, or 0 for disabled */ - uint32 channel_precision[8] = 14; + repeated uint32 channel_precision = 14; } /* From 1205cf2390e8c970b1664dc373854c0772cc9d24 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 12 Feb 2024 11:38:13 -0800 Subject: [PATCH 115/137] Update config.proto Add new device role descriptions to protobuf comments to help developers working on apps. --- meshtastic/config.proto | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 8853a10..90d81e7 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -18,64 +18,61 @@ message Config { */ enum Role { /* - * Client device role + * Description: App connected or stand alone messaging device. */ CLIENT = 0; - /* - * Client Mute device role - * Same as a client except packets will not hop over this node, does not contribute to routing packets for mesh. + * Description: Device that does not forward packets from other devices. */ CLIENT_MUTE = 1; /* - * Router device role. - * Mesh packets will prefer to be routed over this node. This node will not be used by client apps. - * The wifi/ble radios and the oled screen will be put to sleep. + * Description: Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list. + * Technical Details: Mesh packets will prefer to be routed over this node. This node will not be used by client apps. + * The wifi radio and the oled screen will be put to sleep. * This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh. */ ROUTER = 2; /* - * Router Client device role - * Mesh packets will prefer to be routed over this node. The Router Client can be used as both a Router and an app connected Client. + * Description: Combination of both ROUTER and CLIENT. Not for mobile devices. */ ROUTER_CLIENT = 3; /* - * Repeater device role - * Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry + * Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list. + * Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry * or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate. */ REPEATER = 4; /* - * Tracker device role - * Position Mesh packets will be prioritized higher and sent more frequently by default. + * Description: Broadcasts GPS position packets as priority. + * Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default. * When used in conjunction with power.is_power_saving = true, nodes will wake up, * send position, and then sleep for position.position_broadcast_secs seconds. */ TRACKER = 5; /* - * Sensor device role - * Telemetry Mesh packets will be prioritized higher and sent more frequently by default. + * Description: Broadcasts telemetry packets as priority. + * Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default. * When used in conjunction with power.is_power_saving = true, nodes will wake up, * send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. */ SENSOR = 6; /* - * TAK device role - * Used for nodes dedicated for connection to an ATAK EUD. + * Description: Optimized for ATAK system communication, reduces routine broadcasts. + * Technical Details: Used for nodes dedicated for connection to an ATAK EUD. * Turns off many of the routine broadcasts to favor CoT packet stream * from the Meshtastic ATAK plugin -> IMeshService -> Node */ TAK = 7; /* - * Client Hidden device role - * Used for nodes that "only speak when spoken to" + * Description: Device that only broadcasts as needed for stealth or power savings." + * Technical Details: Used for nodes that "only speak when spoken to" * Turns all of the routine broadcasts but allows for ad-hoc communication * Still rebroadcasts, but with local only rebroadcast mode (known meshes only) * Can be used for clandestine operation or to dramatically reduce airtime / power consumption @@ -83,8 +80,8 @@ message Config { CLIENT_HIDDEN = 8; /* - * Lost and Found device role - * Used to automatically send a text message to the mesh + * Description: + * Technical Details: Used to automatically send a text message to the mesh * with the current position of the device on a frequent interval: * "I'm lost! Position: lat / long" */ @@ -946,4 +943,4 @@ message Config { LoRaConfig lora = 6; BluetoothConfig bluetooth = 7; } -} \ No newline at end of file +} From fc6f4b5e5f0982c8a61777c83a615cb4d1bbe458 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 12 Feb 2024 11:41:04 -0800 Subject: [PATCH 116/137] Update config.proto --- meshtastic/config.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 90d81e7..b0e816e 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -19,6 +19,7 @@ message Config { enum Role { /* * Description: App connected or stand alone messaging device. + * Technical Details: Default Role */ CLIENT = 0; /* From e10c34959e96ab35f49579c5b3ca1b63d8e93b8a Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 12 Feb 2024 11:42:26 -0800 Subject: [PATCH 117/137] Update config.proto Add lost and found --- meshtastic/config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index b0e816e..a67cc4a 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -81,7 +81,7 @@ message Config { CLIENT_HIDDEN = 8; /* - * Description: + * Description: Broadcasts location as message to default channel regularly for to assist with device recovery. * Technical Details: Used to automatically send a text message to the mesh * with the current position of the device on a frequent interval: * "I'm lost! Position: lat / long" From 61d35ccc4a7f3009377a825ebb03081d4633ba2d Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 12 Feb 2024 11:43:39 -0800 Subject: [PATCH 118/137] Update config.proto remove stray double quote --- meshtastic/config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index a67cc4a..538d3a8 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -72,7 +72,7 @@ message Config { TAK = 7; /* - * Description: Device that only broadcasts as needed for stealth or power savings." + * Description: Device that only broadcasts as needed for stealth or power savings. * Technical Details: Used for nodes that "only speak when spoken to" * Turns all of the routine broadcasts but allows for ad-hoc communication * Still rebroadcasts, but with local only rebroadcast mode (known meshes only) From d9d87fdf8560acbf31df6c02c5d4b129f97fc598 Mon Sep 17 00:00:00 2001 From: Andre K Date: Wed, 14 Feb 2024 07:47:51 -0300 Subject: [PATCH 119/137] fix: revert `HardwareModel` enum name change ref: https://github.com/meshtastic/protobufs/commit/4b97cf82ac0b0c1b94b9fcd3e22f70c241eea3a2 --- meshtastic/mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 2cda487..af08b80 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -430,7 +430,7 @@ enum HardwareModel { * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT * Newer V1.1, version is written on the PCB near the display. */ - HELTEC_WIRELESS_TRACKER_V1_1 = 48; + HELTEC_WIRELESS_TRACKER = 48; /* * Heltec Wireless Paper with ESP32-S3 CPU and E-Ink display From 65ee81a1e93b81b9e9bab1f669b9096495f5b25c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 14 Feb 2024 07:03:09 -0600 Subject: [PATCH 120/137] Fix nano-pb size macros --- meshtastic/config.options | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshtastic/config.options b/meshtastic/config.options index 4490f08..6ef8e46 100644 --- a/meshtastic/config.options +++ b/meshtastic/config.options @@ -12,3 +12,5 @@ *LoRaConfig.channel_num int_size:16 *PowerConfig.device_battery_ina_address int_size:8 + +*PositionComfig.channel_precision max_count:8 From d980ad6d767f96183edf7518112ea17edd2e4866 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 14 Feb 2024 07:20:29 -0600 Subject: [PATCH 121/137] n --- meshtastic/config.options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/config.options b/meshtastic/config.options index 6ef8e46..ba8574a 100644 --- a/meshtastic/config.options +++ b/meshtastic/config.options @@ -13,4 +13,4 @@ *PowerConfig.device_battery_ina_address int_size:8 -*PositionComfig.channel_precision max_count:8 +*PositionConfig.channel_precision max_count:8 From 76002c9df3ed3abad9a8aeb6d76c032f28e8f738 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 15 Feb 2024 18:43:13 -0600 Subject: [PATCH 122/137] Add TAK_TRACKER role --- meshtastic/config.proto | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index b71d33a..c8533bb 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -64,7 +64,7 @@ message Config { SENSOR = 6; /* - * Description: Optimized for ATAK system communication, reduces routine broadcasts. + * Description: Optimized for ATAK system communication and reduces routine broadcasts. * Technical Details: Used for nodes dedicated for connection to an ATAK EUD. * Turns off many of the routine broadcasts to favor CoT packet stream * from the Meshtastic ATAK plugin -> IMeshService -> Node @@ -87,6 +87,14 @@ message Config { * "I'm lost! Position: lat / long" */ LOST_AND_FOUND = 9; + + /* + * Description: Enables automatic TAK PLI broadcasts and reduces routine broadcasts. + * Technical Details: Turns off many of the routine broadcasts to favor ATAK CoT packet stream + * and automatic TAK PLI (position location information) broadcasts. + * Uses position module configuration to determine TAK PLI broadcast interval. + */ + TAK_TRACKER = 10; } /* From 66e138c07248381c1a85e68e1d2bf1eeb546ad9e Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 21 Feb 2024 15:13:54 -0600 Subject: [PATCH 123/137] adds ModuleSettings and position_precision to ChannelSettings --- meshtastic/channel.proto | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index 7d2361a..8c5bbdf 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -83,6 +83,16 @@ message ChannelSettings { bool downlink_enabled = 6; } +/* + * This message is specifically for modules to store per-channel configuration data. + */ +message ModuleSettings { +/* + * Bits of precision for the location sent in position packets. + */ + uint32 position_precision = 1; +} + /* * A pair of a channel number, mode and the (sharable) settings for that channel */ @@ -132,4 +142,9 @@ message Channel { * TODO: REPLACE */ Role role = 3; -} \ No newline at end of file + + /* + * Per-channel module settings. + */ + ModuleSettings module_settings = 4; +} From 93c1b33f2f2f10d5cdff94843884d54e2507483f Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 21 Feb 2024 18:58:23 -0600 Subject: [PATCH 124/137] revert channel_precision --- meshtastic/config.options | 2 -- meshtastic/config.proto | 5 ----- 2 files changed, 7 deletions(-) diff --git a/meshtastic/config.options b/meshtastic/config.options index ba8574a..4490f08 100644 --- a/meshtastic/config.options +++ b/meshtastic/config.options @@ -12,5 +12,3 @@ *LoRaConfig.channel_num int_size:16 *PowerConfig.device_battery_ina_address int_size:8 - -*PositionConfig.channel_precision max_count:8 diff --git a/meshtastic/config.proto b/meshtastic/config.proto index c8533bb..7ebbe45 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -342,11 +342,6 @@ message Config { * Set where GPS is enabled, disabled, or not present */ GpsMode gps_mode = 13; - - /* - * Set GPS precision in bits per channel, or 0 for disabled - */ - repeated uint32 channel_precision = 14; } /* From 083d9e719028e8dad9437f41905b602839fdffc3 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 22 Feb 2024 00:31:35 -0600 Subject: [PATCH 125/137] Properly put module_settings inside the Channelsettings message --- meshtastic/channel.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index 8c5bbdf..2b10aaf 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -81,6 +81,11 @@ message ChannelSettings { * If true, messages seen on the internet will be forwarded to the local mesh. */ bool downlink_enabled = 6; + + /* + * Per-channel module settings. + */ + ModuleSettings module_settings = 7; } /* @@ -142,9 +147,4 @@ message Channel { * TODO: REPLACE */ Role role = 3; - - /* - * Per-channel module settings. - */ - ModuleSettings module_settings = 4; } From df085956824c6d2023ef77304a13024fb890e3d4 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 19 Feb 2024 21:44:04 -0600 Subject: [PATCH 126/137] Add precision_bits to location messages --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index af08b80..51f38bc 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -203,6 +203,11 @@ message Position { * detect lost updates if needed */ uint32 seq_number = 22; + + /* + * Indicates the bits of precision set by the sending node + */ + uint32 precision_bits = 23; } /* From fcb9b31761cf65f98a005ba9cc2a5e45371a1d68 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 22 Feb 2024 07:11:54 -0600 Subject: [PATCH 127/137] Convert alt to int32 --- meshtastic/atak.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 182d739..c44479f 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -237,7 +237,7 @@ message PLI { /* * Altitude (ATAK prefers HAE) */ - uint32 altitude = 3; + int32 altitude = 3; /* * Speed @@ -248,4 +248,4 @@ message PLI { * Course in degrees */ uint32 course = 5; -} \ No newline at end of file +} From 4c433ee900e098036fb969338b8fdf8763b7ad9c Mon Sep 17 00:00:00 2001 From: Toby Murray Date: Fri, 23 Feb 2024 23:38:22 -0500 Subject: [PATCH 128/137] Fix MeshPacket.to comment Looks like this became garbled in https://github.com/meshtastic/protobufs/commit/0221e83d689f7930ed3e5c474eff4fbb8697efbb. --- meshtastic/mesh.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 51f38bc..93f991d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -901,8 +901,8 @@ message MeshPacket { fixed32 from = 1; /* - * The (immediatSee Priority description for more details.y should be fixed32 instead, this encoding only - * hurts the ble link though. + * The (immediate) destination for this packet. If we are using routing, the + * final destination will be in payload.dest */ fixed32 to = 2; From 6a28d24bd872dbf614784c963e0793282946c308 Mon Sep 17 00:00:00 2001 From: Toby Murray Date: Fri, 23 Feb 2024 23:45:14 -0500 Subject: [PATCH 129/137] Remove fixed FIXME in mesh.proto Looks like these FIXMEs got fixed --- meshtastic/mesh.proto | 3 --- 1 file changed, 3 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 51f38bc..4863826 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -896,7 +896,6 @@ message MeshPacket { * The sending node number. * Note: Our crypto implementation uses this field as well. * See [crypto](/docs/overview/encryption) for details. - * FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. */ fixed32 from = 1; @@ -947,8 +946,6 @@ message MeshPacket { * any ACK or the completion of a mesh broadcast flood). * Note: Our crypto implementation uses this id as well. * See [crypto](/docs/overview/encryption) for details. - * FIXME - really should be fixed32 instead, this encoding only - * hurts the ble link though. */ fixed32 id = 6; From 9515cf2fb5d5e4e375bb6b11809817e439743ef3 Mon Sep 17 00:00:00 2001 From: Toby Murray Date: Sat, 24 Feb 2024 11:52:01 -0500 Subject: [PATCH 130/137] Remove mention of payload.dest --- meshtastic/mesh.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 93f991d..c60d68d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -901,8 +901,7 @@ message MeshPacket { fixed32 from = 1; /* - * The (immediate) destination for this packet. If we are using routing, the - * final destination will be in payload.dest + * The (immediate) destination for this packet */ fixed32 to = 2; From 5241583565ccbbb4986180bf4c6eb7f8a0dec285 Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 25 Feb 2024 03:58:08 +0800 Subject: [PATCH 131/137] 'station_g2' --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 4863826..6a97fc3 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -349,6 +349,11 @@ enum HardwareModel { */ RP2040_LORA = 30; + /* + * B&Q Consulting Station G2: https://wiki.uniteng.com/en/meshtastic/station-g2 + */ + STATION_G2 = 31; + /* * --------------------------------------------------------------------------- * Less common/prototype boards listed here (needs one more byte over the air) From c0c413bc8d8d341229915d1f08e7a7729275df95 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Wed, 28 Feb 2024 19:13:29 +0100 Subject: [PATCH 132/137] Add `hopStart` (original hopLimit of a packet) to MeshPacket --- meshtastic/mesh.options | 1 + meshtastic/mesh.proto | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 731b3bc..5053693 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -26,6 +26,7 @@ *MeshPacket.encrypted max_size:256 *MeshPacket.payload_variant anonymous_oneof:true *MeshPacket.hop_limit int_size:8 +*MeshPacket.hop_start int_size:8 *MeshPacket.channel int_size:8 *QueueStatus.res int_size:8 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index af08b80..4bf2313 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1003,6 +1003,12 @@ message MeshPacket { * Describes whether this packet passed via MQTT somewhere along the path it currently took. */ bool via_mqtt = 14; + + /* + * Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header. + * When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. + */ + uint32 hop_start = 15; } /* @@ -1539,5 +1545,4 @@ message DeviceMetadata { * Has Remote Hardware enabled */ bool hasRemoteHardware = 10; -} - +} \ No newline at end of file From 7ebbc390d2abfdfa4d53a629dbf1fa22bfff1fa4 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 2 Mar 2024 08:00:26 -0600 Subject: [PATCH 133/137] Add via_mqtt and hops_away to NodeInfo/Lite --- meshtastic/deviceonly.options | 3 ++- meshtastic/deviceonly.proto | 10 ++++++++++ meshtastic/mesh.options | 1 + meshtastic/mesh.proto | 10 ++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/meshtastic/deviceonly.options b/meshtastic/deviceonly.options index 3992bf5..d870ace 100644 --- a/meshtastic/deviceonly.options +++ b/meshtastic/deviceonly.options @@ -15,4 +15,5 @@ *DeviceState.node_remote_hardware_pins max_count:12 -*NodeInfoLite.channel int_size:8 \ No newline at end of file +*NodeInfoLite.channel int_size:8 +*NodeInfoLite.hops_away int_size:8 \ No newline at end of file diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 4f6b9a9..169df1c 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -116,6 +116,16 @@ message NodeInfoLite { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if adjacent) + */ + uint32 hops_away = 9; } /* diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 5053693..aedfe99 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -14,6 +14,7 @@ *Data.payload max_size:237 *NodeInfo.channel int_size:8 +*NodeInfo.hops_away int_size:8 # Big enough for 1.2.28.568032c-d *MyNodeInfo.firmware_version max_size:18 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 28143e4..76aa01b 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1116,6 +1116,16 @@ message NodeInfo { * local channel index we heard that node on. Only populated if its not the default channel. */ uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if adjacent) + */ + uint32 hops_away = 9; } /* From 8d0247932947c29362e6893982e87687704be7e6 Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Sat, 2 Mar 2024 14:50:39 -0800 Subject: [PATCH 134/137] remove missing links --- meshtastic/portnums.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index cd6bced..217f752 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -48,28 +48,28 @@ enum PortNum { /* * The built-in position messaging app. - * Payload is a [Position](/docs/developers/protobufs/api#position) message + * Payload is a Position message. * ENCODING: Protobuf */ POSITION_APP = 3; /* * The built-in user info app. - * Payload is a [User](/docs/developers/protobufs/api#user) message + * Payload is a User message. * ENCODING: Protobuf */ NODEINFO_APP = 4; /* * Protocol control packets for mesh protocol use. - * Payload is a [Routing](/docs/developers/protobufs/api#routing) message + * Payload is a Routing message. * ENCODING: Protobuf */ ROUTING_APP = 5; /* * Admin control packets. - * Payload is a [AdminMessage](/docs/developers/protobufs/api#adminmessage) message + * Payload is a AdminMessage message. * ENCODING: Protobuf */ ADMIN_APP = 6; @@ -85,7 +85,7 @@ enum PortNum { /* * Waypoint payloads. - * Payload is a [Waypoint](/docs/developers/protobufs/api#waypoint) message + * Payload is a Waypoint message. * ENCODING: Protobuf */ WAYPOINT_APP = 8; From e745804bf54142d382d5568dd47f5638b16eeb79 Mon Sep 17 00:00:00 2001 From: Thomas Herrmann Date: Sat, 2 Mar 2024 22:29:28 +0100 Subject: [PATCH 135/137] add BMP085 (BMP180) sensor --- meshtastic/telemetry.proto | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 3843631..282b32c 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -279,6 +279,9 @@ enum TelemetrySensorType { */ INA3221 = 14; + /* + * BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) + */ + BMP085 = 15; - -} \ No newline at end of file +} From 3cc3e27e7c631a481c234324a598b638498cf3ae Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 9 Mar 2024 17:06:24 +0100 Subject: [PATCH 136/137] MapReport message and config for MQTT --- meshtastic/module_config.proto | 25 +++++++++++++ meshtastic/mqtt.options | 6 ++- meshtastic/mqtt.proto | 68 ++++++++++++++++++++++++++++++++++ meshtastic/portnums.proto | 5 +++ 4 files changed, 103 insertions(+), 1 deletion(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index d55d2c3..f2c2805 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -70,6 +70,31 @@ message ModuleConfig { * If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection */ bool proxy_to_client_enabled = 9; + + /* + * If true, we will periodically report unencrypted information about our node to a map via MQTT + */ + bool map_reporting_enabled = 10; + + /* + * Settings for reporting information about our node to a map via MQTT + */ + MapReportSettings map_report_settings = 11; + } + + /* + * Settings for reporting unencrypted information about our node to a map via MQTT + */ + message MapReportSettings { + /* + * How often we should report our info to the map (in seconds) + */ + uint32 publish_interval_secs = 1; + + /* + * Bits of precision for the location sent (default of 32 is full precision). + */ + uint32 position_precision = 2; } /* diff --git a/meshtastic/mqtt.options b/meshtastic/mqtt.options index 261a74b..e10f388 100644 --- a/meshtastic/mqtt.options +++ b/meshtastic/mqtt.options @@ -1,3 +1,7 @@ *ServiceEnvelope.packet type:FT_POINTER *ServiceEnvelope.channel_id type:FT_POINTER -*ServiceEnvelope.gateway_id type:FT_POINTER \ No newline at end of file +*ServiceEnvelope.gateway_id type:FT_POINTER + +*MapReport.long_name max_size:40 +*MapReport.short_name max_size:5 +*MapReport.num_online_local_nodes int_size:16 \ No newline at end of file diff --git a/meshtastic/mqtt.proto b/meshtastic/mqtt.proto index 7631435..4da76cb 100644 --- a/meshtastic/mqtt.proto +++ b/meshtastic/mqtt.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package meshtastic; import "meshtastic/mesh.proto"; +import "meshtastic/config.proto"; option csharp_namespace = "Meshtastic.Protobufs"; option go_package = "github.com/meshtastic/go/generated"; @@ -30,4 +31,71 @@ message ServiceEnvelope { * the globally trusted nodenum */ string gateway_id = 3; +} + +/* + * Information about a node intended to be reported unencrypted to a map using MQTT. + */ +message MapReport { + /* + * A full name for this user, i.e. "Kevin Hester" + */ + string long_name = 1; + + /* + * A VERY short name, ideally two characters. + * Suitable for a tiny OLED screen + */ + string short_name = 2; + + /* + * Role of the node that applies specific settings for a particular use-case + */ + Config.DeviceConfig.Role role = 3; + + /* + * Hardware model of the node, i.e. T-Beam, Heltec V3, etc... + */ + HardwareModel hw_model = 4; + + /* + * The region code for the radio (US, CN, EU433, etc...) + */ + Config.LoRaConfig.RegionCode region = 5; + + /* + * Modem preset used by the radio (LongFast, MediumSlow, etc...) + */ + Config.LoRaConfig.ModemPreset modem_preset = 6; + + /* + * Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...) + * and it uses the default frequency slot given the region and modem preset. + */ + bool has_default_channel = 7; + + /* + * Latitude: multiply by 1e-7 to get degrees in floating point + */ + sfixed32 latitude_i = 8; + + /* + * Longitude: multiply by 1e-7 to get degrees in floating point + */ + sfixed32 longitude_i = 9; + + /* + * Altitude in meters above MSL + */ + int32 altitude = 10; + + /* + * Indicates the bits of precision for latitude and longitude set by the sending node + */ + uint32 position_precision = 11; + + /* + * Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) + */ + uint32 num_online_local_nodes = 12; } \ No newline at end of file diff --git a/meshtastic/portnums.proto b/meshtastic/portnums.proto index 6a85fac..b02651a 100644 --- a/meshtastic/portnums.proto +++ b/meshtastic/portnums.proto @@ -191,6 +191,11 @@ enum PortNum { */ ATAK_PLUGIN = 72; + /* + * Provides unencrypted information about a node for consumption by a map via MQTT + */ + MAP_REPORT_APP = 73; + /* * Private applications should use portnums >= 256. * To simplify initial development and testing you can use "PRIVATE_APP" From 00332412b238fe559175a6e83fdf8d31fa5e209a Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 9 Mar 2024 19:09:10 +0100 Subject: [PATCH 137/137] Add firmware_version to MapReport --- meshtastic/mqtt.options | 1 + meshtastic/mqtt.proto | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/meshtastic/mqtt.options b/meshtastic/mqtt.options index e10f388..591e898 100644 --- a/meshtastic/mqtt.options +++ b/meshtastic/mqtt.options @@ -4,4 +4,5 @@ *MapReport.long_name max_size:40 *MapReport.short_name max_size:5 +*MapReport.firmware_version max_size:18 *MapReport.num_online_local_nodes int_size:16 \ No newline at end of file diff --git a/meshtastic/mqtt.proto b/meshtastic/mqtt.proto index 4da76cb..17ebf0e 100644 --- a/meshtastic/mqtt.proto +++ b/meshtastic/mqtt.proto @@ -58,44 +58,49 @@ message MapReport { */ HardwareModel hw_model = 4; + /* + * Device firmware version string + */ + string firmware_version = 5; + /* * The region code for the radio (US, CN, EU433, etc...) */ - Config.LoRaConfig.RegionCode region = 5; + Config.LoRaConfig.RegionCode region = 6; /* * Modem preset used by the radio (LongFast, MediumSlow, etc...) */ - Config.LoRaConfig.ModemPreset modem_preset = 6; + Config.LoRaConfig.ModemPreset modem_preset = 7; /* * Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...) * and it uses the default frequency slot given the region and modem preset. */ - bool has_default_channel = 7; + bool has_default_channel = 8; /* * Latitude: multiply by 1e-7 to get degrees in floating point */ - sfixed32 latitude_i = 8; + sfixed32 latitude_i = 9; /* * Longitude: multiply by 1e-7 to get degrees in floating point */ - sfixed32 longitude_i = 9; + sfixed32 longitude_i = 10; /* * Altitude in meters above MSL */ - int32 altitude = 10; + int32 altitude = 11; /* * Indicates the bits of precision for latitude and longitude set by the sending node */ - uint32 position_precision = 11; + uint32 position_precision = 12; /* * Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) */ - uint32 num_online_local_nodes = 12; + uint32 num_online_local_nodes = 13; } \ No newline at end of file