Pairing-free

Last Updated on : 2025-04-08 01:57:53download

The device generates an access point (AP), and the app scans the QR code on the device body. After obtaining the device UUID, the app guides users in connecting to the device AP and sends activation information to the device.
In the pairing-free mode, the device is not connected to the internet, but the app and the device are in the same local area network.

How it works

CloudAppDeviceConfigure the presetmodelApp scans the device's QRcodeGet the UUIDRequest the preset modelVerify UUID andactivateReturn the preset modelLoad the presetmodelGuide users to connect to thedevice's APConnectedGet the device informationReturn device informationSend the timeSync the timeSend activation informationReceive activationinformation, and theactivation processendsCloudAppDevice

Development guide

Prerequisites

  • You have a Tuya-enabled app, router, and device ready.
  • The device supports AP mode.

Device development

  • Set the pairing mode to wireless.

    connect_mode = PARING_MODE_WIFI_AP
    
  • Set the connection mode to wireless.

    TUYA_IPC_LINK_TYPE_E link_type = TUYA_IPC_LINK_WIFI;
    ipc_sdk_run_var.net_info.link_type = link_type;
    
  • Set the device to pairing-free mode.

    tuya_set_lan_mode(1);
    
  • Adapt tkl_wifi.c.

    The development framework provides a set of APIs for Linux. You need to adapt the implementation to your specific hardware.

FAQs

Why can’t the mobile app detect the device’s AP?

  • The name of the AP defaults to SmartLife_xxxx where SmartLife is hard-coded and xxxx represents the last four digits of the device UUID.
  • Check if the device operates in the AP mode.