FAQ

FAQ collection for open platform

Here is the instruction manual developed by mcu, you can download and view it: Guide to Interworking-with the Tuya MCU

The network still cannot be configured after the MCU has been developed

In the process of interfacing, when the network cannot be configured, the causes of the failure in network configuration can be located via viewing the log information of the module.

Refer to how to view the log of the WIFI module for details.

The MCU shall be restarted to complete the network configuration

The module will be restarted in the process of network configuration, and a line of unreadable codes will be sent.
Check if there is a base protocol after the restart. If any, check if the issue is caused by the unreadable codes after the module being restarted.

Test method: Connect the TX/RX or GND between MCU and the module to the friendly serial port debugging helper to check the protocol interaction. Check if the module normally responds to the heartbeat after the restart, query the product information and check the work state of the module.

What is the product ID?

The product ID is the unique identifier for a kind of device, such as qDubdA9x9LwAFfH7. The product ID is linked with the device function point and the product description

How to report the fault type?

If the fault values filled-in on the platform are E1, E2, H1 and H2, the corresponding fault values are 0x01, 0x02, 0x04 and 0x08. The fault values shall be arranged in the ascending order of the bit, 32 faults can be supported at most, i.e., 32bit (4 bytes) and multiple faults can be reported at the same time.

How to use the function debugging file?

Function debugging files are generated according to the function points and shall be used together with the Tuya serial port debugging helper.

Note: after the development platform modifies the function points:

  • (1)If the Tuya serial port debugging helper is used for debugging, the new function debugging files shall be downloaded and imported into the Tuya serial port debugging helper, so as to synchronize the modified content.
  • (2)If the WiFi module is used for debugging, the device shall be removed and a new device shall be added. The reason is that the local function debugging files of the module will be updated, once a new device is added.

How does the accessed MCU of the general platform carry out the product test?

MCU sends the WIFI function test instruction (such as 0x55 0xaa 0x00 0x0e 0x00 0x00 0x0d), and the WIFI module will scan SSID (the WIFI hotspot of tuya_mdev_test) after receiving the instruction. If SSID is scanned, the signal intensity percentage will be returned; otherwise, a “failed” message and the corresponding error code will be returned.

Serial port access requirements

  • (1)Hardware access standards for serial port
    • TTL serial port; 3.3V power supply
  • (2)Software access parameters for serial port
    • Baud rate: 9600
    • Data bit: 8
    • Parity check: none
    • Stop bit: 1
    • Data flow control: none

CRC and checking algorithm

If CRC and checking are failed, please compare the checksum with the calculated result of the sample algorithm.

The CRC and checking algorithm are as follows:

unsigned char getCheckSum(unsigned char *pack, int pack_len)
{
	unsigned char check_sum = 0;
	while(--pack_len >= 0) {
    	check_sum += *pack++;
	}

	return check_sum;
}

How should the MCU respond to the sending state query of the module state?

When the MCU receives the state query instruction of the WIFI module, the MCU shall report the locally reportable data one by one so as to facilitate the smart phone APP synchronizing the device state.

How to address the issue that the module cannot work properly?

The required supply voltage and current of the WIFI module are 3.3V (3.0V-3.6V) and over 300mA respectively.

In case the supply voltage of the module is too low or too high or the current of the module is too low, the module cannot work properly, and the following phenomena may occur:

  • (1)The module cannot be started normally and no normal heartbeat packages are sent.
  • (2)The module is restarted repeatedly or restarted during the network configuration.

The WIFI indicator flashes quickly, but the network configuration is failed.

  • (1)Indicator flashing quickly all the time
  • Please try again or restart the WIFI module. If the network configuration is still failed, please tell the technical support personnel the router model and the phone model.
  • (2)Indicator always being in the off state after the quick flashing
  • Check whether the WIFI connected to the phone has access to the Internet and whether the WIFI name and password entered during the network configuration are correct.
  • (3)Indicator on normally after the quick flashing and being off
  • lease remove the device and re-configure the network for test. If the network configuration is still failed, please contact the technical support personnel.

400 Call

Consult

400-881-8611