Retrieving logged data from disconnected board

Hello mBientLab community!

I am attempting to log and retrieve multiple hours of accelerometer data from an MMR+ board through an iOS app. Working from the provided StarterProject code, I have successfully logged and downloaded/retrieved accelerometer data from the board (I only need to connect to one board, and the board is always the same). However, when I try to log data for multiple hours, the board inevitably disconnects. When I reconnect to the board, the reference to the logger is lost and I am unable to retrieve the logged accelerometer data. I have looked through the tutorials, but do not find any explicit explanation for this. If there are references that would help guide me, that would be extremely helpful.
After my device is disconnected, how can I retrieve the (preset) logger reference upon reconnecting?

I have attempted to work in the DeviceState.swift file to initiate an accelerometer signal, add a logger to it, save the id of the logger to the state, and then serialize the state (similar to what was happening with the temperatureLogId). However, this is not what I am looking for as the DeviceState.swift file only runs the first time the board is initiated, not every time it reconnects.

Every time I launch the StarterProject, I get the following output in my console: "[CoreBluetooth] API MISUSE: has no restore identifier but the delegate implements the centralManager:willRestoreState: method. Restoring will not be supported" Will working with the CBCentralManager to implement a restore identifier allow me to solve my problem?

Any guidance, answers, and suggestions are very appreciated! The more detailed they are, the more I can appreciate them ;) Thanks a lot!

Comments

Sign In or Register to comment.