Last Updated on : 2023-10-17 02:14:21download
Pairing allows a device to connect to the router. Binding enables the paired device to access Tuya’s service for registration and binding. For simplicity, pairing and binding are collectively referred to as pairing throughout the topic.
The IPC Development Framework provides multiple pairing modes to fit different use cases.
The IPC Development Framework provides the following pairing capabilities.
Pairing modes | Description |
---|---|
Device binding over a LAN | The mobile app and device are connected to the same LAN, and the device can access a wide area network (WAN). |
Pairing in AP mode | The IPC broadcasts a Wi-Fi access point (AP). The user connects their mobile phone to this AP as instructed by the mobile app to send the router’s Wi-Fi credentials to the IPC for an internet connection. |
Bluetooth pairing | The Wi-Fi and Bluetooth combo device can exchange pairing information with the mobile app over Bluetooth to complete pairing. |
Pairing with QR code | The mobile app generates a QR code that the IPC can scan to get paired. |
Activation and binding with QR code | The IPC has been connected to a WAN and generated a short URL. You can create a QR code with the short URL and place it on the device or display it on the screen. The user can scan the QR code with the mobile app to pair the device. |
tuya_ipc_init_sdk
and tuya_ipc_start_sdk
return relevant errors.TUYA_IPC_PARING_MODE_E
) and connection mode (TUYA_IPC_LINK_TYPE_E
) align with the product definition.tkl_wifi.c
or tkl_wired.c
.tkl_wifi_init(WIFI_EVENT_CB cb)
or tkl_wired_set_status_cb(TKL_WIRED_STATUS_CHANGE_CB cb)
notifies the SDK of the current network status when the network changes.PARING_MODE_WIFI_AP
.TUYA_IPC_LINK_WIFI | TUYA_IPC_LINK_WIRE
.tkl_wifi.c
and tkl_wired.c
.PARING_MODE_WIFI_AP
.TUYA_IPC_LINK_WIFI | TUYA_IPC_LINK_WIRE | TUYA_IPC_LINK_BT
.tkl_wifi.c
, tkl_wired.c
, and tkl_bluetooth.h
.PARING_MODE_WIRED
.TUYA_IPC_LINK_WIRE
.mqtt topics cnt 1
is output.tkl_mutex_create_init
supports recursion. If it does not, enable recursion.mqc_set_connection_switch(TRUE)
after tuya_ipc_start_sdk
.tkl_wifi_init(WIFI_EVENT_CB cb)
or tkl_wired_set_status_cb(TKL_WIRED_STATUS_CHANGE_CB cb)
to notify the SDK of the current network status.Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback