Photon SoftAP refuses connection or requires password

We’re running into an issue where brand-new out-of-the-box photons refuse to allow devices to connect to their SoftAP the second time we put them into setup mode. When joining their SoftAP network it either immediately drops the client device or asks for a wifi password.

Steps to reproduce:

  1. Open brand-new photon, connect to power, make sure it’s in wifi setup mode
  2. Using the iOS or Android Particle app, go through the SoftAP setup process to connect it to you wifi network (this works well)
  3. Put the Photon BACK into wifi setup mode and go through the wifi setup process again in the app (we’re using the same wifi network)
  4. At the step where you connect to the Photon’s SoftAP, the OS will ask for password (iOS) or the app will just hang and keep trying to connect (Android)
  5. If it doesn’t fail the 2nd time, it will frequently fail the 3rd time through

Any idea what’s causing this issue? It’s highly concerning to us since we’re using stock code from Particle (no user firmware installed yet) and we essentially end up with devices that we cannot reconnect to the network no matter how many times we reset them.

@HardWater @KyleO

1 Like

@jonlogan @mdma Hey this is a real big issue. Even doing a factory reset and reflashing all system and user code does nothing to fix the problem.

We have tried passing various values to in response to the password request the old ap password the password to our particle account ect. The device shows as open when in softap mode but you cannot connect with out this password request window showing up in the phone app.

I am assuming the there is some memory that is not being cleared properly when clearcredentials is being used which is leading to these devices being bricked.

Does sending credentials via USB work?

1 Like

@henkep It looks to us like your problem Strange listening mode behavior is the same as we have listed here. Did you come to any resolution on the problem?

@kennethlimcp

We can still pass creds via the usb cable but softap is locked out.

I tried to replicate issues that people face out the box but i am still haven’t had a not working unit (yet)

@kennethlimcp

We have confirmed that we are able to reproduce this problem on every unit we try to. We have about 4 or 5 units in this state it seemed like we should stop at that point. Sometimes this problem comes up on the second time you try to pass creds with the phone sometimes it takes 3 or 4 times cycles of clearing credentials and reentering them until you get into this SoftAP bricked state.

We use a system compiled from the develop branch but we also took a fresh unit and allowed an OTA update to the latest production system we are still able to reproduce.

1 Like

Just to be sure, can you place the device in Listening mode and hit v to see the system version?

Does the CLI particle setup fail as well? I would like to try getting mine to fail as well to debug

@kennethlimcp @zachary

Here is from the unit which has the softAP bricked running production system code

system firmware version: 0.4.4

I do not think there is any point pulling the system version we have from the develop branch its from about 8/18

Yes we can reflash using the particle cli but that does not fix the problem. I am thinking there is some NV memory that should have been flushed or reinitiallized when clearing creds and it is not happening making the device think it is in WPA/WPA2 mode when it should really be it open SoftAP mode. Just to be super clear the device shows as an OPEN AP but when you try to connect a phone both andriod and ios will through up the password screen which I assume is embedded in the WICED code.

1 Like

As mentioned in the thread @HardWater linked to above, I appreciate the testing. We’ll make sure to look into this soon.

https://github.com/spark/firmware/issues/547 has been reopened for tracking and prioritization.

@HardWater did you check and follow Mat’s steps as reported in the other thread? Specifically, ensuring that you re-select the SoftAP on subsequent connection attempts?

I just tried again, and it’s working for me. (I’m testing on a laptop connected to the Photon’s SoftAP - can still contact the TCP server on port 5609.)
I’d made a mistake of not reconnecting to the SoftAP on the second try.
Perhaps the mobile is also suffering the same problem and not reconnecting WiFI to the Photon’s SoftAP?
I am testing using the latest release on github - 0.4.4.rc.3. https://github.com/spark/firmware/releases/tag/v0.4.4-rc.32
Please update your system firmware to that and see if it makes a difference - this issue may have already been fixed.

Thank you guys for bumping this up the chain in terms of priority!

@jonlogan I am 100% certain that we are not forgetting to rejoin the SoftAP on subsequent tries. On iOS, reconnecting to the SoftAP is a manual step the app reminds you to go do, and it doesn’t advance unless you take that action.

Furthermore, the way we know a device has experienced the bug is that it prevents us from connecting to its SoftAP network. On iOS is either allows the iPhone to connect to the SoftAP and then immediately boots the iPhone back off, or the photon requires a wifi password to connect to its SoftAP.

I will let @KyleO or @HardWater to speak to the android side, but he behavior is very similar.

If anyone can test using netcat on a laptop instead of the mobile apps that will help us isolate whether this is a firmware issue or a mobile issue. I believe when @mdma said he couldn’t reproduce, he was verifying with nc that in fact the firmware allowed the connection just fine, though I may be mistaken.

3 Likes

I’d like to callout zachary’s request above – can someone perform the test he describes above and share your results? This is key to helping us better understand and prioritize the issue. Thank you.

So I just took a brand new cellophane wrapped Photon and downloaded the latest Particle app. Here is what I did:

  1. Successfully added credentials through soft ap. It then updated to the newest firmware. Then connected to the wifi network. Breathing cyan.
  2. Closed the app, removed the power from the photon, restarted the app, powered the photon. It immediately connected back to the wifi network. Breathing cyan.
  3. Put the photon in listening mode (without clearing wifi creds). Blinking blue. Connected to the Photon soft ap network.
  4. Through the app added credentials again.
  5. Repeated steps 2 through 4. It hung on the “connecting to the cloud” step for a bit longer. The photon started flashing red for about 15 seconds, then flashing blue, then breathing blue. Then connected to the wifi network, breathing cyan.
  6. Repeated steps 2 and 3. This time it refuses a connection to the Soft AP. Some times when you try to connect to it asks for a password, other times not. Entire time blinking blue.
  7. Next, as requested, I try to connect with a laptop. The immediate feedback is an error message . But OSX attempts to connect anyway. Which results in the looping of the wifi icon for several minutes with the final result of an exclamation point in the wifi icon. Using wireshark, I can see an IP address is briefly assigned before being disconnected.
  8. A few more attempts, now the laptop fails to connect to the SoftAP at all. No longer prompting for an error, it fails to connect then looks for greener pastures, connecting silently to past wifi networks. When trying to connect from mobile it now predictable asks for a password. As if it knows the soil here is salted and is attempting to bar my passage.

This is the exact behavior I experienced with other devices. Its notable to mention that each time I cycle the power, it will remember the first correct wifi network and connect to it, pleasantly breathing cyan. I took videos of all of this, including that ugly red blinking part. I also captured, via wireshark, the packets when trying to connect via my laptop. I can email them to you. What command would you like me to run with nc/netcat? I’m totally open to bricking more of the devices if you want me to run through this again from the top with a fresh unit.

1 Like

@mdma @jonlogan @zachary So tried this morning after being unpowered all night. The device is still consistently asking for a PW

1 Like

@KyleO thank you for the step-by-step and screenshot — both very helpful. When connected to the Photon’s network, try this in your terminal:

echo -n -e 'device-id\n0\n\n' | nc 192.168.0.1 5609

You should see a JSON response with id and c keys, for example:

{"id":"2B0042000847343232363230","c":"1"}

Obviously not possible if you can’t connect to the Photon’s Wi-Fi network.

This is very strange. When the SoftAP requires a password, what type of security is the AP reporting? It should be unsecured, but I wonder for some reason it is dropping into a different authentication type.