Skip to content

Commit d05aa89

Browse files
rado17rlubos
authored andcommitted
treewide: Modify the wifi_cred add command in examples
`wifi_cred add` is modified now. Update the examples in samples and documentation to reflect the same. Signed-off-by: Ravi Dondaputi <[email protected]>
1 parent a8c6c1a commit d05aa89

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

doc/nrf/includes/wifi_credentials_shell.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,24 @@ Once you have flashed your device with this sample, connect to your device's UAR
99
.. parsed-literal::
1010
:class: highlight
1111

12-
wifi_cred add *NetworkSSID* *SecurityMode (OPEN, WPA2-PSK, WPA2-PSK-SHA256, WPA3-SAE)* *NetworkPassword*
12+
wifi_cred add -s *NetworkSSID* -k *SecurityMode* -p *NetworkPassword*
1313

1414
Where *NetworkSSID* is replaced with the SSID of the Wi-Fi access point you want your device to connect to, and *NetworkPassword* is its password.
15+
*SecurityMode* is replaced by the number as listed here:
16+
17+
* 0:None
18+
* 1:WPA2-PSK
19+
* 2:WPA2-PSK-256
20+
* 3:SAE-HNP
21+
* 4:SAE-H2E
22+
* 5:SAE-AUTO
23+
* 6:WAPI
24+
* 7:EAP-TLS
25+
* 8:WEP
26+
* 9:WPA-PSK
27+
* 10:WPA-Auto-Personal
28+
* 11:DPP
29+
1530
If you are not sure which security mode to use, enable the :kconfig:option:`CONFIG_NET_L2_WIFI_SHELL` Kconfig option and use the ``wifi scan`` command to display a list of all accessible networks along with their corresponding security modes.
1631
Then either reboot the device or use the ``wifi_cred auto_connect`` command to manually trigger a connection attempt.
1732

samples/cellular/nrf_cloud_multi_service/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ Once your device has been flashed with this sample, you can add a credential by
10011001
.. parsed-literal::
10021002
:class: highlight
10031003
1004-
wifi_cred add *NetworkSSID* WPA2-PSK *NetworkPassword*
1004+
wifi_cred add -s *NetworkSSID* -k 1 -p *NetworkPassword*
10051005
10061006
Where *NetworkSSID* is replaced with the SSID of the Wi-Fi access point you want your device to connect to, and *NetworkPassword* is its password.
10071007
Then either reboot the device or use the ``wifi_cred auto_connect`` command to manually trigger a connection attempt.

samples/net/http_server/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ The following serial UART output is displayed in the terminal emulator when runn
289289
*** Booting nRF Connect SDK v3.4.99-ncs1-4667-g883c3709f9c8 ***
290290
[00:00:00.529,632] <inf> http_server: HTTP Server sample started
291291
[00:00:00.554,504] <inf> http_server: Network interface brought up
292-
uart:~$ wifi_cred add "cia-asusgold" WPA2-PSK thingy91rocks
292+
uart:~$ wifi_cred add -s "cia-asusgold" -k 1 -p thingy91rocks
293293
uart:~$ wifi_cred auto_connect
294294
[00:00:53.984,100] <inf> http_server: Network connected
295295
[00:00:53.985,778] <inf> http_server: Waiting for IPv6 HTTP connections on port 81, sock 9

samples/wifi/shell/README.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,20 @@ It adds the following subcommands to interact with the :ref:`lib_wifi_credential
272272
- Description
273273
* - add
274274
- | Add a network to the credentials storage with following parameters:
275-
| <SSID>
276-
| <Passphrase> (optional: valid only for secured SSIDs)
277-
| <BSSID> (optional)
278-
| <Band> (optional: 2.4GHz, 5GHz)
279-
| favorite (optional, makes the network higher priority in automatic connection)
275+
| <-s --ssid \"<SSID>\">: SSID.
276+
| [-c --channel]: Channel that needs to be scanned for connection. 0:any channel
277+
| [-b, --band] 0: any band (2:2.4GHz, 5:5GHz, 6:6GHz)
278+
| [-p, --passphrase]: Passphrase (valid only for secure SSIDs)
279+
| [-k, --key-mgmt]: Key management type.
280+
| 0:None, 1:WPA2-PSK, 2:WPA2-PSK-256, 3:SAE-HNP, 4:SAE-H2E, 5:SAE-AUTO, 6:WAPI,"
281+
| " 7:EAP-TLS, 8:WEP, 9: WPA-PSK, 10: WPA-Auto-Personal, 11: DPP
282+
| [-w, --ieee-80211w]: MFP (optional: needs security type to be specified)
283+
| : 0:Disable, 1:Optional, 2:Required.
284+
| [-m, --bssid]: MAC address of the AP (BSSID).
285+
| [-t, --timeout]: Duration after which connection attempt needs to fail.
286+
| [-a, --identity]: Identity for enterprise mode.
287+
| [-K, --key-passwd]: Private key passwd for enterprise mode.
288+
| [-h, --help]: Print out the help for the connect command.
280289
* - delete <SSID>
281290
- Removes network from credentials storage.
282291
* - list

0 commit comments

Comments
 (0)