[SOLVED] WiFi Reconnection Issue - Is there a solution?

Problem in short is that once a WiFi connection is dropped, eg by disabling and renabling your WiFi hotspot, the Photon does not reconnect again until one reboots the Photon. This is a real problem in the field!

This is very similar, if not one and the same, as the following issues:

@mhazley as described here [v0.4.8-rc1 / v0.4.9] WiFi Reconnection Issue and here Failures on handling WiFi reconnects ( v0.4.5 / v0.4.6 )

@ekarlso here Reconnection wifi issues 0.4.9

@rebelzach here Photon loses connection, reboot corrects the issue

@kennethlimcp here https://github.com/kennethlimcp/particle-examples/blob/master/wifi-auto-reconnect/wifi-auto-reconnect.ino

There are others reporting related issues.

Am running v0.5.3.rc, ie the latest public release.

Is there a recommended way to overcome this problem in application code?

Thanks!

Hey @UMD – that definitely sounds like an issue and is not the desired behavior. I’m going to cc @BDub into this conversation since he’s driving firmware fixes for us right now.

Have you already reached out to support about this? Have you found that you’re able to recreate this issue with a sample firmware and procedure (for instance, disabling and enabling a hotspot like you mentioned in your description)?

@will, looks like @rickkas7 has solved the issue:

As stated in the above ticket, I will fold the solution into my code to see if we can get a happy result there too.

Back soon!

@will - good news - refer to case closed as reported here:

All good.

1 Like

Fantastic! @rickkas7 is a very helpful guy so I’m not surprised :slight_smile:

1 Like

@UMD

Other than not being able to reconnect did you encounter any cases where the photon/p1 stopped responding completely?

@Div_IoT not sure what you mean by “not responding completely”. Do you mean an application crash or inability to received requests from Particle?

Application crash without the OS resetting the device. So the device is in this state where the LCD is on (nothing is happening), no request can be sent by the Particle, DAC, ADC are working. @UMD

@Div_IoT well, this is a completely different issue!

May I suggest that you open a new topic (something like “Application hanging” and tag me. Am happy to assist where I can.

1 Like