diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index ffb924a4d..b42e2be31 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,6 +1,6 @@ version: 0.1 cli: - version: 1.22.10 + version: 1.22.11 plugins: sources: - id: trunk @@ -12,7 +12,7 @@ lint: - trufflehog@3.88.16 - yamllint@1.36.0 - bandit@1.8.3 - - checkov@3.2.382 + - checkov@3.2.384 - terrascan@1.19.9 - trivy@0.60.0 - taplo@0.9.3 diff --git a/protobufs b/protobufs index 035a8017b..14ec20586 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 035a8017b87379f17624f7bba9b6a5b127bc026c +Subproject commit 14ec205865592fcfa798065bb001a549fc77b438 diff --git a/src/mesh/generated/meshtastic/admin.pb.h b/src/mesh/generated/meshtastic/admin.pb.h index 02d50127e..efe60f493 100644 --- a/src/mesh/generated/meshtastic/admin.pb.h +++ b/src/mesh/generated/meshtastic/admin.pb.h @@ -34,7 +34,7 @@ typedef enum _meshtastic_AdminMessage_ConfigType { meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6, /* TODO: REPLACE */ meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG = 7, - /* */ + /* Session key config */ meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG = 8, /* device-ui config */ meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG = 9 diff --git a/src/mesh/generated/meshtastic/config.pb.h b/src/mesh/generated/meshtastic/config.pb.h index 4747ddb5a..848f8df86 100644 --- a/src/mesh/generated/meshtastic/config.pb.h +++ b/src/mesh/generated/meshtastic/config.pb.h @@ -374,7 +374,7 @@ typedef struct _meshtastic_Config_PositionConfig { /* Power Config\ See [Power Config](/docs/settings/config/power) for additional power config details. */ typedef struct _meshtastic_Config_PowerConfig { - /* Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. + /* Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. Don't use this setting if you want to use your device with the phone apps or are using a device without a user button. Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles */ bool is_power_saving; @@ -426,7 +426,7 @@ typedef struct _meshtastic_Config_NetworkConfig { char wifi_ssid[33]; /* If set, will be use to authenticate to the named wifi */ char wifi_psk[65]; - /* NTP server to use if WiFi is conneced, defaults to `0.pool.ntp.org` */ + /* NTP server to use if WiFi is conneced, defaults to `meshtastic.pool.ntp.org` */ char ntp_server[33]; /* Enable Ethernet */ bool eth_enabled; diff --git a/src/mesh/generated/meshtastic/device_ui.pb.h b/src/mesh/generated/meshtastic/device_ui.pb.h index 8cfc0b8cd..5692a2749 100644 --- a/src/mesh/generated/meshtastic/device_ui.pb.h +++ b/src/mesh/generated/meshtastic/device_ui.pb.h @@ -53,6 +53,8 @@ typedef enum _meshtastic_Language { meshtastic_Language_NORWEGIAN = 14, /* Slovenian */ meshtastic_Language_SLOVENIAN = 15, + /* Ukrainian */ + meshtastic_Language_UKRAINIAN = 16, /* Simplified Chinese (experimental) */ meshtastic_Language_SIMPLIFIED_CHINESE = 30, /* Traditional Chinese (experimental) */ diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index 193a61901..991aeb8d2 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -159,7 +159,7 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_TD_LORAC = 60, /* CDEBYTE EoRa-S3 board using their own MM modules, clone of LILYGO T3S3 */ meshtastic_HardwareModel_CDEBYTE_EORA_S3 = 61, - /* TWC_MESH_V4 + /* TWC_MESH_V4 Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS */ meshtastic_HardwareModel_TWC_MESH_V4 = 62, /* NRF52_PROMICRO_DIY @@ -228,6 +228,13 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_MESHLINK = 87, /* Seeed XIAO nRF52840 + Wio SX1262 kit */ meshtastic_HardwareModel_XIAO_NRF52_KIT = 88, + /* Elecrow ThinkNode M1 & M2 + https://www.elecrow.com/wiki/ThinkNode-M1_Transceiver_Device(Meshtastic)_Power_By_nRF52840.html + https://www.elecrow.com/wiki/ThinkNode-M2_Transceiver_Device(Meshtastic)_Power_By_NRF52840.html (this actually uses ESP32-S3) */ + meshtastic_HardwareModel_THINKNODE_M1 = 89, + meshtastic_HardwareModel_THINKNODE_M2 = 90, + /* Lilygo T-ETH-Elite */ + meshtastic_HardwareModel_T_ETH_ELITE = 91, /* ------------------------------------------------------------------------------------------------------------------------------------------ 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. ------------------------------------------------------------------------------------------------------------------------------------------ */ @@ -769,7 +776,7 @@ typedef struct _meshtastic_MeshPacket { meshtastic_MeshPacket_public_key_t public_key; /* Indicates whether the packet was en/decrypted using PKI */ bool pki_encrypted; - /* Last byte of the node number of the node that should be used as the next hop in routing. + /* Last byte of the node number of the node that should be used as the next hop in routing. Set by the firmware internally, clients are not supposed to set this. */ uint8_t next_hop; /* Last byte of the node number of the node that will relay/relayed this packet. diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index ac25f57a5..ac0a8c0de 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -637,6 +637,14 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) #if !MESHTASTIC_EXCLUDE_PKI crypto->setDHPrivateKey(config.security.private_key.bytes); #endif + if (config.security.is_managed && !(config.security.admin_key[0].size == 32 || config.security.admin_key[1].size == 32 || + config.security.admin_key[2].size == 32)) { + config.security.is_managed = false; + const char *warning = "You must provide at least one admin public key to enable managed mode"; + LOG_WARN(warning); + sendWarning(warning); + } + if (config.security.debug_log_api_enabled == c.payload_variant.security.debug_log_api_enabled && config.security.serial_enabled == c.payload_variant.security.serial_enabled) requiresReboot = false; diff --git a/variants/tlora_v3_3_0_tcxo/platformio.ini b/variants/tlora_v3_3_0_tcxo/platformio.ini index 4066d64b0..8d060a087 100644 --- a/variants/tlora_v3_3_0_tcxo/platformio.ini +++ b/variants/tlora_v3_3_0_tcxo/platformio.ini @@ -1,7 +1,6 @@ [env:tlora-v3-3-0-tcxo] extends = esp32_base board = ttgo-lora32-v21 -board_level = extra build_flags = ${esp32_base.build_flags} -D TLORA_V2_1_16