diff --git a/android/src/main/java/com/espidfprovisioning/EspIdfProvisioningModule.kt b/android/src/main/java/com/espidfprovisioning/EspIdfProvisioningModule.kt index 3c02e63..c9a0c15 100644 --- a/android/src/main/java/com/espidfprovisioning/EspIdfProvisioningModule.kt +++ b/android/src/main/java/com/espidfprovisioning/EspIdfProvisioningModule.kt @@ -356,8 +356,8 @@ class EspIdfProvisioningModule internal constructor(context: ReactApplicationCon wifiList?.forEach { item -> val resultMap = Arguments.createMap() resultMap.putString("ssid", item.wifiName) + resultMap.putInt("rssi", item.rssi) resultMap.putInt("auth", item.security) - resultArray.pushMap(resultMap) } diff --git a/ios/EspIdfProvisioning.swift b/ios/EspIdfProvisioning.swift index 9658ded..82c3d80 100644 --- a/ios/EspIdfProvisioning.swift +++ b/ios/EspIdfProvisioning.swift @@ -152,7 +152,8 @@ class EspIdfProvisioning: NSObject { resolve(wifiList!.map {[ "ssid": $0.ssid, - "bssid": $0.bssid, + "bssid": $0.bssid.toHexString(), + "rssi": $0.rssi, "auth": $0.auth.rawValue, "channel": $0.channel ]}) diff --git a/src/types.ts b/src/types.ts index 5e7acf6..883de7e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -31,9 +31,10 @@ export interface ESPDeviceInterface { export interface ESPWifiList { ssid: string; - bssid: string; + rssi: number; auth: ESPWifiAuthMode; - channel: number; + bssid?: string; + channel?: number; } export interface ESPStatusResponse {