Set network settings command
Sets the status of the specified network settings: wifi, data (only for devices with a valid SIM card installed), and/or airplane-mode.
If the device does not reconnect when the radio signal is turned on, you may need to do one of the following:
- Reboot the device
- Turn airplane mode off and immediately back on
Parameters
Name |
Type |
Possible values |
Description |
---|---|---|---|
Device ID* |
Device |
|
The device for this command. By default, this is the device under test (DUT). |
WiFi |
String |
Enabled | Disabled |
Enable/disable the device WiFi. |
Data |
String |
Enabled | Disabled |
Enable/disable the device data from the mobile carrier. The device must have a SIM. Available for Android version 2.3 to 4.4. |
Airplane mode |
String |
Enabled | Disabled |
Enable/disable the device Airplane mode. Tip: If this parameter does not work on the Android version you are working with, try using the
command parameter of the mobile:handset:shell command instead, as follows:
Copy
This solution seems to work for Android versions 10 and later. |
Radio mode |
String |
Enabled | Disabled |
Enable/disable the device radio signal. |
Comment |
String |
Adds a comment to the script. |
|
On-fail Result* |
Condition |
Ignore | Break | Continue | Abort | Catch |
The behavior when the command fails. |
* Mandatory parameter