From 4cd6fa053f75cc1c9c4b4a3896ff1b1c4ead03a9 Mon Sep 17 00:00:00 2001 From: sigmahour <> Date: Wed, 24 Aug 2022 11:32:06 -0400 Subject: [PATCH 1/9] removal of unused import causing error is protoc --- module_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_config.proto b/module_config.proto index ae45d72..75e64ab 100644 --- a/module_config.proto +++ b/module_config.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -import "telemetry.proto"; +//import "telemetry.proto"; option java_package = "com.geeksville.mesh"; option java_outer_classname = "ModuleConfigProtos"; From cd7d2fe903f693c1774d64432f10df1b1e234e89 Mon Sep 17 00:00:00 2001 From: sigmahour <> Date: Thu, 25 Aug 2022 17:18:08 -0400 Subject: [PATCH 2/9] removed unused import --- module_config.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/module_config.proto b/module_config.proto index 75e64ab..db00c98 100644 --- a/module_config.proto +++ b/module_config.proto @@ -1,5 +1,4 @@ syntax = "proto3"; -//import "telemetry.proto"; option java_package = "com.geeksville.mesh"; option java_outer_classname = "ModuleConfigProtos"; From e72af95951ba4664f34374de492469a024dc64c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 9 Sep 2022 10:51:11 +0200 Subject: [PATCH 3/9] fix linter errors in protobuf setup, and restore hardware enum to put less used hardware at 32+ --- localonly.proto | 2 +- mesh.proto | 134 ++++++++++++++++++++++---------------------- module_config.proto | 2 +- telemetry.proto | 2 +- 4 files changed, 70 insertions(+), 70 deletions(-) diff --git a/localonly.proto b/localonly.proto index 6d07c87..0e4fcbe 100644 --- a/localonly.proto +++ b/localonly.proto @@ -33,7 +33,7 @@ message LocalConfig { /* * The part of the config that is specific to the Wifi Settings */ - Config.WiFiConfig wifi = 4; + Config.NetworkConfig network = 4; /* * The part of the config that is specific to the Display diff --git a/mesh.proto b/mesh.proto index e8116e3..7cbd407 100644 --- a/mesh.proto +++ b/mesh.proto @@ -48,22 +48,22 @@ message Position { /* * TODO: REPLACE */ - UNSET = 0; + LOC_UNSET = 0; /* * TODO: REPLACE */ - MANUAL = 1; + LOC_MANUAL = 1; /* * TODO: REPLACE */ - GPS_INTERNAL = 2; + LOC_INTERNAL = 2; /* * TODO: REPLACE */ - GPS_EXTERNAL = 3; + LOC_EXTERNAL = 3; } /* @@ -80,27 +80,27 @@ message Position { /* * TODO: REPLACE */ - UNSET = 0; + ALT_UNSET = 0; /* * TODO: REPLACE */ - MANUAL = 1; + ALT_MANUAL = 1; /* * TODO: REPLACE */ - GPS_INTERNAL = 2; + ALT_INTERNAL = 2; /* * TODO: REPLACE */ - GPS_EXTERNAL = 3; + ALT_EXTERNAL = 3; /* * TODO: REPLACE */ - BAROMETRIC = 4; + ALT_BAROMETRIC = 4; } /* @@ -278,77 +278,77 @@ enum HardwareModel { * New T-BEAM with ESP32-S3 CPU */ LILYGO_TBEAM_S3_CORE = 12; - - /* - * Less common/prototype boards listed here (needs one more byte over the air) - */ - LORA_RELAY_V1 = 12; - - /* - * TODO: REPLACE - */ - NRF52840DK = 13; - - /* - * TODO: REPLACE - */ - PPR = 14; - - /* - * TODO: REPLACE - */ - GENIEBLOCKS = 15; - - /* - * TODO: REPLACE - */ - NRF52_UNKNOWN = 16; - - /* - * TODO: REPLACE - */ - PORTDUINO = 17; - - /* - * The simulator built into the android app - */ - ANDROID_SIM = 18; - - /* - * Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics - */ - DIY_V1 = 19; /* * RAK WisBlock ESP32 core: https://docs.rakwireless.com/Product-Categories/WisBlock/RAK11200/Overview/ */ - RAK11200 = 20; + RAK11200 = 13; /* * B&Q Consulting Nano Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:nano */ - NANO_G1 = 21; - - /* - * nRF52840 Dongle : https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle/ - */ - NRF52840_PCA10059 = 22; + NANO_G1 = 14; - /* - * Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3 - */ - DR_DEV = 23; - - /* - * M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ - */ - M5STACK = 24; - /* * B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */ STATION_G1 = 25; + + /* + * Less common/prototype boards listed here (needs one more byte over the air) + */ + LORA_RELAY_V1 = 32; + /* + * TODO: REPLACE + */ + NRF52840DK = 33; + + /* + * TODO: REPLACE + */ + PPR = 34; + + /* + * TODO: REPLACE + */ + GENIEBLOCKS = 35; + + /* + * TODO: REPLACE + */ + NRF52_UNKNOWN = 36; + + /* + * TODO: REPLACE + */ + PORTDUINO = 37; + + /* + * The simulator built into the android app + */ + ANDROID_SIM = 38; + + /* + * Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics + */ + DIY_V1 = 39; + + /* + * nRF52840 Dongle : https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle/ + */ + NRF52840_PCA10059 = 40; + + /* + * Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3 + */ + DR_DEV = 41; + + /* + * M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ + */ + M5STACK = 42; + /* * 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. */ @@ -835,7 +835,7 @@ enum Constants { * First enum must be zero, and we are just using this enum to * pass int constants between two very different environments */ - UNSET = 0; + ZERO = 0; /* * From mesh.options diff --git a/module_config.proto b/module_config.proto index ce98780..264916e 100644 --- a/module_config.proto +++ b/module_config.proto @@ -65,7 +65,7 @@ message ModuleConfig { * TODO: REPLACE */ enum Serial_Baud { - DEFAULT = 0; + BAUD_DEFAULT = 0; BAUD_110 = 1; BAUD_300 = 2; BAUD_600 = 3; diff --git a/telemetry.proto b/telemetry.proto index d35fe60..72f1a9d 100644 --- a/telemetry.proto +++ b/telemetry.proto @@ -99,7 +99,7 @@ enum TelemetrySensorType { /* * No external telemetry sensor explicitly set */ - UNSET = 0; + SENSOR_UNSET = 0; /* * High accuracy temperature, pressure, humidity From fdfa8209ca51020dc4f46ec5598c50fb205e8201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 9 Sep 2022 11:53:20 +0200 Subject: [PATCH 4/9] Update config.options --- config.options | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.options b/config.options index 2ec4332..0290b2d 100644 --- a/config.options +++ b/config.options @@ -1,7 +1,7 @@ -*WiFiConfig.ssid max_size:33 -*WiFiConfig.psk max_size:64 +*NetworkConfig.wifi_ssid max_size:33 +*NetworkConfig.wifi_psk max_size:64 # Max of three ignored nodes for our testing *LoRaConfig.ignore_incoming max_count:3 -*DeviceConfig.ntp_server max_size:33 \ No newline at end of file +*NetworkConfig.ntp_server max_size:33 From f3c4aff7a9f164b10680b8504f0036b4ed84404e Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Fri, 9 Sep 2022 20:42:18 +1000 Subject: [PATCH 5/9] Change enum member `WIFI_CONFIG` to `NETWORK_CONFIG` --- admin.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin.proto b/admin.proto index 89d6e5b..3dc9f21 100644 --- a/admin.proto +++ b/admin.proto @@ -42,7 +42,7 @@ message AdminMessage { /* * TODO: REPLACE */ - WIFI_CONFIG = 3; + NETWORK_CONFIG = 3; /* * TODO: REPLACE From 3d4c8278311045f4781af7063e9159b3724761d3 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 10 Sep 2022 14:21:53 -0500 Subject: [PATCH 6/9] Update telemetry.proto --- telemetry.proto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/telemetry.proto b/telemetry.proto index 72f1a9d..0842467 100644 --- a/telemetry.proto +++ b/telemetry.proto @@ -130,4 +130,14 @@ enum TelemetrySensorType { * High accuracy temperature and pressure */ BMP280 = 6; + + /* + * High accuracy temperature and humidity + */ + SHTC3 = 7; + + /* + * High accuracy pressure + */ + LPS22 = 8; }; From 5e255c01ed8883c9e68d3d4574b300ca609407c5 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 11 Sep 2022 10:54:57 +1000 Subject: [PATCH 7/9] Add & swap more fields to enabled by default --- config.proto | 32 +++++++++++++++++++------------- module_config.proto | 1 - 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/config.proto b/config.proto index 01ca397..63fb0a4 100644 --- a/config.proto +++ b/config.proto @@ -47,9 +47,9 @@ message Config { Role role = 1; /* - * If set, this will disable the SerialConsole by not initilizing the StreamAPI + * Disabling this will disable the SerialConsole by not initilizing the StreamAPI */ - bool serial_disabled = 2; + bool serial_enabled = 2; /* * By default we turn off logging as soon as an API client connects (to keep shared serial link quiet). @@ -138,9 +138,9 @@ message Config { uint32 position_broadcast_secs = 1; /* - * Disable adaptive position braoadcast, which is now the default. + * Adaptive position braoadcast, which is now the default. */ - bool position_broadcast_smart_disabled = 2; + bool position_broadcast_smart_enabled = 2; /* * If set, this node is at a fixed position. @@ -150,9 +150,9 @@ message Config { bool fixed_position = 3; /* - * Should the GPS be disabled for this node? + * Is GPS enabled for this node? */ - bool gps_disabled = 4; + bool gps_enabled = 4; /* * How often should we try to get GPS position (in seconds) @@ -481,12 +481,10 @@ message Config { } /* - * If zero then, use default max legal continuous power (ie. something that won't - * burn out the radio hardware) - * In most cases you should use zero here. - * Units are in dBm. - */ - int32 tx_power = 1; + * When enabled, the `modem_preset` fields will be adheared to, else the `bandwidth`/`spread_factor`/`coding_rate` + * will be taked from their respective manually defined fields + */ + bool use_preset = 1; /* * Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. @@ -538,7 +536,15 @@ message Config { * Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests. * Defaults to false */ - bool tx_disabled = 9; + bool tx_enabled = 9; + + /* + * If zero then, use default max legal continuous power (ie. something that won't + * burn out the radio hardware) + * In most cases you should use zero here. + * Units are in dBm. + */ + int32 tx_power = 10; /* * For testing it is useful sometimes to force a node to never listen to diff --git a/module_config.proto b/module_config.proto index 264916e..9a54122 100644 --- a/module_config.proto +++ b/module_config.proto @@ -18,7 +18,6 @@ message ModuleConfig { /* * If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as * is_uplink_enabled or is_downlink_enabled. - * But if this flag is set, all MQTT features will be disabled and no servers will be contacted. */ bool enabled = 1; From 742152daebe41d034a9b214974a79f91b4860d38 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Mon, 12 Sep 2022 00:08:19 +1000 Subject: [PATCH 8/9] Missing protos for requests --- admin.proto | 5 +++++ config.proto | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/admin.proto b/admin.proto index 3dc9f21..87cf0e6 100644 --- a/admin.proto +++ b/admin.proto @@ -244,5 +244,10 @@ message AdminMessage { * Tell the node to factory reset, all device settings will be returned to factory defaults. */ int32 factory_reset = 99; + + /* + * Tell the node to reset the nodedb. + */ + int32 nodedb_reset = 100; } } diff --git a/config.proto b/config.proto index 63fb0a4..4a024a9 100644 --- a/config.proto +++ b/config.proto @@ -341,6 +341,22 @@ message Config { OSGR = 5; } + /* + * Unit display preference + */ + enum DisplayUnits { + + /* + * Metric (Default) + */ + METRIC = 0; + + /* + * Imperial + */ + IMPERIAL = 1; + } + /* * Number of seconds the screen stays on after pressing the user button or receiving a message * 0 for default of one minute MAXUINT for always on @@ -363,6 +379,16 @@ message Config { * (top of display is heading direction) is used. */ bool compass_north_top = 4; + + /* + * Flip screen vertically, for cases that mount the screen upside down + */ + bool flip_screen = 5; + + /* + * Perferred display units + */ + DisplayUnits units = 6; } /* From beb8809092026a18e86eb4ce75d8e03ad46752a7 Mon Sep 17 00:00:00 2001 From: sigmahour <> Date: Sun, 11 Sep 2022 16:32:40 -0400 Subject: [PATCH 9/9] fixed typo --- config.proto | 2 +- mesh.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.proto b/config.proto index 4a024a9..f9b8a51 100644 --- a/config.proto +++ b/config.proto @@ -89,7 +89,7 @@ message Config { /* * Include geoidal separation */ - GEOIDAL_SEPERATION = 0x0004; + GEOIDAL_SEPARATION = 0x0004; /* * Include the DOP value ; PDOP used by default, see below diff --git a/mesh.proto b/mesh.proto index 7cbd407..23a5879 100644 --- a/mesh.proto +++ b/mesh.proto @@ -126,7 +126,7 @@ message Position { /* * Geoidal separation in meters */ - sint32 altitude_geoidal_seperation = 10; + sint32 altitude_geoidal_separation = 10; /* * Horizontal, Vertical and Position Dilution of Precision, in 1/100 units