Merge pull request #7744 from meshtastic/master
Some checks are pending
CI / setup (check) (push) Waiting to run
CI / setup (esp32) (push) Waiting to run
CI / setup (esp32c3) (push) Waiting to run
CI / setup (esp32c6) (push) Waiting to run
CI / setup (esp32s3) (push) Waiting to run
CI / setup (nrf52840) (push) Waiting to run
CI / setup (rp2040) (push) Waiting to run
CI / setup (rp2350) (push) Waiting to run
CI / setup (stm32) (push) Waiting to run
CI / version (push) Waiting to run
CI / check (push) Blocked by required conditions
CI / build-esp32 (push) Blocked by required conditions
CI / build-esp32s3 (push) Blocked by required conditions
CI / build-esp32c3 (push) Blocked by required conditions
CI / build-esp32c6 (push) Blocked by required conditions
CI / build-nrf52840 (push) Blocked by required conditions
CI / build-rp2040 (push) Blocked by required conditions
CI / build-rp2350 (push) Blocked by required conditions
CI / build-stm32 (push) Blocked by required conditions
CI / build-debian-src (push) Waiting to run
CI / package-pio-deps-native-tft (push) Waiting to run
CI / test-native (push) Waiting to run
CI / docker-deb-amd64 (push) Waiting to run
CI / docker-deb-amd64-tft (push) Waiting to run
CI / docker-alp-amd64 (push) Waiting to run
CI / docker-alp-amd64-tft (push) Waiting to run
CI / docker-deb-arm64 (push) Waiting to run
CI / docker-deb-armv7 (push) Waiting to run
CI / gather-artifacts (esp32) (push) Blocked by required conditions
CI / gather-artifacts (esp32c3) (push) Blocked by required conditions
CI / gather-artifacts (esp32c6) (push) Blocked by required conditions
CI / gather-artifacts (esp32s3) (push) Blocked by required conditions
CI / gather-artifacts (nrf52840) (push) Blocked by required conditions
CI / gather-artifacts (rp2040) (push) Blocked by required conditions
CI / gather-artifacts (rp2350) (push) Blocked by required conditions
CI / gather-artifacts (stm32) (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
CI / release-firmware (esp32) (push) Blocked by required conditions
CI / release-firmware (esp32c3) (push) Blocked by required conditions
CI / release-firmware (esp32c6) (push) Blocked by required conditions
CI / release-firmware (esp32s3) (push) Blocked by required conditions
CI / release-firmware (nrf52840) (push) Blocked by required conditions
CI / release-firmware (rp2040) (push) Blocked by required conditions
CI / release-firmware (rp2350) (push) Blocked by required conditions
CI / release-firmware (stm32) (push) Blocked by required conditions
CI / publish-firmware (push) Blocked by required conditions

Backmerge to develop
This commit is contained in:
Ben Meadors 2025-08-25 06:58:05 -05:00 committed by GitHub
commit f2ba7d7851
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 56 additions and 3 deletions

View File

@ -406,6 +406,16 @@ void setup()
initDeepSleep(); initDeepSleep();
#if defined(MODEM_POWER_EN)
pinMode(MODEM_POWER_EN, OUTPUT);
digitalWrite(MODEM_POWER_EN, LOW);
#endif
#if defined(MODEM_PWRKEY)
pinMode(MODEM_PWRKEY, OUTPUT);
digitalWrite(MODEM_PWRKEY, LOW);
#endif
#if defined(LORA_TCXO_GPIO) #if defined(LORA_TCXO_GPIO)
pinMode(LORA_TCXO_GPIO, OUTPUT); pinMode(LORA_TCXO_GPIO, OUTPUT);
digitalWrite(LORA_TCXO_GPIO, HIGH); digitalWrite(LORA_TCXO_GPIO, HIGH);

View File

@ -529,8 +529,9 @@ meshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p)
#endif #endif
// Don't use PKC with Ham mode // Don't use PKC with Ham mode
!owner.is_licensed && !owner.is_licensed &&
// Don't use PKC if it's not explicitly requested and a non-primary channel is requested // Don't use PKC on 'serial' or 'gpio' channels unless explicitly requested
!(p->pki_encrypted != true && p->channel > 0) && !(p->pki_encrypted != true && (strcasecmp(channels.getName(chIndex), Channels::serialChannel) == 0 ||
strcasecmp(channels.getName(chIndex), Channels::gpioChannel) == 0)) &&
// Check for valid keys and single node destination // Check for valid keys and single node destination
config.security.private_key.size == 32 && !isBroadcast(p->to) && node != nullptr && config.security.private_key.size == 32 && !isBroadcast(p->to) && node != nullptr &&
// Check for a known public key for the destination // Check for a known public key for the destination

View File

