Last Updated on : 2024-11-20 08:51:39download
This topic describes the serial protocol used between Remotec’s infrared (IR) controller and Tuya’s Wi-Fi module. The protocol can enable the Wi-Fi module to send IR codes to the MCU, trigger IR learning, and report user parameters to the cloud.
The IR codes can be used for device control or IR learning, so it is necessary to differentiate between these two types of IR codes.
The module sends the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x39 |
Data length | 2 | It depends on the size of the data unit. |
Data | 1 | The types of IR codes.
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The MCU returns the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x39 |
Data length | 2 | 0x0001 |
Data | Data |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Learning new buttons
The module sends the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x40 |
Data length | 2 | 0x0002 |
Data | Data |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The MCU returns the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x40 |
Data length | 2 | It depends on the size of the data unit. |
Data | Data | Data |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Matching devices
The module sends the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x41 |
Data length | 2 | 0x0001 |
Data | 1 | The matching state.
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The MCU returns the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x41 |
Data length | 2 | It depends on the size of the data unit. |
Data | Data | Data |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Report user parameters
For cloud-to-cloud integration, the Wi-Fi module receives the user_email
, user_pwd
, and pa_key
from the MCU and sends these unique parameters to the Remotec’s cloud for interaction.
The MCU sends the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x42 |
Data length | 2 | It depends on the size of the data unit. |
Data | Data | Data format |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
For example, test1**@tuya.com,B7R4****,BEGV****
indicates the user_email
, user_pwd
, and pa_key
respectively.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback