Wifi / Cloud failure error reporting, error codes?

Is there a way to pull a reason code from the cloud/wifi system on a failure to connect? It would be nice to be able to tell the difference between

  • No AP found
  • Could not attach to AP
  • Bad AP credentials
  • Could not connect to DNS
  • Could not reach Particle.io
  • etc etc etc.

Bonus feature request:
Or if it has a reportable difficulty connecting* (besides RSSI), it would be nice to be able to throw a warning back over the 'net so that we can troubleshoot things more effectively.

*One of our testers consistently has a many-seconds-longer connection delay than the rest of us, for example.

Have you looked at the trace output of the device during connection when activating SerialLogHandler traceLog(LOG_LEVEL_ALL) in your code?

1 Like

No. I wasn’t even aware that particle internals generated log messages based on the documentation! (I thought it was just a convenience mechanism for the user, so no real reason to mess with it)

I will look into that, but what I’d really like is some sort of result status for Particle.connect().