What is this behaviour of particle photon?

I am trying to update particle photon device firmware , realised the when I plugin to usb the led on photon becomes turns to cyan

$ particle list
my_photon [xxxxxxxxxxxxxxxxxxxx] (Photon) is online

and after some time it reports offline:

$ particle list
my_photon [xxxxxxxxxxxxxxxxxxxx] (Photon) is offline

just checked device via usb

ls /dev/cu.usb*

returned: /dev/cu.usbmodem1421

then when I try to screen /dev/cu.usbmodem1421 pressing i returned:
isDSTactive() tz 0.000000 dayofMonth 25 dayOfWeek 6 month 4 hour 13 why is this happening ?

Chances are that your code is misbehaving - but without knowing what you are running on the device it’s hard to tell

I manage to blink it yellow by first both setup and reset key pressed and then release reset and when yellow light appeared i released setup but no photon hotspot appeared.

I think I found out the problem, if I have the photon mounted on the new relay shield

and compile and upload from the web ide the upload fails. with no error.

just discovered if after following the yellow blinking light I run this line:
particle flash --usb tinker -v
then I am able to upload code.

Yup, that is often the case when the program running on the device is misbehaving - as I suggested in my first post :wink:

lame question: but what do we call doing that ?

I will put my code for review soon.

What exactly?


Would be a misunderstanding
This is not how you engage Listening Mode but DFU Mode, which won’t expose SoftAP.

Listening Mode is entered by press/holding the MODE/SETUP button after the device has started up already.

That would probably be called blocking code.
Presumably your code keeps the flow trapped in a loop or so and hence prevents the device OS from servicing the cloud connection which will then break after 10-20 seconds.

That would be called applying known to be good code :wink:


So I found out that this was the cause of the problem

bool dust = DustSensor::DustSensor_Reader::pms7003_read(currFrame, print_buff, printbufLen);

I recently introduced this code while attempting to add dust sensor. looks like I should use different mcu for dust sensor.