Photon in listening mode when it should not be


#1

Hi All,

I just ran into a situation where a Photon that had been reporting properly entered listening mode when it should not have . I had observed this behavior a few times on other units but thought it was tied to only defective devices. Just now it happened on what was considered a known good unit. Once the Photon was reset without giving it credentials it was able to send data so how/why was it able to enter listening mode?

Has anyone seen this?


#2

Hi @HardWater, I am having a similar issue… I have a Photon that was running great through multiple cycles of use and powering down. But twice now it has happened where I powered it up and it entered listening mode instead of simply running my firmware. I noticed that the LED glowed solid white for a few seconds on power up, before going into listening mode. I had to reconfigure the Wi-Fi credentials on the device using the Particle app to get it to connect again. I have no idea what is causing this, and I cannot seem to replicate it with any pattern, it just seems to happen randomly. It may be worth noting that this Photon (and a few others of mine recently) have been giving me device key issues when trying to connect to the cloud (LED flickering cyan with quick red bursts, instead of breathing cyan), so I had to flash it through USB. I wish I knew the cause/solution…


#3

Some more details on this would be great. Just putting this out for everyone in case others experience these issues. To help us diagnose, please make a memory dump on a photon that is working:

dfu-util -d 2b04:d006 -a 0 -s 0x8004000:0x8000 -U working.bin

And then do the same when that same photon starts misbehaving (either listening mode or key problems):

dfu-util -d 2b04:d006 -a 0 -s 0x8004000:0x8000 -U not_working.bin

This will be a great help in tracking down the problem.

Many thanks,
mat.


#4

is this not the same issue as here? Particle Firmware Updates Thread

EDIT: And FWIW, I struggled with this for a while tonight as well. But I haven’t put in the workaround yet and it just magically worked the last time I booted it.


#5

I don’t believe so - that issue is about the photon remaining in listening mode once already been put in listening mode and given credentials. Here, the photon is entering listening mode on power up even though there are wifi credentials configured. That should not happen.


#6

@mdma I am circling back around to this issue. I remember you had posted some workaround code to be used in system events. I never got around to implementing it and now I cannot find it. I am assume you edited your post and deleted it. Can you repost it or send it to me. Thanks.


#7

I believe you’re talking about the code that is in the bug report from the thread I posted, however, @mdma says this is a different issue. FWIW, the details are here: https://github.com/spark/firmware/issues/558


#8

@cokerms Thanks Yes I believe you are correct that is what I was looking for.


#9

I’m confused - @HardWater the way you described the issue in the opening post sounds like the device spontaneously entered listening mode on power up. Is that correct? If so, that issue is for something else - the device staying in listening mode when you already have put it in listening mode.


#10

@mdma I know I have observed the listening reentry problem on first setting of creds. I am not 100% sure we have seen it reenter on a subsequent wake cycle or just on the wake cycle when cred were passed.


#11

Ok, then I guess it’s the same issue, which has been resolved.

That description makes it sound like devices are suddenly jumping into listening mode. Please try to make issue reports as clear as possible to make best use of everyone’s time. Thanks.

I’m happy that it’s the known issue because devices spontaneously entering listening mode would not make me a happy bunny. :wink:


#12

@mdma I try very hard to be very clear. I guess you are saying my comment “when it should not have” is suggesting this is a well known behavior. I had not come across anything in the documentation to that effect.


#13

Hi @mdma, I am actually experiencing the issue that was initially mentioned here. I just had it happen for the second time (two different Photons) where it had previously been working fine but then on a power up it unexpectedly entered listening mode instead of running my firmware, and I had to reconfigure the Wi-Fi credentials before it would connect again (restarting the device would just cause it to enter listening mode again).

Interestingly, after re-configuring the Wi-Fi and running my firmware, I hit a switch to connect it to the Cloud (I have it running in SEMI_AUTOMATIC mode), but the device keys were then bad! The device keys were previously fine… it was either coincidence or both issues occurred at the same time. I will email you a memory dump file from right after the listening mode issue occurred. Unfortunately I don’t have a memory dump file from before the issue occurred, but I can also make one for once it is running normally again if that helps?


#14

Thanks, I’ll take whatever you have. Yes, please take a “normal” memory dump afterwards so that we have something to compare.

I believe there must be a critical bug still in the WICED code that manages the device configuration table (DCT), this is where our keys, wifi credentials are stored. Any memory dumps you send may help support that theory! :+1:


#15

Hi @mdma, just wanted to check in and see if you received the memory dump files I emailed you on Aug 29? Did they help at all with determining the cause of the listening mode / keys issues? Thanks!