@ -505,7 +505,9 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
if (mp.decoded.want_response && !myReply) { if (mp.decoded.want_response && !myReply) {
myReply = allocErrorResponse(meshtastic_Routing_Error_NONE, &mp); myReply = allocErrorResponse(meshtastic_Routing_Error_NONE, &mp);
} }
if (mp.pki_encrypted) {
myReply->pki_encrypted = true;
}
return handled; return handled;
} }
@ -718,6 +720,13 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
requiresReboot = false; requiresReboot = false;
} }
#if defined(ARCH_PORTDUINO)
// If running on portduino and using SimRadio, do not require reboot
if (SimRadio::instance) {
requiresReboot = false;
}
#endif
#ifdef RF95_FAN_EN #ifdef RF95_FAN_EN
// Turn PA off if disabled by config // Turn PA off if disabled by config
if (c.payload_variant.lora.pa_fan_disabled) { if (c.payload_variant.lora.pa_fan_disabled) {
@ -934,6 +943,9 @@ void AdminModule::handleGetOwner(const meshtastic_MeshPacket &req)
res.which_payload_variant = meshtastic_AdminMessage_get_owner_response_tag; res.which_payload_variant = meshtastic_AdminMessage_get_owner_response_tag;
setPassKey(&res); setPassKey(&res);
myReply = allocDataProtobuf(res); myReply = allocDataProtobuf(res);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
} }
@ -1005,6 +1017,9 @@ void AdminModule::handleGetConfig(const meshtastic_MeshPacket &req, const uint32
res.which_payload_variant = meshtastic_AdminMessage_get_config_response_tag; res.which_payload_variant = meshtastic_AdminMessage_get_config_response_tag;
setPassKey(&res); setPassKey(&res);
myReply = allocDataProtobuf(res); myReply = allocDataProtobuf(res);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
} }
@ -1092,6 +1107,9 @@ void AdminModule::handleGetModuleConfig(const meshtastic_MeshPacket &req, const
res.which_payload_variant = meshtastic_AdminMessage_get_module_config_response_tag; res.which_payload_variant = meshtastic_AdminMessage_get_module_config_response_tag;
setPassKey(&res); setPassKey(&res);
myReply = allocDataProtobuf(res); myReply = allocDataProtobuf(res);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
} }
@ -1116,6 +1134,9 @@ void AdminModule::handleGetNodeRemoteHardwarePins(const meshtastic_MeshPacket &r
} }
setPassKey(&r); setPassKey(&r);
myReply = allocDataProtobuf(r); myReply = allocDataProtobuf(r);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
void AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req) void AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req)
@ -1125,6 +1146,9 @@ void AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req)
r.which_payload_variant = meshtastic_AdminMessage_get_device_metadata_response_tag; r.which_payload_variant = meshtastic_AdminMessage_get_device_metadata_response_tag;
setPassKey(&r); setPassKey(&r);
myReply = allocDataProtobuf(r); myReply = allocDataProtobuf(r);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &req) void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &req)
@ -1193,6 +1217,9 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
r.which_payload_variant = meshtastic_AdminMessage_get_device_connection_status_response_tag; r.which_payload_variant = meshtastic_AdminMessage_get_device_connection_status_response_tag;
setPassKey(&r); setPassKey(&r);
myReply = allocDataProtobuf(r); myReply = allocDataProtobuf(r);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
void AdminModule::handleGetChannel(const meshtastic_MeshPacket &req, uint32_t channelIndex) void AdminModule::handleGetChannel(const meshtastic_MeshPacket &req, uint32_t channelIndex)
@ -1204,6 +1231,9 @@ void AdminModule::handleGetChannel(const meshtastic_MeshPacket &req, uint32_t ch
r.which_payload_variant = meshtastic_AdminMessage_get_channel_response_tag; r.which_payload_variant = meshtastic_AdminMessage_get_channel_response_tag;
setPassKey(&r); setPassKey(&r);
myReply = allocDataProtobuf(r); myReply = allocDataProtobuf(r);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
} }
@ -1213,6 +1243,9 @@ void AdminModule::handleGetDeviceUIConfig(const meshtastic_MeshPacket &req)
r.which_payload_variant = meshtastic_AdminMessage_get_ui_config_response_tag; r.which_payload_variant = meshtastic_AdminMessage_get_ui_config_response_tag;
r.get_ui_config_response = uiconfig; r.get_ui_config_response = uiconfig;
myReply = allocDataProtobuf(r); myReply = allocDataProtobuf(r);
if (req.pki_encrypted) {
myReply->pki_encrypted = true;
}
} }
void AdminModule::reboot(int32_t seconds) void AdminModule::reboot(int32_t seconds)

View File

@ -92,3 +92,12 @@
#define SX126X_DIO3_TCXO_VOLTAGE 2.4 #define SX126X_DIO3_TCXO_VOLTAGE 2.4
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface // Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
// code) // code)
#define MODEM_POWER_EN 41
#define MODEM_PWRKEY 40
#define MODEM_RST 9
#define MODEM_RI 7
#define MODEM_DTR 8
#define MODEM_RX 10
#define MODEM_TX 11