Can't configure wifi on Photon

My photon is failing out of the blue. I have re-flashed it, cleared the settings, doctored it and everything else I can think of. It fails by going into the red single flash followed by the SOS pattern as soon as it tries to configure the device’s wifi settings. It looks fine on inspect:

lolibook:code lolife$ particle serial inspect
Platform: 6 - Photon
Modules
  Bootloader module #0 - version 11, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 108, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 108, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 108
  User module #1 - version 2, main location, 131072 bytes max size
    UUID: 2BA4E71E840F596B812003882AAE7CA6496F1590CA4A049310AF76EAF11C943A
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 1
  empty - factory location, 131072 bytes max size
indent preformatted text by 4 spaces

Here is the failure:

lolibook:code lolife$ particle serial wifi
? Should I scan for nearby Wi-Fi networks? Yes
? Select the Wi-Fi network with which you wish to connect your device: knetX
? Should I try to auto-detect the wireless security type? Yes
> Detected WPA2(PSK/AES/AES) security
Attempting to configure Wi-Fi on /dev/cu.usbmodem1411
! Something went wrong: Serial timed out

The red flashing starts coincident with the last line. The device doctor ends with the error “undefined”. (Very helpful.)

lolibook:code lolife$ particle doctor
The Device Doctor will put your device back into a healthy state
It will:
  - Upgrade system firmware
  - Flash the default Tinker app
  - Reset the device and server keys
  - Clear the Wi-Fi settings

The Doctor will operate on your Photon connected over USB
You'll be asked to put your device in DFU mode several times to reset different settings.

Updating system firmware

Put the device in DFU mode
Tap RESET/RST while holding MODE/SETUP until the device blinks yellow.
? Select Continue when ready Continue

> Your device is ready for a system update.
> This process should take about 30 seconds. Here it goes!

! System firmware update successfully completed!

> Your device should now restart automatically.


Flashing the Device Doctor app

This app allows changing more settings on your device

Put the device in DFU mode
Tap RESET/RST while holding MODE/SETUP until the device blinks yellow.
? Select Continue when ready Continue

Flash success!

Select antenna

? Select the antenna to use to connect to Wi-Fi Internal
Switched antenna to Internal


Configure IP address

? Select how the device will be assigned an IP address Dynamic IP
Switched to dynamic IP


Reset Wi-Fi hotspot name in listening mode

? Select Continue when ready Continue
Switched SoftAP prefix to default


Clear all data in EEPROM storage

? Select Continue when ready Continue
Cleared EEPROM data


Clearing and setting up Wi-Fi settings

? Select Continue when ready Continue
Cleared Wi-Fi credentials

Entering listen mode

? Should I scan for nearby Wi-Fi networks? Yes
? Select the Wi-Fi network with which you wish to connect your device: knetX
? Should I try to auto-detect the wireless security type? Yes
> Detected WPA2(PSK/AES/AES) security
Attempting to configure Wi-Fi on /dev/cu.usbmodem1411
! Something went wrong: Serial timed out
The Doctor didn't complete sucesfully. undefined

Help?

Thank you!
M.

Have you had a look at this topic, regarding WPA?

“Detected WPA2(PSK/AES/AES) security” is just WPA2 personal. If it were detecting a enterprise network you’d see some different options like PEAP/MSCHAP and TLS-EAP.[quote=“lolife, post:1, topic:37110”]
lolibook:code lolife$ particle serial wifi
? Should I scan for nearby Wi-Fi networks? Yes
? Select the Wi-Fi network with which you wish to connect your device: knetX
? Should I try to auto-detect the wireless security type? Yes
> Detected WPA2(PSK/AES/AES) security
Attempting to configure Wi-Fi on /dev/cu.usbmodem1411
! Something went wrong: Serial timed out
[/quote]

This could happen if the code is using the Serial output for something. Try reflashing tinker via DFU first.

particle flash --usb tinker

1 Like

Hi,
I’m getting exactly this issue but on a P1 module.

Basically the red light triggers as soon as you select WPA2 (via either auto detect or manual).

…my best guess (based on how the softap setup is chained together) is that the key exchange is failing / overflow.

This is on a network that hundreds of Particles have been setup on. ‘smartfire’ is the network SSID so no special chars, and two plain words no spaces as the basic password.

I’d welcome some input because I have a customers’ device sitting on the logistics table and no spares (we’re sold out) so he won’t be able to bbq till either this Particle firmware problem is fixed or I get more stock in and send him a replacement because of this Particle firmware problem.

By the way, unless you’re a jedi we’d all have seen the red flash reset before when accidentally coding a buffer overflow on an incorrectly sized variable.