doesn't work
Closed this issue · 11 comments
Hi,
I tried the example but unfortunately it doesn't work: the webserver won't listen on port 80 causing all clients to give a connection refused error.
Not with -DASYNC_WEBSERVER=false either (yes I made correct code changes for that).
What Webserver do you use?
I tried both the async as well as the old version.
If it makes any difference:
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
[ 6][E][WiFiGeneric.cpp:678] wifiLowLevelInit():����}ݥ��}���с4353
[ 167][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND
[WIFI] Unable to load data from NVS, giving up...
[WIFI] No SSIDs configured in NVS, unable to connect.
[WIFI] Starting configuration portal on AP SSID ESP_1623039612
[WIFI] AP mode started!
[WIFI] AP created. My IP is: 192.168.4.1
[WIFI] AP mode stopped!
[WIFI] AP mode started!
Go!
[WIFI] No SSIDs configured in NVS, unable to connect.
[WIFI] No SSIDs configured in NVS, unable to connect.
[WIFI] New client connected to softAP!
[WIFI] Not trying to connect, as SoftAP has 1 clients connected!
Can you share the code snipped that you try to run?
I commented out any changes I made myself (to the example code) but the web-server is not listening at all in any case.
E.g.:
folkert@snsv ~ $ ping 192.168.4.1
PING 192.168.4.1 (192.168.4.1) 56(84) bytes of data.
64 bytes from 192.168.4.1: icmp_seq=1 ttl=255 time=90.3 ms
64 bytes from 192.168.4.1: icmp_seq=2 ttl=255 time=34.1 ms
^C
--- 192.168.4.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 34.061/62.168/90.276/28.107 ms
folkert@snsv ~ $ telnet 192.168.4.1 80
Trying 192.168.4.1...
telnet: Unable to connect to remote host: Connection refused
I think the example wasn't updated. Please give me a bit time to update the example to represent the latest state.
Thanks in advance!
Done, the problem is with the ESP32_AsyncWebserver. In my example the webserver is initialized in the setup()
function, but this won't work as it has to get initialized in a global scope.
To make it more clear what's required, the example now is a full project ready to get build and run with platformio.
Hope that helps, good luck!
Works! Thanks for your help!