IMU data using ble protocol is in a weird format

78 Views Asked by At

I am working on IMU data, this data was collected using wrist watch under the protocol BLE the reading are non interpretable for me:

"data":"eyJBWCI6MC42OTksIkFZIjowLjY2NiwiQVoiOjAuMjIyLCJHWCI6MTYuMjk2LCJHWSI6OS44ODcsIkdaIjotMTMuODU1fQ==","from":{"Name":"wristband-d5","Protocol":"BLE"},"datetime":"2021-10-31T12:37:21.1352384-04:00","type":0

Thanks in Advance

1

There are 1 best solutions below

0
On

This data appears to be Base64 encoded. I decoded it using Python as follows:

$ python3
Python 3.9.2 (default, Mar 12 2021, 04:06:34) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> data = "eyJBWCI6MC42OTksIkFZIjowLjY2NiwiQVoiOjAuMjIyLCJHWCI6MTYuMjk2LCJHWSI6OS44ODcsIkdaIjotMTMuODU1fQ=="
>>> from base64 import b64decode
>>> b64decode(data)
b'{"AX":0.699,"AY":0.666,"AZ":0.222,"GX":16.296,"GY":9.887,"GZ":-13.855}'
>>>