softap
Overview
This example demonstrates how to use the softap feature for Wi-Fi.
Requirements
Configure WiFi SSID and WiFi Password in menuconfig
The number of AP channels WiFi Channel and the maximum number of station connections Maximal STA connections can be configured in menuconfig if desired
Building and flashing
Example Location: examples/wifi/softap
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 270792(264.45KB)
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:44:06
I/wifi softap [0.046] WM_WIFI_MODE_AP
D/wifi [2.278] distribution event 5
D/wifi [2.282] softap started
I/wifi softap [2.290] wifi_init_softap finished. SSID:test-WiFi password:11111111 channel:1
I/wifi softap [29.530] station 7E-B1-7B-28-F3-55 join, AID=1
D/wifi [29.536] distribution event 7
D/wifi [29.540] sta 7E-B1-7B-28-F3-55 aid 1 joined softap
D/dhcps [29.918] ClientMacAddr=7E-B1-7B-28-F3-55, MsgType=1, ReqIpAddr=0.0.0.0, ServerIp=0.0.0.0
D/dhcps [29.930] sent dhcp offer, ClientMacAddr=7E-B1-7B-28-F3-55, GivenIpAddr=192.168.10.2, ServerIp=192.168.10.1
D/dhcps [29.948] ClientMacAddr=7E-B1-7B-28-F3-55, MsgType=3, ReqIpAddr=192.168.10.2, ServerIp=192.168.10.1
D/dhcps [29.960] sent dhcp ack, ClientMacAddr=7E-B1-7B-28-F3-55, GivenIpAddr=192.168.10.2, ServerIp=192.168.10.1
D/wifi [29.974] distribution event 4
D/wifi [29.978] sta 7E-B1-7B-28-F3-55 assigned ip 192.168.10.2