espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.37k stars 7.21k forks source link

file serving demo wifi keep disconnecting (IDFGH-13700) #14572

Open Tracker647 opened 6 days ago

Tracker647 commented 6 days ago

Answers checklist.

IDF version.

5.2.1

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

PowerShell

What is the expected behavior?

flash the program, the board shoule be a wifi AP, connect the AP than will found serial output show DHCP assign new ip to client, then can access web page by browser enter url 192.168.4.1

What is the actual behavior?

the board seems become a STA to connect other wifi and keep output ”wifi disconnected“,can not find the wifi id what I set in menuconfig, inaccessible to webpage.

Steps to reproduce.

  1. select file_serving example
  2. simple build and flash ...

Build or installation Logs.

I (768) wifi:mode : sta (3c:

[2024-09-13 23:41:13.630]# RECV ASCII>
84:27:9f:9e:54)
I (778) wifi:enable tsf
I (778) example_connect: Connecting to myssid...
I (778) example_connect: Waiting for IP(s)

[2024-09-13 23:41:16.043]# RECV ASCII>
I (3188) example_connect: Wi-Fi disconnected, trying to reconnect...

[2024-09-13 23:41:18.438]# RECV ASCII>
I (5588) example_connect: Wi-Fi disconnected, trying to reconnect...

[2024-09-13 23:41:20.845]# RECV ASCII>
I (7998) example_connect: Wi-Fi disconnected, trying to reconnect...

[2024-09-13 23:41:23.268]# RECV ASCII>
I (10408) example_connect: Wi-Fi disconnected, trying to reconnect...

[2024-09-13 23:41:25.676]# RECV ASCII>
I (12818) example_connect: Wi-Fi disconnected, trying to reconnect...

[2024-09-13 23:41:28.070]# RECV ASCII>
I (15228) example_connect: Wi-Fi disconnected, trying to reconnect...

More Information.

The demo default setting assuming that esp32 http server is a station, but a server should not be AP for devices to connect? Is I selected a wrong demo or incorrect configure? The board what I using is esp32c3.

nopnop2002 commented 1 day ago

flash the program, the board shoule be a wifi AP

No. This sample does not have the WiFi AP-MODE function. It will always be in WiFi STA-MODE. You will need to specify the router's SSID and password.