prusa3d / Prusa-ESP-Nic-FW

ESP8266 as generic network interface over UART
15 stars 10 forks source link

Fix frequent WiFi disconnections #7

Closed laloch closed 2 years ago

laloch commented 2 years ago

This fixes periodic Wi-Fi disconnects/reconnects caused by network inactivity. We still can't see beacon frames from some APs, but now we do periodic full-range background scans for neighboring APs. We first try to match the scan results with the BSSID of our associated AP. Some APs, however, provide wrong BSSID in their beacon/probe response frames, so we fall back to SSID matching in case the BSSID match fails. SSID matching can potentially yield false-positive results in mesh networks, but the author doesn't assume the printers to be moving frequently around the mesh , so this seems to be an acceptable trade-off.