mDNS: Advertise pio_env (for OTA scripts) (#8298)

This commit is contained in:
Austin 2025-10-11 11:30:47 -04:00 committed by GitHub
parent fe2e2753aa
commit cafb007ec4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,10 +95,12 @@ static void onNetworkConnected()
#ifdef ARCH_ESP32
MDNS.addServiceTxt("meshtastic", "tcp", "shortname", String(owner.short_name));
MDNS.addServiceTxt("meshtastic", "tcp", "id", String(nodeDB->getNodeId().c_str()));
MDNS.addServiceTxt("meshtastic", "tcp", "pio_env", optstr(APP_ENV));
// ESP32 prints obtained IP address in WiFiEvent
#elif defined(ARCH_RP2040)
MDNS.addServiceTxt("meshtastic", "shortname", owner.short_name);
MDNS.addServiceTxt("meshtastic", "id", nodeDB->getNodeId().c_str());
MDNS.addServiceTxt("meshtastic", "pio_env", optstr(APP_ENV));
LOG_INFO("Obtained IP address: %s", WiFi.localIP().toString().c_str());
#endif
}