This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
Operation failed.
Description
When an API with the SysCap SystemCapability.Communication.WiFi.Core is called, an unknown error occurs inside the Wi-Fi service.
Possible Causes
Solution
Different error messages are reported depending on the actual cause of the error, as described below.
Error Message
Operation failed.
Description
Communication with the Wi-Fi service is abnormal, and Wi-Fi chip communication is abnormal.
Possible Causes
The startScan API reports an error. The system-level Wi-Fi scanning service is unavailable, which may be caused by an abnormal service process, an abnormal driver state, or excessively frequent API calls (more than four scans within two minutes).
The getScanInfoList API reports an error. An abnormal internal system state prevents the scan result list from being returned, which is usually a temporary fault in the Wi-Fi service or driver layer.
The addCandidateConfig API reports an error.
Solution
Check the system service status logs to confirm whether the Wi-Fi scanning service is running properly. Turn off and on the Wi-Fi function. If the issue persists, restart the device to recover the scanning service.
Turn off and on the Wi-Fi function. If the issue persists, restart the device to recover the scan result query service.
addCandidateConfig API error.
Error Message
Flight mode is enabled.
Description
The airplane mode being enabled causes a function exception.
Possible Causes
A system service exception occurs. The system service related to airplane mode switching is abnormal and does not correctly respond to Wi-Fi requests.
Solution
Error Message
Operation failed because the service is being closed.
Description
The Wi-Fi service, including P2P or hotspot, is being closed, causing a function exception.
Possible Causes
The P2P or hotspot service is being stopped, and the Wi-Fi service is being closed or restarted. System resources are insufficient, memory or CPU resources are strained, and the system reclaims the Wi-Fi service process.
Solution
Error Message
Scanning service is not enabled.
Description
The scanning service is not enabled, causing a function exception.
Possible Causes
The scanning function is not initialized. The Wi-Fi scanning module is not properly initialized or started.
Solution
Error Message
AP service is not enabled.
Description
The AP service is not enabled, causing a function exception.
Possible Causes
The hotspot function is not enabled, the Wi-Fi hotspot switch is off, and the AP service is unavailable. Airplane mode restriction: the AP function is disabled when airplane mode is on.
Solution
Error Message
Configuration is invalid.
Description
When obtaining or deleting a candidate network, the input netid is invalid, causing the query or deletion to fail.
Possible Causes
The configuration parameter is empty. The input configuration parameter is a null pointer or an empty string.
Solution
Error Message
P2P MAC address not found.
Description
The P2P MAC address is not found, causing a function exception.
Possible Causes
The P2P function is not enabled or P2P is not initialized.
Solution
Error Message
P2P MAC address format error.
Description
A P2P MAC address format error causes a function exception.
Possible Causes
The MAC address is empty.
Solution
Error Message
P2P internal service exception.
Description
A P2P internal service exception causes a function exception.
Possible Causes
The P2P service is abnormal. The Wi-Fi P2P internal service process crashes or does not respond.
Solution
Error Message
P2P wrong parameter size.
Description
The P2P wrong parameter size causes a function exception.
Possible Causes
The network name is too long, and the SSID length exceeds the maximum limit.
Solution
Error Message
moving freeze scanning control.
Description
Wi-Fi scanning is controlled in the stationary state.
Possible Causes
When the device is stationary, Wi-Fi scanning is automatically disabled to save power.
Solution
Error Message
Wi-Fi STA disabled.
Description
The Wi-Fi STA function is disabled.
Possible Causes
The Wi-Fi function is disabled.
Solution
Enable the Wi-Fi function.
Error Message
The user does not respond.
Description
When an application connects to a candidate network, the application prompts the user whether to trust and establish the connection. The user does not respond to the connection request.
Possible Causes
Solution
The user needs to agree to the request for connecting to the candidate network.
Error Message
The user refused the action.
Description
When an application connects to a candidate network, the application prompts the user whether to trust and establish the connection. The user cancels the connection request.
Possible Causes
The user clicks Cancel to reject the connection.
Solution
The user needs to agree to the request for connecting to the candidate network.
Error Message
Parameter validation failed.
Description
An error occurs during parameter verification.
Possible Causes
The parameter value range is incorrect.
Solution
Rectify the fault according to the parameter restrictions of the API.
Error Message
Operation failed.
Description
An unknown error occurs when the Wi-Fi service performs Hotspot-related operations internally.
Possible Causes
Solution
Error Message
Operation failed.
Description
An unknown error occurs when the Wi-Fi service performs AP extension-related operations internally.
Possible Causes
Solution
Error Message
Operation failed.
Description
An unknown error occurs when the Wi-Fi service performs P2P-related operations internally.
Possible Causes
Solution
Error Message
Wi-Fi P2P disabled.
Description
An error occurs when the Wi-Fi service performs a P2P-related operation.
Possible Causes
Solution