• registerWifiApDevice(ssid: string, password: string, timeout: number, token: string): Promise<any>
  • Register wifi device by AP Mode
    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.registerWifiApDevice(
    "ssid",
    "password",
    90,
    "token"
    ).then(
    (okRes: any) => {
    debugText("Ok Res")
    assignedWifiDevId = okRes.devId
    console.log("DevID: " + assignedWifiDevId)
    },
    (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

    • token: string

      token value from reqTokenForWifiAp

    Returns Promise<any>