Configuring Wi-Fi access point credentials
==========================================

This sample uses the :ref:`lib_wifi_credentials` library to manage Wi-Fi credentials.
Before the sample can connect to a Wi-Fi network, you must configure at least one credential set.

Once you have flashed your device with this sample, connect to your device's UART interface and add credentials using the following command:

.. parsed-literal::
   :class: highlight

   wifi_cred add *NetworkSSID* *SecurityMode (OPEN, WPA2-PSK, WPA2-PSK-SHA256, WPA3-SAE)* *NetworkPassword*

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.
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.
Then either reboot the device or use the ``wifi_cred auto_connect`` command to manually trigger a connection attempt.

From now on, these credentials will be automatically used when the configured network is reachable.

When building as firmware image for a non-secure board target, the Wi-Fi credentials backend will be set to PSA using TF-M.

See the :ref:`wifi_shell_sample` sample document for more details on the ``wifi_cred`` command.
