Other Issues of MCU Access Mode

After changing the DP on IoT Platform and the SDK was re-ported, why the function is still invalid?

After modifying the function points and migrating the SDK, you need to re-pair the device to take effect.

What will a module do if it receives no replies or receives a product information query error?

The module will keep sending the product query command.

How is proactive reporting different from passive reporting?

Proactive reporting: When an MCU receives a command from a module and executes an action, it needs to report the new DP status to the module. Proactive status reporting uses a synchronous processing protocol. When the module receives the proactively reported information, it sends the ACK message to the MCU. Passive reporting: When the MCU proactively detects a DP change or restarts, it reports the changed DP status to the module. Passive status reporting uses an asynchronous processing protocol. The module reports the data to the gateway and waits for the gateway's response. If the gateway does not return a response within the specified time or returns "fail", the module sends the NACK message to the MCU, and the MCU must retransmit the data. In passive reporting mode, the module's response content is determined by whether the gateway has received data. The response time is long. In proactive reporting mode, the module considers the gateway to be connected and returns data to the MCU directly. The response time is short.

Does the Wi-Fi low power module have an external INT?

Wi-Fi low-power module There is no external INT. After the module processes one frame of data, the power of the Wi-Fi module is disconnected to achieve low power consumption.

What are the basic protocols in an MCU SDK package?

Basic protocols are the same for each product and mandatory for modules. Basic protocols include heartbeat detection, product information query, module's working mode, and Wi-Fi status.

How do I troubleshoot a network pairing failure?

1. Check whether you have replaced the flash in your authorized module. There is a 1:1 mapping between the flash and chip, and the mapping cannot be changed after authorization.

2. Analyze whether the product information sent by the MCU is correct. Incorrect PIDs will cause activation failures on the server.

3. Check whether product information is returned twice for first-time network pairing.

4. Use another mobile phone for a comparative test. If a mobile phone cannot be paired, record the mobile phone's RSSI and the operating system version, and send the information to the relevant client colleagues.

Why does network pairing of an MCU fail after the MCU has been developed?

Check the module logs to locate the failure cause.

Can Tuya provide the MCU for a module?

If you select the MCU solution, Tuya provides the MCU SDK. You can develop the MCU yourself.

How do I calculate the checksum of a frame transmitted over a serial interface?

Sum all bytes in the frame and calculate the remainder of the byte sum to 256.

What are the command words sent by MCU to reset Wi-Fi?

It sends command word 04 to reset Wi-Fi, or sends 05 to redirect Wi-Fi to enter AP mode or EZ mode.

How many DPs can be created in for a Wi-Fi device that uses the MCU solution?

A maximum of 40 DPs can be created. However, we recommend that the number of DPs does not exceed 25. Otherwise, a device may fail to pair with the app.

What does 01 mean under the network configuration state of Wi-Fi module?

0x00: smart network configuration mode, in which the indicator blinks quickly 0x01: AP mode, in which the Wi-Fi indicator blinks slowly 0x02: The Wi-Fi is configured, but the device fails to connect to the router. The indicator is off. 0x04: The device connects to the router and the cloud. The indicator is steady on.

What situation does the device indicate offline?

The devices will show offline in two cases. Firstly, The module will send a heartbeat message to the MCU each 15 seconds, if there is no response from the MCU in 2-3 minutes, it will show offline. Secondly, the module will report to the cloud every 1 minute. If the cloud does not receive the message from the module in 2-3 minutes, it will show offline. Thus, the device will indicate offline when the network is disconnected. However, it will be permanently online for low power consumption products.

How does the APP use a virtual device?

1) If you just expect to experience control by mobile phone, you can run the Tuya APP to scan the QR code in step 2 of creat ing the product.

2) If you create a product to be interconnected with the MCU, you can experience it in step 2. In step 3, you can click "Virtual Device Debugging Test" to receive instructions from the mobile phone like a real device, or you can simulate a real device reporting data and debug the APP UI.

