mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-19 08:17:26 +00:00
SimpleMDNS begin
now returns a bool
This commit is contained in:
parent
94dd567186
commit
5931345340
@ -2,7 +2,7 @@
|
||||
[rp2040_base]
|
||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#a606be683748c73e9a0d46baf70163478d298f0f ; For arduino-pico 4.2.0
|
||||
extends = arduino_base
|
||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#f5c4136b941e87d679b82f15227319df63b1575c ; 4.2.0+ with SimpleMDNS
|
||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#5a428647d4cf842fc38208e8e58365e98301151e ; 4.2.0+ with SimpleMDNS
|
||||
|
||||
board_build.core = earlephilhower
|
||||
board_build.filesystem_size = 0.5m
|
||||
|
@ -2,7 +2,7 @@
|
||||
[rp2350_base]
|
||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#a606be683748c73e9a0d46baf70163478d298f0f ; For arduino-pico 4.2.0
|
||||
extends = arduino_base
|
||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#f5c4136b941e87d679b82f15227319df63b1575c ; 4.2.0+ with SimpleMDNS
|
||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#5a428647d4cf842fc38208e8e58365e98301151e ; 4.2.0+ with SimpleMDNS
|
||||
|
||||
board_build.core = earlephilhower
|
||||
board_build.filesystem_size = 0.5m
|
||||
|
@ -61,21 +61,21 @@ static void onNetworkConnected()
|
||||
// Start web server
|
||||
LOG_INFO("Start WiFi network services");
|
||||
|
||||
// start mdns
|
||||
#ifdef ARCH_ESP32
|
||||
// start mdns
|
||||
if (!MDNS.begin("Meshtastic")) {
|
||||
LOG_ERROR("Error setting up MDNS responder!");
|
||||
} else {
|
||||
LOG_INFO("mDNS Host: Meshtastic.local");
|
||||
#ifdef ARCH_ESP32
|
||||
MDNS.addService("http", "tcp", 80);
|
||||
MDNS.addService("https", "tcp", 443);
|
||||
}
|
||||
#else
|
||||
MDNS.begin("Meshtastic");
|
||||
// ARCH_RP2040 does not support HTTPS
|
||||
MDNS.addService("meshtastic", "tcp", 4403);
|
||||
LOG_INFO("Obtained IP address: %s", WiFi.localIP().toString().c_str());
|
||||
// ARCH_RP2040 does not support HTTPS, create a "meshtastic" service
|
||||
MDNS.addService("meshtastic", "tcp", 4403);
|
||||
// ESP32 handles this in WiFiEvent
|
||||
LOG_INFO("Obtained IP address: %s", WiFi.localIP().toString().c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef DISABLE_NTP
|
||||
LOG_INFO("Start NTP time client");
|
||||
@ -110,7 +110,7 @@ static void onNetworkConnected()
|
||||
APStartupComplete = true;
|
||||
}
|
||||
|
||||
// FIXME this is kinda yucky, instead we should just have an observable for 'wifireconnected'
|
||||
// FIXME this is kinda yucky, instead we should just have an observable for 'wifireconnected'
|
||||
#ifndef MESHTASTIC_EXCLUDE_MQTT
|
||||
if (mqtt)
|
||||
mqtt->reconnect();
|
||||
|
Loading…
Reference in New Issue
Block a user