Start WiFi station and connect to router by net manager
Overview
This example demonstrates how to quickly start a WiFi station and connect to a specified router through Net Manager.
Requirements
We need an AP that can connect normally.
Configure WiFi SSID and WiFi Password in menuconfig.
SSID configuration path: Net manager example configuration -> WiFi SSID.
Password configuration path: Net manager example configuration -> WiFi Password.
Building and flashing
Example Location:examples/network/net_manager/wifi_station
compile, burn, and more, see: get started
Running result
Successfully running will output the following logs
I/wm_nm_wifi [0.688] start connecting wm_wifi(12345678)
D/wm_nm_core [0.866] distribution WM_WIFI_EV event 1
I/wm_nm_core [0.868] wm_wifi is connected
I/wm_nm_core [0.868] add w_sta netif
D/wifi [0.870] distribution event 1
D/wifi [0.870] sta connected 6C-CD-D6-EC-79-61 channel 1 authmode 3
D/wm_nm_core [2.006] distribution WM_LWIP_EV event 1
I/wm_nm_core [2.008] sta got ip6: FE80:0000:0000:0000:2A6D:CEFF:FE32:B4E5
D/wm_nm_core [2.008] distribution WM_LWIP_EV event 0
I/wm_nm_core [2.008] sta got ip: 192.168.1.2
D/wm_nm_core [2.008] WM_NM_EV post event 4 succes