How does a door lock synchronize the time with the Wi-Fi module? How is it set in code?

The Tuya MCU SDK reserves an API for the MCU to request time from the server at any time. After invoking the void mcu_get_system_time(void) function defined in mcu_api.h to request the server time, the MCU invokes the following mcu_write_rtctime function to verify the RTC clock. void mcu_get_system_time(void) { wifi_uart_write_frame(GET_LOCAL_TIME_CMD,0); } #endif

How are Restore factory settings and Start network pairing different?

Restore factory settings clears a module's network pairing information and restarts the module. After a restart, the module exits from the network pairing state. To make the module re-enter the network pairing state, the start network pairing command is required. Start network pairing resets a module and enables the module to enter the network pairing state. For example, it enables a configured module that is disconnected from the network to re-enter the network pairing state.

Why does the wind speed have one level different from that displayed on the panel when I commission the device?

Enum values are sent from 00.

Why does combined reporting fail?

The data length, data content, or checksum may be incorrect. Combined reporting requires that all data is correct. If any data is incorrect, the whole packet will be lost.

Why does the mcu_get_wifi_work_state() function always return 0xff in the development process?

If a module is not initialized properly during development, this function always returns 0xff.

Why does image preview fail when I use a camera simulator for commissioning?

Simulators cannot simulate hardware-coded cameras. Use a real camera for commissioning.

What is an mcu_sdk package?

An mcu_sdk package contains the MCU code automatically generated based on the product functions defined on the Tuya Smart platform. The communications and protocol parsing frameworks are already available and can be added directly to an existing MCU project to develop an MCU program quickly.

Is the mcu_start_wifitest() function invoked only once or always during a product test?

The mcu_start_wifitest() function is invoked only once.

How long does it take for an MCU to awaken a module?

Several microseconds.

Why can't I control the MCU after I modify a DP and migrate it to another program?

After a DP is modified and migrated to another program, you need to re-pair the device to control it.

Why is "Generating the file..." displayed on the page for a long time when I purchase a device license?

A license file involves access keys and multiple encryption algorithms, so it will take several minutes to generate the license file. When a license file is being generated, you can close the page. When the license file has been generated, the platform will send you an SMS message. You can also view the license file on the Tuya Smart platform's Order Manage page.

Why doesn't a modified and migrated DP take effect?

A DP that has been modified and migrated to another program takes effect only after you re-pair the device.

What do the command words 00, 01, 02, 03, 04, and 05 mean?

01: AP net pairing mode

02: The Wi-Fi is configured, but the device has failed to connect to the router.

03: The Wi-Fi is configured, and the device is connected to the router.

04: The device is connected to the router and the cloud.

05: The device is in low-power mode.

What are the serial communication protocols during MCU interworking?

The protocols are classified into basic and functional protocols. Basic protocols are independent of products. They are common protocols of modules and include module initialization commands and some extended functional commands. Functional protocols are DP data transmission and receiving commands that the platform automatically generates based on the definition of each product DP.

How does a visual doorbell take photos?

A visual doorbell has a physical button that allows visitors to trigger calls to you. You will receive app notifications and can view photos taken by the doorbell camera in the app. If the visual doorbell is embedded with a motion detector, such as a PIR sensor, image recognition device, or radar detector, you can set a sensitivity level to enable the doorbell to take a photo when no motion is detected within a specified time. For example, the visual doorbell automatically takes a photo and sends it to your mobile phone when it detects no motion within 5s if you set the sensitivity to a high level or within 10s if you set the sensitivity to a low level.

What is the SDK migration process?

1. Compile the MCU basic program and migrate the SDK files.

2. Confirm definition of the protocol.h macro.

3. Migrate the protocol.c file and function calling.

4. Improve calling of the data point reporting and delivery functions.

5. Improve the network pairing and indicator functions.

6. Improve the product test function.

Last updated