WiFi credentials lost after flashing new user firmware (photon)

One more piece of information here, to rule out any hardware (or other) problems with my Photons, I just set up a wireless hotspot on my iPhone and configured my Photon to connect to that instead of my Linksys E3000.

When connected to my iPhone instead of my router, everything works fine. I flashed to 0.4.2 (and even did a fresh build/flash from the develop branch and everything works great.

This definitely points to a compatibility/configuration issue between my Photons and router.

1 Like

Hi Everyone,

I hope we nail this one soon! Iā€™ve made a small fix to the WICED library in the develop branch that I hope fixes this issue.
Anyone that has time to test, please do so and let me know!

Cheers,
mat.

Thanks Mat, just tried the latest commit, but no luck in my case Iā€™m afraid!

Iā€™m building the exact same way as before:

$ git checkout develop
$ git pull
$ rm -rf build/target
$ cd modules
$ make PLATFORM_ID=6 all program-dfu COMPILE_LTO=n

Aw, pity Thanks so much for trying!

Iā€™m happy to dive deeper if you like, just let me know if you have any other theories youā€™d like to investigate, or any debugging data you need.

1 Like

So, combined firmware works, but separate doesnā€™t. Very strange, since the combined firmware is just the two separate parts concatenated together.

Iā€™ll add this to the makefile (combined build) so we can try that.

If you good people have chance to try different wifi settings, e.g fix the mode to a/b/g/n that will eliminate potential causes.

Tried the following wifi settings on my router:

  • B-only mode (2.4ghz)
  • G-only mode (2.4ghz)
  • N-only mode (2.4ghz)
  • N-only mode (5ghz)

In all cases I disabled the second radio (eg. when testing 2.4ghz I disabled the 5ghz radio, and vice-versa).

Making these changes has no effect on the problem.

1 Like

Another thing to try when you get the chance - you mentioned that flashing with system_pad_BM-09.bin works, how about when flashing system-part1, and system-part2 as separate files?

Flashing system-part1.bin and system-part2.bin from the v0.4.1 release seems to work fine.

1 Like

Great. I would hope so since itā€™s really the same code!

Iā€™m still really puzzled why building 0.4.0 (and earlier) from develop has the bug, but the images I built donā€™t have it.

Ok, some more stuff to try! :smile:

Thereā€™s a branch feature/wifi-connect-dhcp, where Iā€™ve enabled debug output from WICED. Please try that branch and PM met the debug logs that are printed.

Thanks!

Iā€™ve added even more debug output, specifically for DHCP. Anyone that runs this, please PM me the serial output up to DHCP Failed!

Thanks! :smile:

@loopj has been helping out immensely with tracking down this bug. (TL;DR - I canā€™t reproduce the issue so am relying heavily on people that have the problem.)

If you have the flashing green LED after updating to 0.4.2 or later and are familiar with the local toolchain, please consider trying the latest fixes!

To get the latest fixes:

  • checkout branch feature/wifi-connect-dhcp
  • delete the build/target folder
  • put the photon in DFU mode
  • run make PLATFORM_ID=6 all program-dfu COMPILE_LTO=n

And then report back here with the result - whether WiFi connected or not.

Cheers,
mat.

WLAN disconnected
**WLAN connect with DHCP volatile fixWLAN connected
Obtaining IP address via DHCP
DHCP got address...retrieving!
DHCP IP Address assigned
Network ready IP: 172.20.10.11
WLAN DHCP success
WLAN connection result 0

The photon is blinking cyan. After a reset:

Initialising LwIP v1.4.0
EW!

DHCP got address...retrieving!
DHCP IP Address assigned
Network ready IP: 172.20.10.11
WLAN DHCP success
WLAN connection result 0

Thanks. Did it blink endlessly green for you before the fix? For example, if you check out the develop branch, can you connect to WiFI?

Sort of. I never fully tested on 0.4.2 as it always had the blinking green issue that i did not want to debug further.

Can you please checkout the latest develop and flash that. If that flashes endlessly green for you then we have a fix! :smile:

Will do. But it keeps blinking cyan now still some issue i guess.

Yes, there may be other network issues since I hacked an upgrade of the LwIP stack. My focus now is on WiFi connectivity - any other issues Iā€™ll look at once we have a confirmed fix.

Using the develop branch, it blinks green and does not connect to my mobile hotspot. Will leave it running for a while and see if anything happens.

Update: it jumped to blinking blue somehow

1 Like