Last Updated on : 2024-05-11 07:51:18download
This topic describes the streaming service for robot vacuums, a quick channel to transmit map data between the mobile app and the robot vacuum.
Only specific modules with the required service activated support map streaming services for robot vacuums.
Description:
The commands used in the map streaming service.
Command | Description |
---|---|
0x28 | Map streaming |
0x30 | Multimap streaming |
0x34 + 0x06 | Get the map session ID |
For streaming data of a complete map, the map data offset indicates the total length of data that has been sent.
The maximum serial buffer of the module is 1,024 bytes. A packet of map data cannot exceed 1,024 bytes. The recommended size of a packet is 512 bytes.
The map ID indicates a cleaning map. The robot builds a map of the cleaning area each time it starts a new cleaning task, with a new map ID assigned to it. When the map ID is changed, the map data displayed on the mobile app will be changed accordingly.
After data transmission starts, the module will stop sending heartbeats to ensure the map data traffic is prioritized. The heartbeat will not resume unless the module is restarted following a shutdown.
The MCU sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x28 |
Data length | 2 | 0x0006 + N |
Data | 2 | Data[0] to Data[1]: The map ID, an identifier for a map created for a cleaning task. |
4 | Data[2] to Data[5]: The map data offset, which is 0 for the first packet. | |
N | Data[6] to Data[N]: The payload, in big-endian format. | |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: The map ID is 123
and the packet offset is 0
.
55 aa 03 28 xx xx 00 7b 00 00 00 00 xx xx xx xx xx
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x28 |
Data length | 2 | 0x0001 |
Data | 1 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: 55 aa 00 28 00 01 00 28
This command is used to upload the map that combines multiple maps.
The MCU sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x30 |
Data length | 2 | 0x0009 + N |
Data | 1 | The map service protocol: 0x00 |
2 | Map service session ID: An identifier of a map displayed on the mobile app. | |
6 |
|
|
N | The payload, in big-endian format. | |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: 55 aa 03 30 00 xx 00 00 00 01 00 00 00 00 xx xx xx xx xx xx
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x30 |
Data length | 2 | 0x0001 |
Data | 1 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: 55 aa 03 30 00 01 00 33
This command is a supplement to the map streaming service for single and multiple maps.
The module manages the map session ID. Before the MCU transmits a new map, it will request a map session ID from the module and include the allocated session ID in each session data transmission. The sub-map ID is incremented by 1 as a new sub-map is added, such as 0x01
, 0x02
, 0x03
, and more.
If you prefer to manage the map session ID yourself, this command is not required.
The MCU sends the following data.
Field | Length | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x34 |
Data length | 2 | 0x0001 |
Data | 1 | 0x06 (subcommand) |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: 55 aa 03 30 00 01 00 33
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x34 |
Data length | 2 | 0x0004 |
Data | 1 | 0x06 (subcommand) |
1 | The transmission result:
|
|
2 | The map session ID. If the transmission fails, this data is invalid. | |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example: 55 aa 00 34 00 04 06 00 00 00 3d
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback