From e67d782c9d2e3cf81d81e025c637109bfe079a14 Mon Sep 17 00:00:00 2001 From: "yanxiaotao@huawei.com" Date: Tue, 7 Feb 2023 09:03:02 +0800 Subject: [PATCH] add error code in js-apis-wifiManager.md @2023-02-07. Signed-off-by: yanxiaotao@huawei.com --- .../reference/apis/js-apis-wifiManager.md | 176 +++++++++--------- .../reference/apis/js-apis-wifiManagerExt.md | 54 ++++-- .../reference/errorcodes/errorcode-wifi.md | 37 +++- 3 files changed, 160 insertions(+), 107 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md b/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md index f6fb0356a8..31c3a192e7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md @@ -35,7 +35,7 @@ enableWifi(): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.disableWifi9+ @@ -62,7 +62,7 @@ disableWifi(): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.isWifiActive9+ @@ -86,7 +86,7 @@ isWifiActive(): boolean | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.scan9+ @@ -110,7 +110,7 @@ scan(): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.getScanResults9+ @@ -134,7 +134,7 @@ getScanResults(): Promise<Array<WifiScanInfo>> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.getScanResults9+ @@ -158,7 +158,7 @@ getScanResults(callback: AsyncCallback<Array<WifiScanInfo>>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| **示例:** ```js @@ -299,7 +299,7 @@ getScanResultsSync():  Array<[WifiScanInfo](#wifiscaninfo)> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.addDeviceConfig9+ @@ -331,7 +331,7 @@ addDeviceConfig(config: WifiDeviceConfig): Promise<number> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## WifiDeviceConfig9+ @@ -481,7 +481,7 @@ addDeviceConfig(config: WifiDeviceConfig, callback: AsyncCallback<number>) | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.addCandidateConfig9+ @@ -511,7 +511,7 @@ addCandidateConfig(config: WifiDeviceConfig): Promise<number> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.addCandidateConfig9+ @@ -536,7 +536,7 @@ addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback<number&g | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.removeCandidateConfig9+ @@ -566,7 +566,7 @@ removeCandidateConfig(networkId: number): Promise<void> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.removeCandidateConfig9+ @@ -591,7 +591,7 @@ removeCandidateConfig(networkId: number, callback: AsyncCallback<void>): v | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.getCandidateConfigs9+ @@ -615,7 +615,7 @@ getCandidateConfigs():  Array<[WifiDeviceConfig](#wifideviceconfig)> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.connectToCandidateConfig9+ @@ -639,8 +639,8 @@ connectToCandidateConfig(networkId: number): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| -| 2501001 | Wifi is closed。| +| 2501000 | Operation failed.| +| 2501001 | Wifi is closed.| ## wifi.connectToNetwork9+ @@ -666,8 +666,8 @@ connectToNetwork(networkId: number): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| -| 2501001 | Wifi is closed。| +| 2501000 | Operation failed.| +| 2501001 | Wifi is closed.| ## wifi.connectToDevice9+ @@ -694,8 +694,8 @@ connectToDevice(config: WifiDeviceConfig): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| -| 2501001 | Wifi is closed。| +| 2501000 | Operation failed.| +| 2501001 | Wifi is closed.| ## wifi.disconnect9+ @@ -716,7 +716,7 @@ disconnect(): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.getSignalLevel9+ @@ -747,7 +747,7 @@ getSignalLevel(rssi: number, band: number): number | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.getLinkedInfo9+ @@ -771,8 +771,8 @@ getLinkedInfo(): Promise<WifiLinkedInfo> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| -| 2501001 | Wifi is closed。| +| 2501000 | Operation failed.| +| 2501001 | Wifi is closed.| ## wifi.getLinkedInfo9+ @@ -796,8 +796,8 @@ getLinkedInfo(callback: AsyncCallback<WifiLinkedInfo>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| -| 2501001 | Wifi is closed。| +| 2501000 | Operation failed.| +| 2501001 | Wifi is closed.| **示例:** ```js @@ -909,7 +909,7 @@ isConnected(): boolean | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.getSupportedFeatures9+ @@ -950,7 +950,7 @@ getSupportedFeatures(): number | **类型** | **说明** | | -------- | -------- | -| 2401000 | Operation failed。| +| 2401000 | Operation failed.| ## wifi.isFeatureSupported9+ @@ -981,7 +981,7 @@ isFeatureSupported(featureId: number): boolean | **类型** | **说明** | | -------- | -------- | -| 2401000 | Operation failed。| +| 2401000 | Operation failed.| ## wifi.getDeviceMacAddress9+ @@ -1007,7 +1007,7 @@ getDeviceMacAddress(): string[] | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.getIpInfo9+ @@ -1031,7 +1031,7 @@ getIpInfo(): IpInfo | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## IpInfo9+ @@ -1072,7 +1072,7 @@ getCountryCode(): string | **类型** | **说明** | | -------- | -------- | -| 2401000 | Operation failed。| +| 2401000 | Operation failed.| ## wifi.reassociate9+ @@ -1092,8 +1092,8 @@ reassociate(): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| -| 2501001 | Wifi is closed。| +| 2501000 | Operation failed.| +| 2501001 | Wifi is closed.| ## wifi.reconnect9+ @@ -1113,8 +1113,8 @@ reconnect(): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| -| 2501001 | Wifi is closed。| +| 2501000 | Operation failed.| +| 2501001 | Wifi is closed.| ## wifi.getDeviceConfigs9+ @@ -1140,7 +1140,7 @@ getDeviceConfigs():  Array<[WifiDeviceConfig](#wifideviceconfig)> | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.updateNetwork9+ @@ -1172,7 +1172,7 @@ updateNetwork(config: WifiDeviceConfig): number | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.disableNetwork9+ @@ -1198,7 +1198,7 @@ disableNetwork(netId: number): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.removeAllNetwork9+ @@ -1218,7 +1218,7 @@ removeAllNetwork(): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.removeDevice9+ @@ -1244,7 +1244,7 @@ removeDevice(id: number): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.enableHotspot9+ @@ -1264,7 +1264,7 @@ enableHotspot(): void | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## wifi.disableHotspot9+ @@ -1284,7 +1284,7 @@ disableHotspot(): void | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## wifi.isHotspotDualBandSupported9+ @@ -1302,7 +1302,7 @@ isHotspotDualBandSupported(): boolean | **类型** | **说明** | | -------- | -------- | - | boolean | true:支持, false:不支持。| + | boolean | true:支持, false:不支持.| **错误码:** @@ -1310,7 +1310,7 @@ isHotspotDualBandSupported(): boolean | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## wifi.isHotspotActive9+ @@ -1328,7 +1328,7 @@ isHotspotActive(): boolean | **类型** | **说明** | | -------- | -------- | - | boolean | true:已使能, false:未使能。| + | boolean | true:已使能, false:未使能.| **错误码:** @@ -1336,7 +1336,7 @@ isHotspotActive(): boolean | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## wifi.setHotspotConfig9+ @@ -1362,7 +1362,7 @@ setHotspotConfig(config: HotspotConfig): void | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## HotspotConfig9+ @@ -1405,7 +1405,7 @@ getHotspotConfig(): HotspotConfig | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## wifi.getStations9+ @@ -1431,7 +1431,7 @@ getStations():  Array<[StationInfo](#stationinfo9)> | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## StationInfo9+ @@ -1470,7 +1470,7 @@ getP2pLinkedInfo(): Promise<WifiP2pLinkedInfo> | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## WifiP2pLinkedInfo9+ @@ -1536,7 +1536,7 @@ getCurrentGroup(): Promise<WifiP2pGroupInfo> | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.getCurrentGroup9+ @@ -1560,7 +1560,7 @@ getCurrentGroup(callback: AsyncCallback<WifiP2pGroupInfo>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.getP2pPeerDevices9+ @@ -1584,7 +1584,7 @@ getP2pPeerDevices(): Promise<WifiP2pDevice[]> | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.getP2pPeerDevices9+ @@ -1608,7 +1608,7 @@ getP2pPeerDevices(callback: AsyncCallback<WifiP2pDevice[]>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## WifiP2pDevice9+ @@ -1662,7 +1662,7 @@ getP2pLocalDevice(): Promise<WifiP2pDevice> | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.getP2pLocalDevice9+ @@ -1703,7 +1703,7 @@ createGroup(config: WifiP2PConfig): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## WifiP2PConfig9+ @@ -1749,7 +1749,7 @@ removeGroup(): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.p2pConnect9+ @@ -1774,7 +1774,7 @@ p2pConnect(config: WifiP2PConfig): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| **示例:** ```js @@ -1859,7 +1859,7 @@ p2pCancelConnect(): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.startDiscoverDevices9+ @@ -1877,7 +1877,7 @@ startDiscoverDevices(): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.stopDiscoverDevices9+ @@ -1895,7 +1895,7 @@ stopDiscoverDevices(): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.deletePersistentGroup9+ @@ -1922,7 +1922,7 @@ deletePersistentGroup(netId: number): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.getP2pGroups9+ @@ -1948,7 +1948,7 @@ getP2pGroups(): Promise<Array<WifiP2pGroupInfo>> | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## WifiP2pGroupInfo9+ @@ -1993,7 +1993,7 @@ getP2pGroups(callback: AsyncCallback<Array<WifiP2pGroupInfo>>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.setDeviceName9+ @@ -2019,7 +2019,7 @@ setDeviceName(devName: string): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.on('wifiStateChange')9+ @@ -2044,7 +2044,7 @@ on(type: "wifiStateChange", callback: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| **状态改变事件的枚举:** @@ -2079,7 +2079,7 @@ off(type: "wifiStateChange", callback?: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| **示例:** ```js @@ -2127,7 +2127,7 @@ on(type: "wifiConnectionChange", callback: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.off('wifiConnectionChange')9+ @@ -2152,7 +2152,7 @@ off(type: "wifiConnectionChange", callback?: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.on('wifiScanStateChange')9+ @@ -2184,7 +2184,7 @@ on(type: "wifiScanStateChange", callback: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.off('wifiScanStateChange')9+ @@ -2209,7 +2209,7 @@ off(type: "wifiScanStateChange", callback?: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.on('wifiRssiChange')9+ @@ -2234,7 +2234,7 @@ on(type: "wifiRssiChange", callback: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.off('wifiRssiChange')9+ @@ -2259,7 +2259,7 @@ off(type: "wifiRssiChange", callback?: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2501000 | Operation failed。| +| 2501000 | Operation failed.| ## wifi.on('hotspotStateChange')9+ @@ -2293,7 +2293,7 @@ on(type: "hotspotStateChange", callback: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## wifi.off('hotspotStateChange')9+ @@ -2318,7 +2318,7 @@ off(type: "hotspotStateChange", callback?: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2601000 | Operation failed。| +| 2601000 | Operation failed.| ## wifi.on('p2pStateChange')9+ @@ -2353,7 +2353,7 @@ on(type: "p2pStateChange", callback: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.off('p2pStateChange')9+ @@ -2378,7 +2378,7 @@ off(type: "p2pStateChange", callback?: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.on('p2pConnectionChange')9+ @@ -2403,7 +2403,7 @@ on(type: "p2pConnectionChange", callback: Callback<WifiP2pLinkedInfo>): vo | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.off('p2pConnectionChange')9+ @@ -2428,7 +2428,7 @@ off(type: "p2pConnectionChange", callback?: Callback<WifiP2pLinkedInfo>): | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.on('p2pDeviceChange')9+ @@ -2453,7 +2453,7 @@ on(type: "p2pDeviceChange", callback: Callback<WifiP2pDevice>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.off('p2pDeviceChange')9+ @@ -2478,7 +2478,7 @@ off(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.on('p2pPeerDeviceChange')9+ @@ -2503,7 +2503,7 @@ on(type: "p2pPeerDeviceChange", callback: Callback<WifiP2pDevice[]>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.off('p2pPeerDeviceChange')9+ @@ -2528,7 +2528,7 @@ off(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): vo | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.on('p2pPersistentGroupChange')9+ @@ -2553,7 +2553,7 @@ on(type: "p2pPersistentGroupChange", callback: Callback<void>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.off('p2pPersistentGroupChange')9+ @@ -2578,7 +2578,7 @@ off(type: "p2pPersistentGroupChange", callback?: Callback<void>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.on('p2pDiscoveryChange')9+ @@ -2610,7 +2610,7 @@ on(type: "p2pDiscoveryChange", callback: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| ## wifi.off('p2pDiscoveryChange')9+ @@ -2635,4 +2635,4 @@ off(type: "p2pDiscoveryChange", callback?: Callback<number>): void | **类型** | **说明** | | -------- | -------- | -| 2801000 | Operation failed。| +| 2801000 | Operation failed.| diff --git a/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md b/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md index 637f78a84d..6b973ac78d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md +++ b/zh-cn/application-dev/reference/apis/js-apis-wifiManagerExt.md @@ -22,12 +22,13 @@ enableHotspot(): boolean; **系统能力:** SystemCapability.Communication.WiFi.AP.Extension -**返回值:** +**错误码:** - | **类型** | **说明** | - | -------- | -------- | - | boolean | 操作结果, true: 成功, false: 失败。 | +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| ## wifiext.disableHotspot @@ -39,12 +40,13 @@ disableHotspot(): boolean; **系统能力:** SystemCapability.Communication.WiFi.AP.Extension -**返回值:** +**错误码:** - | **类型** | **说明** | - | -------- | -------- | - | boolean | 操作结果, true: 成功, false: 失败。 | +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| ## wifiext.getSupportedPowerModel @@ -62,6 +64,13 @@ getSupportedPowerModel(): Promise<Array<PowerModel>> | -------- | -------- | | Promise<Array<[PowerModel](#powermodel)>> | Promise对象。表示功率模式。 | +**错误码:** + +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 + +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| ## PowerModel @@ -92,6 +101,13 @@ getSupportedPowerModel(callback: AsyncCallback<Array<PowerModel>>): | -------- | -------- | -------- | -------- | | callback | AsyncCallback<Array<[PowerModel](#powermodel)>> | 是 | 回调函数。当操作成功时,err为0,data表示支持的功率模式。如果error为非0,表示处理出现错误。 | +**错误码:** + +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 + +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| ## wifiext.getPowerModel @@ -109,6 +125,13 @@ getPowerModel(): Promise<PowerModel> | -------- | -------- | | Promise<[PowerModel](#powermodel)> | Promise对象。表示功率模式。 | +**错误码:** + +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 + +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| ## wifiext.getPowerModel @@ -126,6 +149,13 @@ getPowerModel(callback: AsyncCallback<PowerModel>): void | -------- | -------- | -------- | -------- | | callback | AsyncCallback<[PowerModel](#powermodel)> | 是 | 回调函数。当操作成功时,err为0,data表示功率模式。如果error为非0,表示处理出现错误。 | +**错误码:** + +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 + +| **类型** | **说明** | + | -------- | -------- | +| 2701000 | Operation failed.| ## wifiext.setPowerModel @@ -143,8 +173,10 @@ setPowerModel(model: PowerModel) : boolean; | -------- | -------- | -------- | -------- | | model | [PowerModel](#powermodel) | 是 | 功率模式。 | -**返回值:** +**错误码:** + +以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)。 - | **类型** | **说明** | +| **类型** | **说明** | | -------- | -------- | - | boolean | 操作结果, true: 成功, false: 失败。 | +| 2701000 | Operation failed.| diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-wifi.md b/zh-cn/application-dev/reference/errorcodes/errorcode-wifi.md index 6c38090e76..0d31e43a75 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-wifi.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-wifi.md @@ -40,7 +40,7 @@ WIFI服务内部执行STA相关操作时出现未知错误。 **处理步骤** 1. 重新执行打开或关闭WIFI。 -2. 重新执行打开或关闭WIFI,或重启设备。 +2. 仍然无法恢复时重启设备。 ## 2501001 STA功能未打开 @@ -54,13 +54,13 @@ WIFI STA功能被关闭。 **可能原因** -1. WIFI功能被关闭。 +WIFI功能被关闭。 **处理步骤** -1. 打开WIFI功能。 +打开WIFI功能。 -## 2601000 AP模块异常 +## 2601000 Hotspot模块异常 **错误信息** @@ -78,8 +78,29 @@ WIFI服务内部执行Hotspot相关操作时出现未知错误。 **处理步骤** -1. 重新执行打开或关闭WIFI热点功能。 -2. 重新执行打开或关闭WIFI热点功能,或重启设备。 +1. 重新执行打开或关闭WIFI Hotspot功能。 +2. 仍然无法恢复时重启设备。 + +## 2701000 AP扩展模块异常 + +**错误信息** + +Operation failed. + +**错误描述** + +WIFI服务内部执行Hotspot相关操作时出现未知错误。 + +**可能原因** + +1. 和WIFI服务建立通信异常。 +2. WIFI芯片通信异常。 +3. 其他未知错误。 + +**处理步骤** + +1. 重新执行打开或关闭WIFI Hotspot功能。 +2. 仍然无法恢复时重启设备。 ## 2801000 P2P模块异常 @@ -99,6 +120,6 @@ WIFI服务内部执行P2P相关操作时出现未知错误。 **处理步骤** -1. 重新执行打开或关闭WIFI。 -2. 重新执行打开或关闭WIFI,或重启设备。 +1. 重新执行打开或关闭WIFI功能。 +2. 仍然无法恢复时重启设备。 -- GitLab