mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-10-25 03:53:18 +00:00
Keep Mini Repeater within flash after channel-busy fix
This commit is contained in:
1 parent
adb11e7b41
commit
302e441e2b
2 files changed
+20
No files matched your search
@@ -12126,7 +12126,11 @@ bool MyMesh::handleReplayResetCommand(ClientInfo* sender, const char* command,
|
||||
|| (clock_sync_last_result >= CLOCK_SYNC_RESULT_WITHIN_DRIFT
|
||||
&& clock_sync_last_result <= CLOCK_SYNC_RESULT_CORRECTED_BACKWARD);
|
||||
if (!clock_observed || !clockSyncEpochIsValid(now)) {
|
||||
#if defined(STM32_PLATFORM) && defined(WIO_E5_MINI_NO_EXTERNAL_SENSORS)
|
||||
strcpy(reply, "Err - verify/sync clock before replay reset");
|
||||
#else
|
||||
strcpy(reply, "Err - set/sync and verify the repeater clock before replay recovery");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -12138,7 +12142,11 @@ bool MyMesh::handleReplayResetCommand(ClientInfo* sender, const char* command,
|
||||
const auto issued = replay_reset_nonce.issue(
|
||||
sender->id.pub_key, request.key, random_token, now_ms, now);
|
||||
if (issued == mesh::ReplayResetNonce::IssueResult::Busy) {
|
||||
#if defined(STM32_PLATFORM) && defined(WIO_E5_MINI_NO_EXTERNAL_SENSORS)
|
||||
strcpy(reply, "Err - replay confirmation pending (up to 300s)");
|
||||
#else
|
||||
strcpy(reply, "Err - another replay confirmation is pending (up to 300 seconds)");
|
||||
#endif
|
||||
} else if (issued == mesh::ReplayResetNonce::IssueResult::AwaitingConfirmation) {
|
||||
snprintf(reply, 156, "Err - token is confirmation-only; use earlier reply or wait %lus for expiry",
|
||||
(unsigned long)replay_reset_nonce.remainingSeconds(now_ms, now));
|
||||
@@ -12160,7 +12168,11 @@ bool MyMesh::handleReplayResetCommand(ClientInfo* sender, const char* command,
|
||||
// or growing nonce history is necessary.
|
||||
if (!replay_reset_nonce.consume(sender->id.pub_key, request.key,
|
||||
request.token, now_ms, now)) {
|
||||
#if defined(STM32_PLATFORM) && defined(WIO_E5_MINI_NO_EXTERNAL_SENSORS)
|
||||
strcpy(reply, "Err - token expired/used or clock changed; reset again");
|
||||
#else
|
||||
strcpy(reply, "Err - expired/used replay token or clock changed; request a new reset");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
} else if (kind == mesh::ReplayResetKind::ExactKeyConfirm) {
|
||||
|
||||
@@ -3749,7 +3749,11 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, char* command, char* re
|
||||
}
|
||||
#else
|
||||
} else if (memcmp(command, "ota", 3) == 0 && (command[3] == 0 || command[3] == ' ')) {
|
||||
#if defined(STM32_PLATFORM) && defined(WIO_E5_MINI_NO_EXTERNAL_SENSORS)
|
||||
strcpy(reply, "LoRa OTA absent; tempradio cannot enable it. Install OTA repeater firmware");
|
||||
#else
|
||||
strcpy(reply, "LoRa OTA is not included in this build; tempradio cannot enable it. Use an OTA-enabled repeater firmware");
|
||||
#endif
|
||||
#endif
|
||||
} else if (strcmp(command, "power") == 0) {
|
||||
const char* usb_state = _board->hasUsbPowerDetect()
|
||||
@@ -5349,7 +5353,11 @@ void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* rep
|
||||
_prefs->flood_retry_bridge_enabled = 1;
|
||||
savePrefs();
|
||||
if (!formatFloodRetryBucketCollisionWarning(reply, _prefs, "OK - bucket 7=prefixes; ")) {
|
||||
#if defined(STM32_PLATFORM) && defined(WIO_E5_MINI_NO_EXTERNAL_SENSORS)
|
||||
strcpy(reply, "OK - bucket 7 (other)=flood.retry.prefixes; multi-try bridge on");
|
||||
#else
|
||||
strcpy(reply, "OK - flood.retry.prefixes acts as bucket 7 (other); multi-try bridge routing enabled");
|
||||
#endif
|
||||
}
|
||||
} else if (strcmp(&config[19], "off") == 0) {
|
||||
_prefs->flood_retry_bridge_enabled = 0;
|
||||
|
||||
Reference in new issue
Block a user