[Solved] Shelly EM won't connect to WiFi

Issues connecting
The Shelly AP would drop off frequently with no reason
Tried several resets
Disabled a setting in the UI - something to do with reset on loss of wifi

After quickly inputting my 2.4GHz WiFi details the Shelly connected once, then dropped off after about 12 hours and never successfully connected again.

I had DAWN installed on my router and I tried removing it.
Logs
After uninstalling DAWN:
Thu Dec 28 15:19:17 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authenticated Thu Dec 28 15:21:17 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authenticated Thu Dec 28 15:21:17 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: associated (aid 4) Thu Dec 28 15:21:26 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated due to local deauth request Thu Dec 28 15:21:46 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authenticated Thu Dec 28 15:21:46 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: associated (aid 4) Thu Dec 28 15:21:56 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated due to local deauth request Thu Dec 28 15:22:17 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authenticated
Troubleshooting attemps
Changed DAWN minimum badwidth to 6, this changed log output but the the effect
Uninstalled DAWN, again, this changed log output but not effect
Changed wifi settings to a simple minimum: image.png
Started to see some different log outputs:
Thu Dec 28 15:26:17 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 15:27:17 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 15:27:27 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: disassociated Thu Dec 28 15:27:28 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE) Thu Dec 28 15:27:47 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response
Tried configuring unicast: as per documentation
Increased hostapd log to 1
root@GL-B1300:/# uci set wireless.radio0.log_level=1 root@GL-B1300:/# uci commit wireless root@GL-B1300:/# wifi up root@GL-B1300:/# grep _level ./tmp/run/hostapd-phy0.conf
Thu Dec 28 19:35:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:35:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:35:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:35:52 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 19:36:54 2023 daemon.notice hostapd: wlan1: EAPOL-4WAY-HS-COMPLETED 24:95:2f:de:a4:b9 Thu Dec 28 19:38:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated Thu Dec 28 19:38:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DEAUTHENTICATE.indication(34:94:54:77:f3:ab, 3) Thu Dec 28 19:38:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:41:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:41:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:41:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:41:52 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 19:43:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated Thu Dec 28 19:43:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DEAUTHENTICATE.indication(34:94:54:77:f3:ab, 3) Thu Dec 28 19:43:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:43:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:43:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:43:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:43:52 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 19:44:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:44:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:44:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:44:52 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authenticated Thu Dec 28 19:45:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated Thu Dec 28 19:45:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DEAUTHENTICATE.indication(34:94:54:77:f3:ab, 3) Thu Dec 28 19:45:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:45:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:45:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:45:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:45:52 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 19:46:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated Thu Dec 28 19:46:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DEAUTHENTICATE.indication(34:94:54:77:f3:ab, 3) Thu Dec 28 19:46:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:47:52 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: association OK (aid 5) Thu Dec 28 19:47:52 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: associated (aid 5) Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-ASSOCIATE.indication(34:94:54:77:f3:ab) Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: binding station to interface 'wlan0' Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: event 1 notification Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: start authentication Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.1X: unauthorizing port Thu Dec 28 19:47:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: sending 1/4 msg of 4-Way Handshake Thu Dec 28 19:47:53 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: EAPOL-Key timeout Thu Dec 28 19:47:53 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: sending 1/4 msg of 4-Way Handshake Thu Dec 28 19:47:53 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.1X: did not Ack EAPOL-Key frame (broadcast index=17) Thu Dec 28 19:47:54 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: EAPOL-Key timeout Thu Dec 28 19:47:54 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: sending 1/4 msg of 4-Way Handshake Thu Dec 28 19:47:55 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: EAPOL-Key timeout Thu Dec 28 19:47:55 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: sending 1/4 msg of 4-Way Handshake Thu Dec 28 19:47:55 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.1X: did not Ack EAPOL-Key frame (broadcast index=17) Thu Dec 28 19:47:56 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: EAPOL-Key timeout Thu Dec 28 19:47:56 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: PTKSTART: Retry limit 4 reached Thu Dec 28 19:47:56 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab WPA: event 3 notification Thu Dec 28 19:47:56 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.1X: unauthorizing port Thu Dec 28 19:47:56 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DEAUTHENTICATE.indication(34:94:54:77:f3:ab, 15) Thu Dec 28 19:47:56 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:48:01 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated due to local deauth request Thu Dec 28 19:48:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:48:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:48:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:48:52 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 19:49:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated Thu Dec 28 19:49:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DEAUTHENTICATE.indication(34:94:54:77:f3:ab, 3) Thu Dec 28 19:49:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:49:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:49:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:49:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:49:52 2023 daemon.notice hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: did not acknowledge authentication response Thu Dec 28 19:50:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: deauthenticated Thu Dec 28 19:50:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DEAUTHENTICATE.indication(34:94:54:77:f3:ab, 3) Thu Dec 28 19:50:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:52:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authentication OK (open system) Thu Dec 28 19:52:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-AUTHENTICATE.indication(34:94:54:77:f3:ab, OPEN_SYSTEM) Thu Dec 28 19:52:52 2023 daemon.debug hostapd: wlan0: STA 34:94:54:77:f3:ab MLME: MLME-DELETEKEYS.request(34:94:54:77:f3:ab) Thu Dec 28 19:52:52 2023 daemon.info hostapd: wlan0: STA 34:94:54:77:f3:ab IEEE 802.11: authenticated Cop

The fix was to change the WiFi security from WPA2-PSK/WPA3-SAE to WPA/WPA2-PSK.

The Shelly then happily connected. I could then update the Shelly firmware. I have yet to test the original security settings on the updated firmware

Edit: on further analysis, it started working before I did this, however, hopefully the firmware update will have improved stability.

You don’t want WPA (TKIP) active on your network. As it is RC4 based it should be considered broken. Also when choosing WPA2 don’t undermine your network security by choosing a TKIP encryption but stick to the default CCMP instead