Gateway Extension SDK FAQs

Last Updated on : 2022-11-24 09:20:09download

Why can’t the SDK get COO ver?

  • Description: After the SDK is run, I print the following errors:

    [01-01 18:12:31 TUYA Warn][tuya_z3.c:19931] Zigbee COO ver is not get.
    [01-01 18:12:31 TUYA Warn][z3_wrapper.c:108] tuya_z3_getZigbeeVer, ret: -1
    
  • Reason: The serial communication between the gateway’s MCU and the Tuya Zigbee module failed.

  • Troubleshoot:

    1. Check the pin connection between the gateway’s MCU and the Tuya Zigbee module. The RTS/CTS pin must be connected.
    2. Check the configuration of the UART parameters tty_device and tty_baudrate in the code.
    3. Check the serial driver of the gateway’s MCU.

Why can’t the Smart Life app find my device?

Check whether the mobile phone and the gateway connect to the same local area network (LAN). You can ping the IP address of the mobile phone by using the gateway to verify network connectivity.

How to get the Zigbee channel on the gateway?

After the SDK is started, it will generate a zigbeeNetInfo.txt file in the directory specified by the storage_path variable, which stores Zigbee network information such as Zigbee channel and PAN ID, as shown below:

$ cat zigbeeNetInfo.txt
Node ID:0
Pan ID:0x0044	 		 # Zigbee PAN ID
Radio Channel:15  	# Zigbee channel
Radio Power:13
Extended Pan Id: 158F733C2F2325A6
EUI64: F1F2D3FEFFD76B08
Global Key: A2 42 0D D6 50 DD 3B C3 1E CD BD 82 8A 19 E4 92
Global FC:0xFFFFFFFF
Network Key: A5 DA 43 DE 24 A3 7D 54 7A 6B 32 F1 EF 01 E3 A6
Network FC:0x00005001
Network Sequence Number:0x00

I got an error 4366 saying failed pairing. How to fix it?

  • Reason: The device has been activated and bound with an account.
  • Troubleshoot:
    1. Check if your device is already paired. If so, remove your device from the app and clear the cache data.
    2. Update the UUID and the Authkey with another one. Delete the .db file, clear the cache data, and try pairing again.

Which interface is used to get the sub-device list?

tuya_user_iot_misc_dev_traversal

Why does my gateway go offline?

  • Reason: If the gateway keeps sending data, the cloud will stop receiving packets for 10 seconds due to the traffic control mechanism.

    Two scenarios can trigger traffic control:

    • The gateway continuously sends data every 2 seconds within more than 20 seconds.
    • The gateway continuously sends data every 5 seconds within more than 60 seconds.
  • Troubleshoot:
    Check if your device continuously sends data to the cloud.

I got an NCP error. How to fix it?

  • Description
    [2021/6/16 19:50:22] ASH_FLAG TUYA check, abnormal_data_num:0.
    [2021/6/16 19:50:22] ASH disconnected: EZSP_ASH_ERROR_XON_XOFF
    [2021/6/16 19:50:22] NCP status: EZSP_NO_ERROR
    
  • Reason: The module is restarted.
  • Troubleshoot:
    1. The CRC checksum failed more than three times so the NCP is restarted. If the accumulation of an error reaches a threshold, the system considers that some issues on NCP occur and will restart the NCP.
    2. If you get EZSP_ASH_ERROR_XON_XOFF, it indicates there might be a problem with the flow control of the microcontroller.

The gateway fails to send commands to its sub-devices and the system keeps sending the tx66 error. How to fix it?

  • Troubleshoot:
    1. LastHopLqi measures the signal quality.
      • Excellent: greater than 200
      • Good: 150 to 200
      • Fair: 100 to 150
      • Poor: less than 100
    2. It is recommended that the gateway report no more than 10 packets per second on average.

How can I get the version number of the module?

You can call tuya_user_iot_zig_ncp_ver to get the version number.

How can I check the connection status of the sub-devices?

tuya_user_iot_misc_dev_online_status

Why is the control panel page on the app blank?

  • Description: The app has discovered the gateway but failed to pair with it. However, I got no error messages from the app but a blank page.
  • Troubleshoot: If you get the error errorCode:PRODUCT_OTA_CHANNEL_CONFIG, go to the Hardware Development step on the Tuya IoT Development Platform and change the Firmware Type to Module Firmware and Update Channel to 0.

What if the FAQs do not address my question?

You can log in to the Tuya IoT Development Platform and submit a service ticket to seek further help. Make sure to include the following information to help us quickly identify issues.

  • Background: For example, I am a device engineer of a certain company, and I am developing with the Tuya gateway extension SDK.
  • Description: Describe as much as possible the conditions under which your problem occurred, and what is the fault phenomenon? Can it be reproduced?
  • Attachment: Please upload the screenshot or log of the fault.