Recovering Data From Discharged Devices
We are sending devices out for a user study which have had larger batteries attached to the devices. Unfortunately before sending out these devices we haven't had an opportunity to perform a full battery life test. Our process for programming the devices is activating accelerometer loggers and then disconnecting before sending them out for use. When the devices are returned we use the anonymous data signal example to retrieve data from the device. We are keen to know what behaviour to expect when the device runs out of battery and is returned. If we begin charging the devices are we still able to use the anonymous signal downloader to retrieve the logged data or would we need to use an alternative method to recover the data?
When you say anonymous signal downloader are you referring to the python example script or one of the apps?
When power is lost, two critical pieces of information disappear -- the relative time base (system clock), and the configuration of what is being logged.
The logger configuration would need to be restored before initiating an anonymous download, because the anonymous download depends on the sensor's present configuration to infer what is in the log memory and how to interpret it. Whatever is used to restore the logger settings must not issue any log erase commands.
The loss of time base generally means that timestamps will not be associated with real time, and would need to be aligned with a known point in time manually.
Not all of our tools will handle this use case cleanly or consistently, so it is highly advisable to experiment with a device that is not presently storing field data. A device that has logged for a short period of time, and then had a soft reset issue will be in a nearly identical state.
Thanks for your response @Matt . We are just using the python example script, the time base isn't important as we know the times that the logging was started.
If I have the original script that started the logging are you suggesting that just running this with the erase and setup commands removed would likely reinitialise the loggers and allow me to recover the data?
I will try to get a new device to experiment with!
Yes, you will want to run the commands from the original script to configure the logger for the data sources that were logged (and in the original order). Then the firmware will be sufficiently configured for a recovery readout.
Now that I know you are working with the python download scripts, I can also run some tests here to confirm it will be handled gracefully through the Python and C++ API portions.
Thanks for this Matt!