From 7e35d86248bcf5d616fcdbc0bc80675dfa4c40e3 Mon Sep 17 00:00:00 2001 From: Jorge Castillo Date: Tue, 5 Aug 2025 17:57:03 -0400 Subject: [PATCH 1/4] Add LTE configuration and status messages to protobuf definitions --- meshtastic/config.proto | 26 ++++++++++++++++ meshtastic/connection_status.proto | 49 ++++++++++++++++++++++++++++++ meshtastic/localonly.proto | 5 +++ meshtastic/mesh.proto | 7 +++++ meshtastic/powermon.proto | 4 +++ 5 files changed, 91 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 321bbb24..3134346c 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -569,6 +569,11 @@ message Config { */ bool ipv6_enabled = 11; + /* + * LTE modem enabled + */ + bool lte_enabled = 12; + /* * Available flags auxiliary network protocols */ @@ -583,6 +588,7 @@ message Config { */ UDP_BROADCAST = 0x0001; } + } /* @@ -1202,6 +1208,24 @@ message Config { */ message SessionkeyConfig {} + message LTEConfig { + /* + * LTE Config + */ + // Access Point Name for LTE network + string apn = 2; + + // SIM card PIN code (if required) + string sim_pin = 3; + + // Username for APN authentication (optional) + string apn_username = 5; + + // Password for APN authentication (optional) + string apn_password = 6; + +} + /* * Payload Variant */ @@ -1216,5 +1240,7 @@ message Config { SecurityConfig security = 8; SessionkeyConfig sessionkey = 9; DeviceUIConfig device_ui = 10; + LTEConfig lte = 11; } } + diff --git a/meshtastic/connection_status.proto b/meshtastic/connection_status.proto index 75515965..10b3b4fc 100644 --- a/meshtastic/connection_status.proto +++ b/meshtastic/connection_status.proto @@ -27,6 +27,11 @@ message DeviceConnectionStatus { * Serial Status */ optional SerialConnectionStatus serial = 4; + + /* + * LTE Status + */ + optional LTEModemStatus lte = 5; } /* @@ -118,3 +123,47 @@ message SerialConnectionStatus { */ bool is_connected = 2; } + +/* + * LTE modem status + */ +message LTEModemStatus { + + + /* + * Whether the LTE modem is enabled + */ + bool sim_ready = 1; + /* + * Whether the LTE modem is connected + */ + bool connected = 2; + /* + * Signal strength (RSSI) + */ + int32 rssi = 3; + /* + * IP address assigned to the LTE modem + */ + string ip_address = 4; + /* + * Error message if any + */ + string error = 5; + /* + * LTE band selection + */ + string band = 6; + /* + * available operators + */ + repeated string operators = 7; + /* + * Connection status + */ + NetworkConnectionStatus status = 8; + /* + * phone number + */ + string phone_number = 9; +} \ No newline at end of file diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index bcb27964..975bd8ca 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -63,6 +63,11 @@ message LocalConfig { * The part of the config that is specific to Security settings */ Config.SecurityConfig security = 9; + /* + * The part of the config that is specific to the LTE modem + * This is used for LTE modem configuration and status + */ + Config.LTEConfig lte = 10; } message LocalModuleConfig { diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index e68c56bd..1c69182a 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -2158,6 +2158,13 @@ message DeviceMetadata { * (bitwise OR of ExcludedModules) */ uint32 excluded_modules = 12; + + /* + * Indicates whether the device has LTE capabilities + * (e.g. Quectel BG96, SIM7600, etc.) + */ + + bool hasLTE = 13; } /* diff --git a/meshtastic/powermon.proto b/meshtastic/powermon.proto index 77206f4c..274ee765 100644 --- a/meshtastic/powermon.proto +++ b/meshtastic/powermon.proto @@ -48,6 +48,7 @@ message PowerMon { * See GPSPowerState for more details */ GPS_Active = 0x800; + LTE_On = 0x1000; // LTE modem is powered on } } @@ -92,6 +93,9 @@ message PowerStressMessage { GPS_OFF = 112; // Turn off the GPS radio for num_seconds GPS_ON = 113; // Turn on the GPS radio for num_seconds + + LTE_OFF = 0x80; // Turn off the LTE radio for num_seconds + LTE_ON = 0x81; // Turn on the LTE radio for num_seconds } /* From 5e32df48bf8856507eccc81031e55211d5d6589c Mon Sep 17 00:00:00 2001 From: Jorge Castillo Date: Fri, 22 Aug 2025 14:35:17 -0400 Subject: [PATCH 2/4] Add LTE configuration fields to protobuf definitions --- meshtastic/config.options | 5 +++++ meshtastic/config.proto | 8 ++++---- meshtastic/lte.proto | 0 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 meshtastic/lte.proto diff --git a/meshtastic/config.options b/meshtastic/config.options index 3f6d81c9..07588044 100644 --- a/meshtastic/config.options +++ b/meshtastic/config.options @@ -22,3 +22,8 @@ *SecurityConfig.private_key max_size:32 *SecurityConfig.admin_key max_size:32 *SecurityConfig.admin_key max_count:3 + +*LTEConfig.apn max_size:32 +*LTEConfig.sim_pin max_size:4 +*LTEConfig.apn_username max_size:16 +*LTEConfig.apn_password max_size:16 \ No newline at end of file diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 3134346c..8f56798a 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -1213,16 +1213,16 @@ message Config { * LTE Config */ // Access Point Name for LTE network - string apn = 2; + string apn = 1; // SIM card PIN code (if required) - string sim_pin = 3; + string sim_pin = 2; // Username for APN authentication (optional) - string apn_username = 5; + string apn_username = 3; // Password for APN authentication (optional) - string apn_password = 6; + string apn_password = 4; } diff --git a/meshtastic/lte.proto b/meshtastic/lte.proto new file mode 100644 index 00000000..e69de29b From 427109ce63a5954e6ebe0a50b3092ea9b93654b9 Mon Sep 17 00:00:00 2001 From: Jorge Castillo Date: Fri, 22 Aug 2025 18:19:56 -0400 Subject: [PATCH 3/4] Remove lte.proto file --- meshtastic/lte.proto | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 meshtastic/lte.proto diff --git a/meshtastic/lte.proto b/meshtastic/lte.proto deleted file mode 100644 index e69de29b..00000000 From ee3d7e9036495e71e134df61d9ec101ebd15810a Mon Sep 17 00:00:00 2001 From: Jorge Castillo Date: Fri, 22 Aug 2025 18:40:43 -0400 Subject: [PATCH 4/4] Refactor protobuf comments and formatting for clarity in config, connection status, localonly, and mesh files --- meshtastic/config.proto | 29 +++++++++++++---------------- meshtastic/connection_status.proto | 8 +++----- meshtastic/localonly.proto | 1 + meshtastic/mesh.proto | 2 +- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index df08a217..02c0e828 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -569,7 +569,7 @@ message Config { */ bool ipv6_enabled = 11; - /* + /* * LTE modem enabled */ bool lte_enabled = 12; @@ -588,7 +588,6 @@ message Config { */ UDP_BROADCAST = 0x0001; } - } /* @@ -1209,22 +1208,21 @@ message Config { message SessionkeyConfig {} message LTEConfig { - /* - * LTE Config - */ - // Access Point Name for LTE network - string apn = 1; - - // SIM card PIN code (if required) - string sim_pin = 2; + /* + * LTE Config + */ + // Access Point Name for LTE network + string apn = 1; - // Username for APN authentication (optional) - string apn_username = 3; + // SIM card PIN code (if required) + string sim_pin = 2; - // Password for APN authentication (optional) - string apn_password = 4; + // Username for APN authentication (optional) + string apn_username = 3; -} + // Password for APN authentication (optional) + string apn_password = 4; + } /* * Payload Variant @@ -1243,4 +1241,3 @@ message Config { LTEConfig lte = 11; } } - diff --git a/meshtastic/connection_status.proto b/meshtastic/connection_status.proto index 10b3b4fc..86d096d7 100644 --- a/meshtastic/connection_status.proto +++ b/meshtastic/connection_status.proto @@ -128,8 +128,6 @@ message SerialConnectionStatus { * LTE modem status */ message LTEModemStatus { - - /* * Whether the LTE modem is enabled */ @@ -155,8 +153,8 @@ message LTEModemStatus { */ string band = 6; /* - * available operators - */ + * available operators + */ repeated string operators = 7; /* * Connection status @@ -166,4 +164,4 @@ message LTEModemStatus { * phone number */ string phone_number = 9; -} \ No newline at end of file +} diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index 975bd8ca..0acfcc2c 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -63,6 +63,7 @@ message LocalConfig { * The part of the config that is specific to Security settings */ Config.SecurityConfig security = 9; + /* * The part of the config that is specific to the LTE modem * This is used for LTE modem configuration and status diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 54aec472..f0886285 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -779,7 +779,7 @@ enum HardwareModel { * https://heltec.org/project/meshsolar/ */ HELTEC_MESH_SOLAR = 108; - + /* * Lilygo T-Echo Lite */