• registerWifiEzDevice(ssid: string, password: string, timeout: number): Promise<any>
  • Register wifi device by EZ Mode

    !!! Registering must be one device at a time.

    If you try to register multiple devices at the same time, you will receive only one registration event and no other events.

    In case success registration, Thing name is made by combination(building/dong/ho/user (zGuard meta info.)

    Returns

    Success and failure details as a result

    • in case OK: ref
    • in case Processing: registerWifiEzDevice is started
    • in case Occur Timeout: Timeout

    Example

    iot-device-sdk.registerWifiEzDevice(
    "ssid",
    "password",
    90
    ).then(
    (okRes: any) => {
    debugText("Ok Res")
    assignedGwId = okRes.devId
    console.log(assignedGwId)
    console.log(okRes)
    },
    (errRes) => {
    debugText("Ng Res")
    console.log(errRes)
    }
    )

    Parameters

    • ssid: string

      The name of the Wi-Fi network to which a paired device is connected

    • password: string

      The password of the Wi-Fi network to which a paired device is connected

    • timeout: number

      maximum timeout for wifi devices registration, unit is seconds

    Returns Promise<any>