Merge pull request #4429 from blazoncek/use-bssid

Add ability to enter desired BSSID
This commit is contained in:
Blaž Kristan
2025-02-19 13:46:49 +01:00
committed by GitHub
8 changed files with 263 additions and 170 deletions

View File

@@ -359,7 +359,7 @@ WLED_GLOBAL wifi_options_t wifiOpt _INIT_N(({0, 1, false, AP_BEHAVIOR_BOOT_NO_CO
#define noWifiSleep wifiOpt.noWifiSleep
#define force802_3g wifiOpt.force802_3g
#else
WLED_GLOBAL uint8_t selectedWiFi _INIT(0);
WLED_GLOBAL int8_t selectedWiFi _INIT(0);
WLED_GLOBAL byte apChannel _INIT(1); // 2.4GHz WiFi AP channel (1-13)
WLED_GLOBAL byte apHide _INIT(0); // hidden AP SSID
WLED_GLOBAL byte apBehavior _INIT(AP_BEHAVIOR_BOOT_NO_CONN); // access point opens when no connection after boot by default
@@ -377,9 +377,9 @@ WLED_GLOBAL uint8_t txPower _INIT(WIFI_POWER_8_5dBm);
WLED_GLOBAL uint8_t txPower _INIT(WIFI_POWER_19_5dBm);
#endif
#endif
#define WLED_WIFI_CONFIGURED (strlen(multiWiFi[0].clientSSID) >= 1 && strcmp(multiWiFi[0].clientSSID, DEFAULT_CLIENT_SSID) != 0)
#define WLED_WIFI_CONFIGURED isWiFiConfigured()
#ifdef WLED_USE_ETHERNET
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_ETHERNET)
#ifdef WLED_ETH_DEFAULT // default ethernet board type if specified
WLED_GLOBAL int ethernetType _INIT(WLED_ETH_DEFAULT); // ethernet board type
#else
@@ -582,6 +582,7 @@ WLED_GLOBAL uint16_t userVar0 _INIT(0), userVar1 _INIT(0); //available for use i
// internal global variable declarations
// wifi
WLED_GLOBAL bool apActive _INIT(false);
WLED_GLOBAL byte apClients _INIT(0);
WLED_GLOBAL bool forceReconnect _INIT(false);
WLED_GLOBAL unsigned long lastReconnectAttempt _INIT(0);
WLED_GLOBAL bool interfacesInited _INIT(false);
@@ -1049,11 +1050,9 @@ public:
void beginStrip();
void handleConnection();
bool initEthernet(); // result is informational
void initAP(bool resetAP = false);
void initConnection();
void initInterfaces();
int8_t findWiFi(bool doScan = false);
#if defined(STATUSLED)
void handleStatusLED();
#endif