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

  • Can you use anonymous downloads?

  • The data I am attempting to collect is preprocessed by a RMS data processor. According to this post : https://mbientlab.com/community/discussion/comment/9219/#Comment_9219, I am not able to use any on-board features with anonymous downloading.

  • Unfortunately, the data might be lost.

  • Hi Laura. Thanks for the reply!

    So just to be clear, as the mBientLab API currently stands, there is no way to log processed data from the board after a disconnect?

  • edited September 2020

    @Laura Do you have any plans to address this? My application requires live streaming of sensor data and the environment/usage of the product will most certainly cause disconnects.

    Ideally we could gracefully degrade from live streaming to offline and then reconnect and reestablish the streaming. All the while I would like local sensor recording to be uninterrupted, regardless of the live streaming connectivity status.

  • The issue is just with the MetaBase App. You can retrieve that data with our downloading APIs.

Sign In or Register to comment.