React Native SDK
Wi-Fi Configuration
AP Configuration

ApConfig

Design Guidelines

Process

Code

import type { Types } from 'react-native-gizwits-sdk-v5';
 
const progressHandler: Types.GizProvideWiFiCredentialsCallback = event => {
  if (event.data === 'WIFI_CONFIG_SUCCESS' || event.data === 1013) {
    console.log('Provisioning succeeded');
  }
};
if (device.lanCapability.netStatus >= 1) {
  const result = await device.lanCapability.provideWiFiCredentials(
    ssid, password, 60, progressHandler,
  );
  if (!result.success) console.log(result.error, result.message);
}

timeout is in seconds. The current RN native bridge forces bindWithUid: false for LAN. If the AI module establishes its own cloud binding and supports BLE provisioning, use the manager call in BLE provisioning. For LAN-only devices, bridge support for this flag must be added first.