Closed centic9 closed 5 years ago
Hi Dominik,
I made an implementation of a watchdog for the next version of firmata4j. Could you please review #31 to see if it works for you. I would appreciate any suggestions on further improvement.
Hi Dominik,
This watchdog implementation now available in firmata4j-2.3.7
I have an Arduino connected via USB for some Button/Led interaction.
The device is connected for a long time and should stay connected across all types of system-events, e.g. when the machine resumes from sleep/hibernate or whenever there is a hickup on the USB ports.
But sometimes the device gets disconnected and firmata4j does not detect this, so I cannot build in code which automatically restarts the device.
Is there a way to detect that the device is still working, i.e. some ping/watchdog request/response functionality?
https://github.com/firmata/ConfigurableFirmata/issues/47 is related somehow, but seems to be further out.
Currently I am doing something like the following, but it would be nice to have a "last receive timestamp" or even a "restart after x-seconds device inactivity" built into the library.