-
Notifications
You must be signed in to change notification settings - Fork 1
Mousr messages
theficus edited this page Dec 23, 2021
·
9 revisions
Mousr sends various messages to the listener using the characteristic 6e400003-b5a3-f393-e0a9-e50e24dcca9e (UART RX) and receives messages (commands) using the characteristic 6E400002-B5A3-F393-E0A9-E50E24DCCA9E (UART TX)
Messages are all simple byte streams that follow a similar format.
Note:
- RX messages are typically 20 bytes
- TX messages are typically 15 bytes
The first byte always defines the message type. The known message types are:
Message Type | Value Hex | Value Dec | Note |
---|---|---|---|
AUTO_ACK | 0x0f | 15 | |
FIRMWARE_VERSION | 0x1c | 28 | |
HARDWARE_VERSION | 0x1d | 29 | Appears to be unused by Mousr app |
INIT_DONE | 0x1e | 30 | Appears to be unused by Mousr app |
ROBOT_POSE | 0x30 | 48 | Used both for sending commands as well as communicating status back to listener. |
RESETTAIL_FAILINFO | 0x32 | 50 | Will be raised if a tail flick event is sent without the tail being calibrated. |
STUCK_TOF_MSG | 0x40 | 60 | TOF sensor is dirty |
Unknown Message | 0x50 | 80 | |
CRASH_LOG_FINISH | 0x5f | 95 | Crash log has finished sending |
CRASH_LOG_STRING | 0x60 | 96 | Bytes following 0x60 are ASCII-encoded text |
DEBUG_INFO | 0x61 | 97 | Appears to be unused by Mousr app |
BATTERY_VOLTAGE | 0x62 | 98 | Contains battery voltage information |
ROBOT_STOPPED | 0x63 | 99 | Will be raised when robot stops moving |
RC_STUCK | 0x64 | 100 | In the Mousr app this event will cause the handset to vibrate |
NACK | 0xff | 255 | Will be raised if an invalid command is received by Mousr |
This project is not approved or endorsed by Petronics. Any information here is provided as-is with no warranty or guarantees.