Custom ESP32-S2 AUTH timeout issue

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Custom ESP32-S2 AUTH timeout issue

Postby while(1); » Mon May 02, 2022 9:32 pm

I have a new project board with ESP32-S2 it is working great. I am able to program it, it's connected to the LCD via SPI all is good, but When I run wifiMulti it reports the SSIDs but continues to disconnect for reason 2 AUTH_TIMEOUT.

I ran the same code on the Saola dev board and it worked. So I'm expecting something in the chip is different. Probably to do with the menuconfig settings being different.

I also suspect my antenna is not optimized, but the SSID scan shows only about a -2dB difference between the Saola module.

I am using VS code and PlatformIO. I also have ESP-IDF running is VS code but not as familiar.

Would a marginal antenna performance be the cause of this? Here is the debug output.

Code: Select all

16:27:25.127 > [ 13350][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: amusementconnect
16:27:25.127 > [ 13351][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: ACIoT
16:27:25.127 > [ 13354][I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: Amusement Connect -Spectrum  2G
16:27:25.127 > [ 13371][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 0 - WIFI_READY
16:27:25.197 > [ 13435][V][WiFiGeneric.cpp:283] _arduino_event_cb(): STA Started
16:27:25.197 > [ 13435][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 2 - STA_START
16:27:30.337 > [ 18555][V][WiFiGeneric.cpp:317] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 27
16:27:30.337 > [ 18556][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 1 - SCAN_DONE
16:27:30.337 > [ 18561][I][WiFiMulti.cpp:114] run(): [WIFI] scan done
16:27:30.337 > [ 18565][I][WiFiMulti.cpp:119] run(): [WIFI] 27 networks found
16:27:30.337 > [ 18571][D][WiFiMulti.cpp:151] run():        0: [8][B8:27:EB:E3:D6:9B] ACtest (-49) *
16:27:30.337 > [ 18579][D][WiFiMulti.cpp:149] run():  --->   1: [11][02:EC:DA:F4:6F:D5] ACIoT (-49) *
16:27:30.337 > [ 18586][D][WiFiMulti.cpp:151] run():        2: [1][44:D9:E7:B1:66:16] Lohr Guest (-50) *
16:27:30.394 > [ 18594][D][WiFiMulti.cpp:149] run():  --->   3: [11][FC:EC:DA:F4:6F:D5] amusementconnect (-50) *
16:27:30.394 > [ 18603][D][WiFiMulti.cpp:151] run():        4: [1][46:D9:E7:B1:66:16] Lohr Cave & KC Secure (-51) *
16:27:30.394 > [ 18612][D][WiFiMulti.cpp:149] run():  --->   5: [6][90:1A:CA:5F:FE:B0] Amusement Connect -Spectrum  2G (-51) *
16:27:30.394 > [ 18621][D][WiFiMulti.cpp:151] run():        6: [11][98:1E:19:21:BE:7E] MySpectrumWiFi78-2G (-51) *
16:27:30.394 > [ 18630][D][WiFiMulti.cpp:149] run():  --->   7: [6][FC:EC:DA:F4:6B:36] amusementconnect (-53) *
16:27:30.438 > [ 18639][D][WiFiMulti.cpp:149] run():  --->   8: [6][02:EC:DA:F4:6B:36] ACIoT (-55) *
16:27:30.438 > [ 18646][D][WiFiMulti.cpp:149] run():  --->   9: [1][02:EC:DA:F4:6B:74] amusementconnect (-56) *
16:27:30.438 > [ 18655][D][WiFiMulti.cpp:151] run():        10: [1][EC:8C:A2:49:9A:63] Recover.Me-099A60 (-57) *
16:27:30.438 > [ 18663][D][WiFiMulti.cpp:149] run():  --->   11: [6][02:EC:DA:32:F6:67] ACIoT (-59) *
16:27:30.438 > [ 18671][D][WiFiMulti.cpp:151] run():        12: [1][20:58:69:14:67:58] Spectrum (-62) *
16:27:30.482 > [ 18679][D][WiFiMulti.cpp:151] run():        13: [1][20:58:69:54:67:58] Spectrum Mobile (-62) *
16:27:30.482 > [ 18687][D][WiFiMulti.cpp:151] run():        14: [1][20:58:69:94:67:58] Spectrum Free Trial (-62)  
16:27:30.482 > [ 18696][D][WiFiMulti.cpp:149] run():  --->   15: [6][FC:EC:DA:32:F6:67] amusementconnect (-62) *
16:27:30.482 > [ 18704][D][WiFiMulti.cpp:151] run():        16: [11][54:2B:57:04:4C:99] NVR542b57044c99 (-65) *
16:27:30.482 > [ 18713][D][WiFiMulti.cpp:151] run():        17: [11][38:4C:90:9C:6D:E0] DG1670AE2 (-69) *
16:27:30.482 > [ 18721][D][WiFiMulti.cpp:151] run():        18: [11][C2:B5:D7:3E:BD:1C] DIRECT-1c-HP M130f LaserJet (-71) *
16:27:30.527 > [ 18730][D][WiFiMulti.cpp:151] run():        19: [2][00:17:C5:86:1F:D7] LohrDist (-73) *
16:27:30.527 > [ 18738][D][WiFiMulti.cpp:151] run():        20: [1][90:1A:CA:73:E9:10] DG1670A12 (-79) *
16:27:30.527 > [ 18746][D][WiFiMulti.cpp:151] run():        21: [11][78:71:9C:92:F5:20] ThePhantom (-79) *
16:27:30.527 > [ 18754][D][WiFiMulti.cpp:151] run():        22: [6][34:8F:27:51:EE:98] Spectrum Mobile (-82) *
16:27:30.527 > [ 18762][D][WiFiMulti.cpp:151] run():        23: [6][34:8F:27:91:EE:98] Spectrum Free Trial (-82)  
16:27:30.564 > [ 18771][D][WiFiMulti.cpp:151] run():        24: [6][34:8F:27:11:EE:98] Spectrum (-82) *
16:27:30.564 > [ 18779][D][WiFiMulti.cpp:151] run():        25: [1][E8:ED:05:77:D5:A0] TOG (-85) *
16:27:30.564 > [ 18786][D][WiFiMulti.cpp:151] run():        26: [1][10:0C:6B:65:AA:C5] NETGEAR_EXT (-87)  
16:27:30.564 > [ 18794][I][WiFiMulti.cpp:160] run(): [WIFI] Connecting BSSID: 02:EC:DA:F4:6F:D5 SSID: ACIoT Channel: 11 (-49)
16:27:30.576 > [ 18816][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:32.727 > [ 20948][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:32.727 > [ 20949][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:32.727 > [ 20956][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:32.727 > [ 20963][D][WiFiGeneric.cpp:889] _eventCallback(): WiFi Reconnect Running
16:27:32.731 > [ 20981][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:33.878 > [ 22098][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:33.879 > [ 22099][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:33.879 > [ 22105][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:33.879 > [ 22112][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:33.890 > [ 22131][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:34.993 > [ 23223][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:34.993 > [ 23224][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:34.993 > [ 23231][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:34.993 > [ 23237][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:35.061 > [ 23302][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:35.592 > [ 23850][E][WiFiMulti.cpp:187] run(): [WIFI] Connecting Failed (6).
16:27:36.128 > [ 24349][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:36.128 > [ 24350][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:36.128 > [ 24357][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:36.128 > [ 24364][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:36.142 > [ 24383][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:37.243 > [ 25476][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:37.243 > [ 25477][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:37.243 > [ 25484][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:37.243 > [ 25491][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:37.318 > [ 25561][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:38.370 > [ 26601][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:38.370 > [ 26602][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:38.370 > [ 26609][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:38.370 > [ 26616][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:38.385 > [ 26635][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:39.505 > [ 27727][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:39.507 > [ 27728][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:39.507 > [ 27735][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:39.507 > [ 27741][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:39.606 > [ 27857][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:40.735 > [ 28955][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:40.735 > [ 28956][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:40.735 > [ 28963][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:40.735 > [ 28969][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:40.747 > [ 28989][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:41.860 > [ 30081][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:41.860 > [ 30082][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:41.860 > [ 30089][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:41.860 > [ 30095][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:41.873 > [ 30114][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:42.985 > [ 31207][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:42.985 > [ 31208][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:42.985 > [ 31214][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:42.985 > [ 31221][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:43.047 > [ 31290][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:44.106 > [ 32333][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:44.106 > [ 32333][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:44.106 > [ 32340][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:44.106 > [ 32347][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:44.124 > [ 32366][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:45.235 > [ 33458][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:45.235 > [ 33459][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:45.235 > [ 33466][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
16:27:45.235 > [ 33472][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
16:27:45.297 > [ 33540][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
16:27:46.360 > [ 34584][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: ACIoT, BSSID: 02:ec:da:f4:6f:d5, Reason: 2
16:27:46.360 > [ 34585][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
16:27:46.360 > [ 34592][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
Thanks ahead for any help.
Mike.

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Custom ESP32-S2 AUTH timeout issue

Postby ESP_Sprite » Tue May 03, 2022 1:32 am

Could also be a power supply issue (ripple on the PSU, or bad decoupling). Is this a custom PCB?

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Re: Custom ESP32-S2 AUTH timeout issue

Postby while(1); » Tue May 03, 2022 2:13 pm

I will check. This is a good assumption as I have seen more than expected noise on my scope when probing some signals. I will let you know what I find today.

Thanks,

Mike.

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Re: Custom ESP32-S2 AUTH timeout issue

Postby while(1); » Wed May 11, 2022 2:40 pm

As far as I can measure I have half the RMS AC on the 3.3V rail than the ESP32-S2 dev board. I am seeing 11mV rms noise where as there is 22mV rms noise on the Espressif board. I only have a 50MHz scope though.

I spent a week tuning the antenna circuit and the the AUTH timeout still occurs. I ran the sample soft AP application and the AP is not visible on my phone. I checked the same on the dev module, and I can see it. Antenna tuning screen grab attached.

I tried another board thinking it might just be the first board from the JLCPCB shipment and it too has the same AUTH timeout error.

Is there some configuration fuse I'm missing since these are raw ESP32-S2FH4 from JLCPCB inventory and not a pre-tested module.

Thanks,

Mike.

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Re: Custom ESP32-S2 AUTH timeout issue

Postby while(1); » Wed May 11, 2022 6:52 pm

I have just discovered that Espressif has the ESP-BAT32 signal board for production testing of the radio, so I bought one from DigiKey. They also have a great 34 page Production Testing Guide that I'm studying now.

Thanks,

Mike.

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Re: Custom ESP32-S2 AUTH timeout issue

Postby while(1); » Tue Jun 14, 2022 7:21 pm

Just to close this one out, I found the issue was with the 40MHz crystal loading capacitors. I choose values that were a bit light. I upped these according to:
https://community.nxp.com/t5/LPC-FAQs/H ... m-p/464589

And came up with a solution and the WiFi transmitting started worrking just great!

Thanks.

willz1200
Posts: 11
Joined: Tue Oct 30, 2018 4:28 pm
Location: United Kingdom
Contact:

Re: Custom ESP32-S2 AUTH timeout issue

Postby willz1200 » Sat Jan 14, 2023 10:42 pm

Thanks so much for posting the update on this thread! I had the exact same issue.
Sure enough my crystal load capacitors were marginal after changing the board stack-up, increased them slightly and I can now connect to all my access points!
Thanks again, been trying to figure this out for days!

while(1);
Posts: 18
Joined: Mon May 02, 2022 9:03 pm

Re: Custom ESP32-S2 AUTH timeout issue

Postby while(1); » Mon Jan 16, 2023 2:09 am

Willz1200 - Also note that the default clock circuit shows a zero ohm resistor in series between the crystal and the ESP32. After a board review it was suggested to start with a 24nH inductor in place of the zero ohm. This is for tweaking the Wi-Fi center frequency as the CW is derived from the 40MHz crystal. I have had success at the FCC lab with 22uH as it seems more common. I hear that Europe is concerned with the tolerance of the CW frequency more than FCC.

Good Luck!

Mike.

Who is online

Users browsing this forum: No registered users and 79 guests