Photon fails to connect to wifi, OpenWrt logs offer few clues

I’ve fielded several Photons over the last few years, but with my latest I’m struggling. It’s very difficult (and sometimes impossible) to get it to connect over wifi, and when it does, it often drops off later. Here’s what I know:

  • Doesn’t seem to matter what OS version is loaded. I’ve tried several builds ranging from stock (0.5.something) to latest (1.5.4-rc1).
  • When doing setup over USB, scanning networks does not show mine (it’s not hidden). But if I manually type in the SSID and key, it’ll attempt to connect.
  • Serial console shows it trying to connect, attempting to get a DHCP address, and then rebooting and doing it again.
  • The OpenWrt logs show repeated failures of the form:
Tue Jul 21 12:11:24 2020 daemon.info hostapd: wlan0-1: STA 6c:0b:84:59:7f:79 IEEE 802.11: authenticated
Tue Jul 21 12:11:24 2020 daemon.info hostapd: wlan0-1: STA 6c:0b:84:59:7f:79 IEEE 802.11: associated (aid 1)
Tue Jul 21 12:11:24 2020 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED 6c:0b:84:59:7f:79
Tue Jul 21 12:11:24 2020 daemon.info hostapd: wlan0-1: STA 6c:0b:84:59:7f:79 RADIUS: starting accounting session 0806D3328A533020
Tue Jul 21 12:11:24 2020 daemon.info hostapd: wlan0-1: STA 6c:0b:84:59:7f:79 WPA: pairwise key handshake completed (RSN)
Tue Jul 21 12:11:39 2020 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED 6c:0b:84:59:7f:79
Tue Jul 21 12:11:39 2020 daemon.info hostapd: wlan0-1: STA 6c:0b:84:59:7f:79 IEEE 802.11: disassociated
Tue Jul 21 12:11:40 2020 daemon.info hostapd: wlan0-1: STA 6c:0b:84:59:7f:79 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)

But it does connect to my phone when in hotspot mode. So it leads me to think that there’s some magical wifi setting that is causing problems on the OpenWrt router. Does anybody have any leads that I can go chase?

Thanks!

I’ve tried fussing with a lot of settings to no avail. Here’s what doesn’t seem to matter:

  • 20 MHz vs 40 MHz channel width
  • 802.11r on/off
  • 802.11n vs “legacy” radio setting
  • WPA-PSK vs WPA2-PSK

Now I’m starting to wonder if there’s some weird incompatibility between the DHCP server (running on a Netgear LB1121) and the Photon’s software.

Are there maybe some limitations in the Photon’s DHCP client implementation? I’m far away from a definite conclusion, but sending options (e.g., specifying gateway via option “3,192.168.0.1”) seems to break it.

Taking the device back to the main house and using a very-similar wifi setup works perfectly. So while I’m starting to have a clearer picture about its sensitivities, I’m also starting to run out of threads to pull to figure out what exactly is causing the trouble.

Both working and not-working setups are running OpenWrt 19.07.3. One of them is a router (works) and one of them is merely a DHCP server (doesn’t work). The LB1121 as a router and DHCP server also did not work, but a Zyxel C3000Z works fine. Baffling.