From 5efe0f1afd87fbf9f6200549a78a604e49002d44 Mon Sep 17 00:00:00 2001 From: mesher-de Date: Mon, 26 Jan 2026 18:38:45 +0100 Subject: [PATCH] add 0-hop advert command --- src/helpers/CommonCLI.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/helpers/CommonCLI.cpp b/src/helpers/CommonCLI.cpp index 93baad5be..8d5fda28f 100644 --- a/src/helpers/CommonCLI.cpp +++ b/src/helpers/CommonCLI.cpp @@ -196,6 +196,9 @@ uint8_t CommonCLI::buildAdvertData(uint8_t node_type, uint8_t* app_data) { void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, char* reply) { if (memcmp(command, "reboot", 6) == 0) { _board->reboot(); // doesn't return + } else if (memcmp(command, "advert 0hop", 11) == 0 && (command[11] == 0 || command[11] == ' ')) { + _callbacks->sendSelfAdvertisement(1500, false); // longer delay, give CLI response time to be sent first + strcpy(reply, "OK - 0-hop advert sent"); } else if (memcmp(command, "advert", 6) == 0) { // send flood advert _callbacks->sendSelfAdvertisement(1500, true); // longer delay, give CLI response time to be sent first