Replies: 2 comments
-
Yeah, I was investigating this, but this is implemented in a bit clumsy way in that app, and since I didn't need that, I focused only on real time data. |
Beta Was this translation helpful? Give feedback.
-
Battery Monitor BM2 Historical Data.Samples are taken from the battery and stored at two minute 'odd' intervals. (i.e. minute 1, 3, 5 .. 59) They are held in the device until power is removed or the buffer is full. I have not seen the buffer get full yet so I am unsure how many samples it holds. There are two commands used to get the data from from bm2. Commands are sent to the BM2 using the FFF3 BLE characteristic and the data sent is encrypted in exactly the same way that notifications on FFF4 are. Responses to commands are also received on the FFF4 notification characteristic interleaved with the instantaneous voltage values. Command: GetHistoricalSampleCountThis command returns the number of two minute historical samples available. Command Data: [0xE7, 0x01] Response Data: [0xE7, d3, d2, d1, d0] The bytes d3 - d0 represent the number of samples available in big-endian order. In actuality d3 is always going to be 0. Command: GetHistoricalSamplesThis command triggers the BM2 device to send a response containing the requested samples. Note: Sometimes more than the requested samples are sent for reasons unknown. It is probably best to check that the returned sample count is the same as the requested sample count before trusting the returned data. Command Data: [0xE3, 0x00, 0x00, d3, d2, d1, d0]The bytes d3 - d0 represent the number of samples requested in big-endian order. In actuality d3 is always going to be 0. Response Data: In response to this command the sequence described below is sent from the BM2 Battery Monitor. The 0xF5 instantaneous data values are also being sent at the same time so these should be filtered out.Sequence starting [0xFF, 0xFF, 0xFE] is received to indicate that the historical data is about to follow.The next packets received (apart from the 0xF5 packets) are the historical data.Sequence starting [0xFF, 0xFE, 0xFE] indicates the end of transmission.The historical data contains a number of voltage samples each 4 bytes long or 8 nybbles. The nybbles are of the format vvvvxxxt. The v symbol indicates the historical voltage, big endian, multiplied by 100 so need to be divided by 100 to get the true value. The t symbol is the voltage type enumeration. 1 - Normal, 2 - Starting Point and 3 - Flameout point. The x symbol is don't care. Note that there is no timestamp set. Each value transmitted represents a 2 minute sample working backwards from the current time. |
Beta Was this translation helpful? Give feedback.
-
Have you figured out how to read the historic data stored on the device?
I'm love to be able to populate the data that's missed when we're away from home.
Beta Was this translation helpful? Give feedback.
All reactions