prampec / IotWebConf

ESP8266/ESP32 non-blocking WiFi/AP web configuration Arduino library
MIT License
523 stars 140 forks source link

v3.2.1 works on ESP32E but not on ESP32D #258

Open societyofrobots opened 2 years ago

societyofrobots commented 2 years ago

summary: Compiled code fails on ESP 32D, but works as intended on ESP 32E. Both examples below use same firmware, just different chip.

The ESP 32D works fine with IotWebConf v2, but not the latest latest 3.2.1. If I remember right, the ESP32D was purchased in early 2020, and the ESP32E was purchased in late 2021.

I would get this error with the 32D, won't connect either WiFi or BLE:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_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:1
load:0x3fff0030,len:1184
load:0x40078000,len:12804
ho 0 tail 12 room 4
load:0x40080400,len:3032
entry 0x400805e4
E (339) psram: PSRAM ID read error: 0xffffffff
[     4][W][esp32-hal-psram.c:61] psramInit(): PSRAM init failed!

bootup completeState changing from: 0 to 2
Setting up AP: Control_System
Use password: <hidden>
AP IP address: 192.168.4.1
AP timeout (ms): 60000
State changed from: 0 to 2
Connection to AP.
Disconnected from AP.
State changing from: 2 to 3
E (26334) wifi_netif: esp_wifi_internal_reg_rxcb for if=1 failed with 12289
E (26335) wifi_init_default: esp_wifi_register_if_rxcb fCor if=0x3ffcec68 failed with 259
onnecting to [P_Mobile] (password is hidden)
WiFi timeout (ms): 30000
State changed from: 2 to 3
[ 29202][W][WiFiGeneric.cpp:852] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 32347][W][WiFiGeneric.cpp:852] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 35492][W][WiFiGeneric.cpp:852] _eventCallback(): Reason: 201 - NO_AP_FOUND
Giving up.
State changing from: 3 to 2
Setting up AP: Control_System
Use password: <hidden>
AP IP address: 192.168.4.1
AP timeout (ms): 60000
State changed from: 3 to 2
Connection to AP.
Disconnected from AP.
State changing from: 2 to 3
E (63948) wifi_init_default: esp_wifi_get_mac failed with 12289
Connecting to [P_Mobile] (password is hidden)
WiFi timeout (ms): 30000
State changed from: 2 to 3
[ 66799][W][WiFiGeneric.cpp:852] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 69943][W][WiFiGeneric.cpp:852] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 73089][W][WiFiGeneric.cpp:852] _eventCallback(): Reason: 201 - NO_AP_FOUND
WiFi connected
IP address: 255.255.255.255
State changing from: 3 to 4
[ 80072][W][ESPmDNS.cpp:222] queryService(): No results found!
Active mDNS services: 0 
Accepting connection
State changed from: 3 to 4

I then use the exact same firmware on an ESP32E, which works, and get this:

rst:0x1 (POWERON_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:1
load:0x3fff0030,len:1184
load:0x40078000,len:12804
ho 0 tail 12 room 4
load:0x40080400,len:3032
entry 0x400805e4
E (340) psram: PSRAM ID read error: 0xffffffff
[     4][W][esp32-hal-psram.c:61] psramInit(): PSRAM init failed!
Config version: v1.03  June 4, 2022
Config size: 172
[    75][W][EEPROM.cpp:81] begin(): truncating EEPROM from 178 to 176
Wrong config version. Applying defaults.
[iwcAll]
|-- [iwcSys]
|   |-- 'iwcThingName' with value: 'Control_System'
|   |-- 'iwcApPassword' with value: <hidden>
|   |-- [iwcWifi0]
|   |   |-- 'iwcWifiSsid' with value: ''
|   |   \-- 'iwcWifiPassword' with value: <hidden>
|   |-- 'iwcApTimeout' with value: '30'
|   \-- 'blestringParam' with value: ''
|-- [iwcCustom]
\-- [hidden]
Wifi Ready.

Listening for bluetooth client connection. Will connect automatically if found.

BLE encryption characteristic defined.

bootup completeAP password was not set in configuration
State changing from: 0 to 1
Setting up AP: Control_System
With default password: <hidden>
AP IP address: 192.168.4.1
AP password was not set.
WiFi SSID was not set.
Will stay in AP mode.
State changed from: 0 to 1
Connection to AP.
[ 30683][E][WiFiClient.cpp:499] flush(): fail on fd 50, errno: 11, "No more processes"
[ 30688][E][WiFiClient.cpp:297] setSocketOption(): 1006 : 9