Inmotion way of querying
christophedemey opened this issue · 1 comments
Hi
I was hoping to get some info on how to correctly query the inmotion v11.
I have browsed the code but am still a bit lost, i am trying to read out the speed in c#.
So far i found that we are connecting to the device targetting the service
{ "6e400001-b5a3-f393-e0a9-e50e24dcca9e", "INMOTION_V2_SERVICE_UUID" },
Then we need to write the command : RealTimeInfo = 0x04,
But then i am lost at what characteristic we are writing and where the data comes from. :(
Any help is greatly appreciated.
Thanks
@christophedemey you're right. INMOTION_V2_SERVICE_UUID
used for send command into device service.
The messages sends and accepted in the service BluetoothLeService
. For v11 commands sends in INMOTION_V2_SERVICE_UUID
-> INMOTION_V2_WRITE_CHARACTER_UUID
RealTimeInfo message - it is a byte array
{ 0xAA, 0xAA, 0x14, 0x01, 0x04, 0x11 }
AAAA - header
14 - type message = default
01 - length of data
04 - data = RealTimeInfo = 0x04
11 - checksum
You will receive a message in response. We parse it in the decode
method.
Also look at the adapter test. It has examples of packages that come from the wheel and the expected result