mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-19 16:29:31 +00:00
Compare commits
2 Commits
55347cc92d
...
bfc5a18f0c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bfc5a18f0c | ||
![]() |
71a989a44c |
@ -2,7 +2,7 @@
|
|||||||
[rp2040_base]
|
[rp2040_base]
|
||||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#a606be683748c73e9a0d46baf70163478d298f0f ; For arduino-pico 4.2.0
|
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#a606be683748c73e9a0d46baf70163478d298f0f ; For arduino-pico 4.2.0
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#5a428647d4cf842fc38208e8e58365e98301151e ; 4.2.0+ with SimpleMDNS
|
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#4.2.1
|
||||||
|
|
||||||
board_build.core = earlephilhower
|
board_build.core = earlephilhower
|
||||||
board_build.filesystem_size = 0.5m
|
board_build.filesystem_size = 0.5m
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
[rp2350_base]
|
[rp2350_base]
|
||||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#a606be683748c73e9a0d46baf70163478d298f0f ; For arduino-pico 4.2.0
|
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#a606be683748c73e9a0d46baf70163478d298f0f ; For arduino-pico 4.2.0
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#5a428647d4cf842fc38208e8e58365e98301151e ; 4.2.0+ with SimpleMDNS
|
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#4.2.1
|
||||||
|
|
||||||
board_build.core = earlephilhower
|
board_build.core = earlephilhower
|
||||||
board_build.filesystem_size = 0.5m
|
board_build.filesystem_size = 0.5m
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <ESPmDNS.h>
|
#include <ESPmDNS.h>
|
||||||
#include <esp_wifi.h>
|
#include <esp_wifi.h>
|
||||||
static void WiFiEvent(WiFiEvent_t event);
|
static void WiFiEvent(WiFiEvent_t event);
|
||||||
#else // ARCH_RP2040
|
#elif defined(ARCH_RP2040)
|
||||||
#include <SimpleMDNS.h>
|
#include <SimpleMDNS.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ static void onNetworkConnected()
|
|||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
MDNS.addService("http", "tcp", 80);
|
MDNS.addService("http", "tcp", 80);
|
||||||
MDNS.addService("https", "tcp", 443);
|
MDNS.addService("https", "tcp", 443);
|
||||||
#else
|
#elif defined(ARCH_RP2040)
|
||||||
// ARCH_RP2040 does not support HTTPS, create a "meshtastic" service
|
// ARCH_RP2040 does not support HTTPS, create a "meshtastic" service
|
||||||
MDNS.addService("meshtastic", "tcp", 4403);
|
MDNS.addService("meshtastic", "tcp", 4403);
|
||||||
// ESP32 handles this in WiFiEvent
|
// ESP32 handles this in WiFiEvent
|
||||||
@ -133,7 +133,7 @@ static int32_t reconnectWiFi()
|
|||||||
// Make sure we clear old connection credentials
|
// Make sure we clear old connection credentials
|
||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
WiFi.disconnect(false, true);
|
WiFi.disconnect(false, true);
|
||||||
#else
|
#elif defined(ARCH_RP2040)
|
||||||
WiFi.disconnect(false);
|
WiFi.disconnect(false);
|
||||||
#endif
|
#endif
|
||||||
LOG_INFO("Reconnecting to WiFi access point %s", wifiName);
|
LOG_INFO("Reconnecting to WiFi access point %s", wifiName);
|
||||||
@ -197,7 +197,7 @@ void deinitWifi()
|
|||||||
if (isWifiAvailable()) {
|
if (isWifiAvailable()) {
|
||||||
#ifdef ARCH_ESP32
|
#ifdef ARCH_ESP32
|
||||||
WiFi.disconnect(true, false);
|
WiFi.disconnect(true, false);
|
||||||
#else
|
#elif defined(ARCH_RP2040)
|
||||||
WiFi.disconnect(true);
|
WiFi.disconnect(true);
|
||||||
#endif
|
#endif
|
||||||
WiFi.mode(WIFI_OFF);
|
WiFi.mode(WIFI_OFF);
|
||||||
@ -233,15 +233,15 @@ bool initWifi()
|
|||||||
|
|
||||||
if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC &&
|
if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC &&
|
||||||
config.network.ipv4_config.ip != 0) {
|
config.network.ipv4_config.ip != 0) {
|
||||||
#ifndef ARCH_RP2040
|
#ifdef ARCH_ESP32
|
||||||
WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.gateway, config.network.ipv4_config.subnet,
|
WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.gateway, config.network.ipv4_config.subnet,
|
||||||
config.network.ipv4_config.dns);
|
config.network.ipv4_config.dns);
|
||||||
#else
|
#elif defined(ARCH_RP2040)
|
||||||
WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.gateway,
|
WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.gateway,
|
||||||
config.network.ipv4_config.subnet);
|
config.network.ipv4_config.subnet);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifndef ARCH_RP2040
|
#ifdef ARCH_ESP32
|
||||||
WiFi.onEvent(WiFiEvent);
|
WiFi.onEvent(WiFiEvent);
|
||||||
WiFi.setAutoReconnect(true);
|
WiFi.setAutoReconnect(true);
|
||||||
WiFi.setSleep(false);
|
WiFi.setSleep(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user