Last Updated on : 2025-04-14 03:22:05download
Smart Config Plus pairing has been optimized in terms of security and reliability:
Secure data transmission: End-to-end encryption ensures Wi-Fi credentials and device data remain protected during pairing, preventing third-party interception or tampering.
Enhanced anti-interference capability: In complex network environments, optimized communication protocols and packet transmission mechanisms effectively reduce pairing failure rates caused by interference, ensuring stable device onboarding.
Multi-level failure recovery mechanism: When pairing fails, the system can quickly locate issues and automatically retry. This minimizes user intervention to enhance the overall experience.
Dynamic compatibility adaptation: Automatically adjust router communication parameters to enhance compatibility across various router models and configurations. This reduces pairing failures caused by firewalls or frequency band issues.
Smart Config Plus is an optimized version of combo device pairing, designed to enhance bulk pairing speed.
Sample code
val scanKey =
ThingActivatorCoreKit.getScanDeviceManager().startBlueToothDeviceSearch(
60 * 1000,
arrayListOf(ScanType.SINGLE),
object : ThingActivatorScanCallback {
override fun deviceFound(scanBean: ThingActivatorScanDeviceBean) {
// The scanning result
}
override fun deviceRepeat(scanBean: ThingActivatorScanDeviceBean) {
}
override fun deviceUpdate(scanBean: ThingActivatorScanDeviceBean) {
}
override fun scanFailure(failureBean: ThingActivatorScanFailureBean) {
}
override fun scanFinish() {
}
})
// Stop searching
ThingActivatorCoreKit.getScanDeviceManager().stopScan(scanKey)
)
Parameters
Parameter | Description |
---|---|
scanTypeList | SINGLE : scan for Bluetooth LE devices. |
millisTimeOut | The search timeout value, in milliseconds. Recommended value: 30,000 ms. |
thingActivatorScanCallback | The callback for the result of scanning. |
scanBean | The discovered device. |
Sample code
val thingDeviceActiveModeEnum = deviceBean.supprotActivatorTypeList[0]
if (thingDeviceActiveModeEnum == ThingDeviceActiveModeEnum.MULT_MODE
|| thingDeviceActiveModeEnum == ThingDeviceActiveModeEnum.BLE_WIFI
|| thingDeviceActiveModeEnum == ThingDeviceActiveModeEnum.BLE_WIFI_BATCH
) {
val activeManager = ThingActivatorCoreKit.getActiveManager().newThingActiveManager()
activeManager!!.startActive(ThingDeviceActiveBuilder().apply {
activeModel = thingDeviceActiveModeEnum
ssid = "ssid"
password = "password"
timeOut = 60
relationId = homeId
listener = object : IThingDeviceActiveListener {
override fun onActiveError(errorBean: ThingDeviceActiveErrorBean) {
// Pairing failed
}
override fun onActiveLimited(limitBean: ThingDeviceActiveLimitBean) {
}
override fun onActiveSuccess(deviceBean: DeviceBean) {
// Pairing succeeded
}
override fun onBind(devId: String) {
}
override fun onFind(devId: String) {
}
}
})
}
Parameters
Parameter | Description |
---|---|
thingActivatorScanDeviceBean | The discovered device. |
relationId | The home ID. |
ssid | The name of the specified Wi-Fi network. |
password | The password of the specified Wi-Fi network. |
timeout | The pairing timeout value, in seconds. |
activeModel | The pairing capability enum. |
listener | The callback for the result of pairing. |
Error code | Reason |
---|---|
“10002” | Invalid parameter. |
“10003” | Failed to create a token. |
“DEVICE_ALREADY_BIND” | Strong binding error. The device is already bound with a user. Pairing can work only after the device is unbound from the current user. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback