What does 'ping' in the console do?

What does ‘ping’ in the console actually do? I assume the same as the ‘ping’ API call, so what does that do?
I have a boron sitting on my desk, it’s breathing cyan, clicking ‘ping’ in the console says that it’s online, but attempts to run a function, to upload code, or to run diagnostics all end in a connectivity error. Is the ‘ping’ button just a meaningless “feel good” thing? I was expecting it to actually send a packet to the device and report whether it got an answer back…

I believe it does, since if you take the device offline, you’ll get “Particle has sent a ping to your device and will wait 15 seconds for a response” or something along those lines. It doesn’t show up in the event log though.

What’s the history on the device? Have your function calls worked in the past with this device and firmware? Have you updated anything since it last worked?

Ping sends a CoAP message to the device and waits for it to return. Because the message is handled within the system firmware on the device, it’s possible for a ping to be responded to by the device, but everything else not function properly. Application code that is blocking loop with system thread enabled can easily do this, but there are other less common reasons why that can occur.

2 Likes

I see… It would really be good to have a way to reset the device that gets handled at the same level as the ping…