Diagnostics and Ping Implementation

Hey guys,

I was just wondering how Ping and Diagnostics are implemented.
We’re trying to determine if it is safe to enable these features for production devices.

Essentially: Will conducting a Ping or collecting Diagnostics on a device performing critical work interfere with that work at all? For example if a machine is self-balancing we want to ensure that these Console features cannot cause it to topple over because of a blocking event or high-priority events running in the system firmware.

Thanks!

Lots of variables in your question; you could flood the device with pings and it would have some effect I imagine. The ping needs to be serviced so that naturally takes away from other processes, is your process very time critical - perhaps rethink your diagnostics strategy. etc. If the app is mission critical I’d suggest you do your own analysis how ping is implemented; the sources are available.

Can we assume you are using a photon?

If you want absolute/guaranteed real-time control then I would not turn on wifi, use SYSTEM_MODE(MANUAL) and have the device run without SYSTEM_THREAD(ENABLED); This then means that the diagnostics information would not get back to the cloud and the console!

Perhaps a better solution is to have a small MCU (ATTiny?) dedicated to the machine balance task and then have the photon as a supervisor where time spent on connecting and reconnecting and publishing data would not endanger a 'topple'?

Using photon and electron.
I’ve looked at the Ping handler in the System Firmware. We might just restrict permissions for Ping operations.

Part of our requirements are keeping a network connection up occasionally for control from the cloud. So we’re balancing and reacting to remote commands at the same time: I think this falls in the normal domain for an RTOS.
So far we haven’t had any issues, but we’re attempting to upgrade to the latest System Firmwares, (currently sub-0.6.x) and hoping the new diagnostics features wont require a fork of the particle firmware.

We have some level of coprocessing in the way you mention already, the window for updating the controllers is pretty wide as far as electrical signalling goes, but we still have a pretty critical core loop.

So far my takeaway from looking at the Firmware is “it should be fine”. Mostly wanted to see if anyone else had run into any timing issues with Diagnostics enabled.