camcamfresh / Xiaomi-M365-BLE-Controller-Replacement

Replacing the BLE Controller with a Cellular Controller
142 stars 34 forks source link

What is "start"? #25

Closed ir-fuel closed 5 years ago

ir-fuel commented 5 years ago

I am trying to understand the code, and I see that upon receiving a certain sequence of bytes, a "start" command is sent

unsigned char start[] = {0x55, 0xAA, 0xF, 0x24, 0x1, 0x0, 0x4D, 0x49, 0x53, 0x63, 0x6F, 0x6F, 0x74, 0x65, 0x72, 0x35, 0x32, 0x31, 0x39, 0x85, 0xFB}

Can you explain what this does? I see it targets 0x24 which is not listed in the documentation as any of the modules of the scooter. This is sent as a response to a received message of 0x02 length. I have a few docs about the BLE protocol and I don't have any message of that length in there. Could you please tell me what this is for?

Thanks!

camcamfresh commented 5 years ago

I haven't seen this command to have any noticeable effect, but I included it in the program because that is what the factory board does every time it is powered on (perhaps it has something to do with the version number of the motor controller). You could remove it.