This is the documentation for the latest (main) development branch. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

station

Overview

This example demonstrates how to use the Wi-Fi station feature.

Requirements

  1. A properly connected AP is required.

  2. Configure WiFi SSID and WiFi Password in menuconfig.

Building and flashing

Example Location: examples/wifi/station

compile, burn, and more, see: get started

Running result

Successfully running will output the following logs

D/main            [0.002] boot reason 0
D/main            [0.004] heap size 270848(264.50KB)
D/fls             [0.010] flash size 0x200000(2MB)
D/ptb             [0.014] partition table base 0x800e000
D/ft              [0.020] ft_0 base 8000000, ft_1 base 8001000
D/ft              [0.026] ft init too
D/ft              [0.030] ft init error
E/nvs             [0.034] use new hash entry num=53
I/ota_http        [0.040] 0.3.0 build at Jun 13 2024 10:34:10
I/wifi station    [2.296] wifi_init_sta finished.
I/wifi station    [8.688] retry to connect to the AP
I/wifi station    [8.694] connect to the AP fail
D/wifi            [8.698] distribution event 2
D/wifi            [8.702] sta disconnected reason 2
D/wifi            [9.490] distribution event 1
D/wifi            [9.494] sta connected 42-C1-82-80-2A-15 channel 6 authmode 3
I/wifi station    [10.182] got ip: 192.168.3.102
D/wifi            [10.186] distribution event 0
D/wifi            [10.192] sta got ip 192.168.3.102
I/wifi station    [10.196] connected to ap SSID:Test-WiFi password:11111111