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 52142181..02c0e828 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 */ @@ -1202,6 +1207,23 @@ 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; + + // Username for APN authentication (optional) + string apn_username = 3; + + // Password for APN authentication (optional) + string apn_password = 4; + } + /* * Payload Variant */ @@ -1216,5 +1238,6 @@ 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..86d096d7 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,45 @@ 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; +} diff --git a/meshtastic/localonly.proto b/meshtastic/localonly.proto index bcb27964..0acfcc2c 100644 --- a/meshtastic/localonly.proto +++ b/meshtastic/localonly.proto @@ -63,6 +63,12 @@ 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 504b7a56..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 */ @@ -2213,6 +2213,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 } /*