ESP STA or AP wifi is not working

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

ESP STA or AP wifi is not working

Postby Ritesh » Mon Jan 30, 2017 8:32 am

Hi,

I have started development on ESP32 chip with existing ESP32-idf RTOS SDK and created one sample binary to connect with static SSID router and also created device into AP mode. Also, I have total 30 chip from which I am getting below issue into 2 chip in which not able to connect with router as well not able to device into AP mode.

It means both STA and AP mode are not working into that chip. As, I am getting below prints while reconnecting from ESP WiFi Event Handler.
I (2359) wifi: ap channel adjust o:6,1 n:1,1
I (2359) wifi: n:1 0, o:6 0, ap:1 1, sta:1 0, prof:6
I (3009) wifi: state: init -> auth (b0)
I (4009) wifi: state: auth -> init (2)
I (11786938) wifi: n:1 1, o:1 1, ap:1 1, sta:1 0, prof:1
I (11786938) wifi: state: init -> auth (b0)
I (11787938) wifi: state: auth -> init (2)
I (11786938) wifi: n:1 1, o:1 1, ap:1 1, sta:1 0, prof:1
I (11786938) wifi: state: init -> auth (b0)
I (11787938) wifi: state: auth -> init (2)
I (11786938) wifi: n:1 1, o:1 1, ap:1 1, sta:1 0, prof:1
I (11786938) wifi: state: init -> auth (b0)
I (11787938) wifi: state: auth -> init (2)
I (11786938) wifi: n:1 1, o:1 1, ap:1 1, sta:1 0, prof:1
I (11786938) wifi: state: init -> auth (b0)
I (11787938) wifi: state: auth -> init (2)
I (11786938) wifi: n:1 1, o:1 1, ap:1 1, sta:1 0, prof:1
I (11786938) wifi: state: init -> auth (b0)
I (11787938) wifi: state: auth -> init (2)
Also, I am not able to get device into WiFi device list as well as device is also configured into AP mode. It means issue might be into WiFi core or probably into WiFi Stack as Application core is normally working.

I have also configured log level as debug level instead of info level and i got extra one more log while facing this issue.
D (24832) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:HHH-WiFi, ssid_len:8, bssid:cc:16:7e:96:eb:60, reason:2
So, Please let me know if anyone has any idea or clue to debug this type of issue from WiFi Library APIs or how to recover that issue.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Mon Jan 30, 2017 9:58 am

Hi All,

As I have did some debugging task to figure out this issue and found following logs in success case in which WiFi STA+AP mode is working fine without any issue.
I (847238) wifi: mode : sta (24:0a:c4:04:df:28) + softAP (24:0a:c4:04:df:29)
dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)

I (847368) wifi: ap channel adjust o:6,1 n:1,1
I (847368) wifi: n:1 0, o:6 0, ap:1 1, sta:1 0, prof:6
I (848018) wifi: state: init -> auth (b0)
I (848018) wifi: state: auth -> assoc (0)
I (848018) wifi: mgtframe > 256 !

I (848028) wifi: state: assoc -> run (10)

I (848088) wifi: connected with HHH-WiFi, channel 1
Let me know if anyone has idea or clue for this type of issue means ESP32 chip is damaged from WiFi perspective or how to come out from this issue without changing hardware ESP32 chip?
Regards,
Ritesh Prajapati

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Mon Jan 30, 2017 10:06 am

Hi,

Also, As per reason:2, It shows Reason for WiFi STA Disconnect is due to Authentication Expire or Authorization expire.

WIFI_REASON_AUTH_EXPIRE

That is the information till I have for STA & AP mode not working issue till now.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Wed Feb 01, 2017 2:19 pm

Does anyone has any update regarding this issue?
Regards,
Ritesh Prajapati

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: ESP STA or AP wifi is not working

Postby kolban » Wed Feb 01, 2017 2:29 pm

If I am hearing you correctly, you have 30 devices. 28 are working, 2 are not. All are flashed identically. What I would do if I were you is now to start a systematic examination. Take the 2 devices that are failing and put them aside. Power off the other 28. Reboot/reset your router. Power up the 2 devices and see if they work in absence of all the others and with a clean WiFi access point environment. Also try and use an alternate WiFi access point and see if that makes a difference.

Physically check the two failing devices and see if you can spot any issues with assembly that may possibly be causing a problem. Such as shorts or other considerations.

Try and run some other apps on the devices that you have high confidence work. If you exhaust all these tests, contact the supplier of the devices and relay your story and results and see if they will exchange the two failed devices for alternates ... working on the assumption that they have failed. Examine your working practices to see if there was a possibility of an introduction of a failure at your end ... for example, overloading of the device or an electro static discharge that may have damaged the devices.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP STA or AP wifi is not working

Postby ESP_Angus » Wed Feb 01, 2017 8:47 pm

Try running "make erase_flash" on the two that aren't behaving, then re-flash. There's a bug (we are working on a fix) where bad calibration data (possibly left over from a previous flag) can cause WiFi to misbehave.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 5:26 am

ESP_Angus wrote:Try running "make erase_flash" on the two that aren't behaving, then re-flash. There's a bug (we are working on a fix) where bad calibration data (possibly left over from a previous flag) can cause WiFi to misbehave.
Hi,

Thanks for Reply.

I have also tried the way you mentioned like erasing flash first and then re-programmed firmware again and still facing same issue like AP and STA both are not working.

So, Let me know if you have any other option to solve or debug it except chip replace option.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP STA or AP wifi is not working

Postby Ritesh » Thu Feb 02, 2017 5:30 am

kolban wrote:If I am hearing you correctly, you have 30 devices. 28 are working, 2 are not. All are flashed identically. What I would do if I were you is now to start a systematic examination. Take the 2 devices that are failing and put them aside. Power off the other 28. Reboot/reset your router. Power up the 2 devices and see if they work in absence of all the others and with a clean WiFi access point environment. Also try and use an alternate WiFi access point and see if that makes a difference.

Physically check the two failing devices and see if you can spot any issues with assembly that may possibly be causing a problem. Such as shorts or other considerations.

Try and run some other apps on the devices that you have high confidence work. If you exhaust all these tests, contact the supplier of the devices and relay your story and results and see if they will exchange the two failed devices for alternates ... working on the assumption that they have failed. Examine your working practices to see if there was a possibility of an introduction of a failure at your end ... for example, overloading of the device or an electro static discharge that may have damaged the devices.
Hi,

Thanks for Reply.

I have checked the way you mentioned as all other devices are already not powered on and also restarted router and facing same issue like both STA and AP modes are not working but other application core part is working which is strange thing for me that only WiFi STA +AP mode is not working on both boards.

I have also tried like erasing whole flash memory and again programmed all binaries and checked that issue remains same.

I have also checked with different router like my mobile hot-spot mode and still issue remains same.

Let me know if you have any other option or way to check and debug this issue.
Regards,
Ritesh Prajapati

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP STA or AP wifi is not working

Postby ESP_Angus » Thu Feb 02, 2017 5:35 am

If erasing flash and then loading the same firmware binary that works on other boards fails, then this sounds like a hardware issue. You may be able to reflow the chip or module in place (antenna pad, antenna matching network, or possibly power supply connections or decoupling capacitors although probably not), or you may need to replace it.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP STA or AP wifi is not working

Postby WiFive » Thu Feb 02, 2017 5:41 am

@ESP_Angus Is there a way to detect RF hardware problem during calibration with verbose output?

@Ritesh what hardware are you using? Custom design with bare esp32 chip? Did you try Bluetooth functions?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 178 guests