feat: add mqtt client version to repeater app and cli

This commit is contained in:
Jared Dohrman
2026-04-22 13:29:03 +10:00
parent b1a32fa56b
commit 46f0496865
8 changed files with 66 additions and 25 deletions
+11 -2
View File
@@ -12,7 +12,11 @@
bool ESP32Board::startOTAUpdate(const char* id, char reply[]) {
inhibit_sleep = true; // prevent sleep during OTA
WiFi.softAP("MeshCore-OTA", NULL);
WiFi.mode(WIFI_AP_STA);
if (!WiFi.softAP("MeshCore-OTA", NULL)) {
strcpy(reply, "Error - OTA AP start failed");
return false;
}
sprintf(reply, "Started: http://%s/update", WiFi.softAPIP().toString().c_str());
MESH_DEBUG_PRINTLN("startOTAUpdate: %s", reply);
@@ -22,7 +26,12 @@ bool ESP32Board::startOTAUpdate(const char* id, char reply[]) {
static char home_buf[90];
sprintf(home_buf, "<H2>Hi! I am a MeshCore Repeater. ID: %s</H2>", id);
AsyncWebServer* server = new AsyncWebServer(80);
static AsyncWebServer* server = nullptr;
if (server != nullptr) {
delete server;
server = nullptr;
}
server = new AsyncWebServer(80);
server->on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(200, "text/html", home_buf);