Make AP more friendly in congested WiFi situations

This commit is contained in:
Thomas Kolb 2023-08-14 23:32:31 +02:00
parent ecfc78c48a
commit 3ac26d35d2

View file

@ -6,6 +6,8 @@
#include <WiFiMulti.h> #include <WiFiMulti.h>
#include <SPIFFS.h> #include <SPIFFS.h>
#include <esp_wifi.h>
#include <freertos/FreeRTOS.h> #include <freertos/FreeRTOS.h>
#include <freertos/semphr.h> #include <freertos/semphr.h>
@ -383,6 +385,10 @@ void wifi_setup(void)
WiFi.mode(WIFI_AP); WiFi.mode(WIFI_AP);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
WiFi.softAP("🕯️💡☀️", "Licht234"); WiFi.softAP("🕯️💡☀️", "Licht234");
WiFi.setTxPower(WIFI_POWER_2dBm);
esp_wifi_set_bandwidth(WIFI_IF_AP, WIFI_BW_HT20);
esp_wifi_config_11b_rate(WIFI_IF_AP, true);
esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_11N);
WiFi.enableAP(true); WiFi.enableAP(true);
animController.changeAnimation(std::unique_ptr<Animation>(new ConnectionEstablishedAnimation(&ledFader, false))); animController.changeAnimation(std::unique_ptr<Animation>(new ConnectionEstablishedAnimation(&ledFader, false)));