ESP32 Connection Drop Off

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
adamfletcher
 
Posts: 4
Joined: Tue Dec 06, 2022 12:51 pm

ESP32 Connection Drop Off

Post by adamfletcher »

Hello,

I am working with the Adafruit ESP32 in conjunction with the Adafruit SCD-30. When using the ESP_working main.cpp code with a delay of 60000ms (1 minute), the device occasionally loses connection and will not reconnect unless it is unplugged and reconnected to the computer. We are collecting data on Losant, and so when the connection is lost data collection is halted. Is there a way to mitigate this?

User avatar
mikeysklar
 
Posts: 13823
Joined: Mon Aug 01, 2016 8:10 pm

Re: ESP32 Connection Drop Off

Post by mikeysklar »

Are you seeing anything on the serial console our router in regards to the reason for the reset?

What is the Adafruit Part# of the ESP32 based board you are using?

User avatar
adamfletcher
 
Posts: 4
Joined: Tue Dec 06, 2022 12:51 pm

Re: ESP32 Connection Drop Off

Post by adamfletcher »

I do not see anything on the serial console. After working for a little while, the ESP32 would seemingly randomly blink or hold the RED LED indicator, and the data collection will stop. All of this while it is connected to the computer and VS code.

Part# W15751-C

User avatar
mikeysklar
 
Posts: 13823
Joined: Mon Aug 01, 2016 8:10 pm

Re: ESP32 Connection Drop Off

Post by mikeysklar »

I don't recognize the part# you provided. That looks more like a chip specific identifier as opposed to an Adafruit inventory product id#.

https://www.adafruit.com/?q=esp32&sort=BestMatch

User avatar
adamfletcher
 
Posts: 4
Joined: Tue Dec 06, 2022 12:51 pm

Re: ESP32 Connection Drop Off

Post by adamfletcher »

Sorry about that. The type is ESP32 Feather V2. https://www.adafruit.com/product/5400

Is there a way to run some kind of diagnostics after the problem occurs to find out where specifically the failure occurred?

User avatar
mikeysklar
 
Posts: 13823
Joined: Mon Aug 01, 2016 8:10 pm

Re: ESP32 Connection Drop Off

Post by mikeysklar »

The way to debug this would be to add some print() statements to the code and keep the console open so you can locate what line is causing the disconnect.

Your access point might also have some message of value.

It could be a library bug and that means getting down to reproducible simple test case to open an issue.

User avatar
adamfletcher
 
Posts: 4
Joined: Tue Dec 06, 2022 12:51 pm

Re: ESP32 Connection Drop Off

Post by adamfletcher »

Hi I had another problem. I am working with ESP32 HUZZAH feather v2 (8mb flash and 2mb psram) to control a few sensors simultaneuously. I connected the following sensors, SCD41, PMSA003I, and SGP30 and combined the example code for each individual sensor into one file. When I try to run the esp32 with the three sensors I get a "Guru Meditation Error"

- Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core  1 register dump:PC      : 0x40153ee7  PS      : 0x00060830  A0      : 0x800d54c6  A1      : 0x3ffb2650  A2      : 0x00000000  A3      : 0x3ffb26b4  A4      : 0x00000008  A5      : 0x00000001  A6      : 0x00000000  A7      : 0x00000000  A8      : 0x800dac8a  A9      : 0x3ffb2660  A10     : 0x00000002  A11     : 0x3f40668d  A12     : 0x00000002  A13     : 0x0000ff00  A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x0000000e  EXCCAUSE: 0x0000001c  EXCVADDR: 0x0000000c  LBEG    : 0x40162d34  LEND    : 0x40162d48  LCOUNT  : 0x00000000  

Backtrace:0x40153ee4:0x3ffb26500x400d54c3:0x3ffb2670 0x400d55cd:0x3ffb26b0 0x400d317d:0x3ffb26e0 0x400dc862:0x3ffb2820



ELF file SHA256: 0000000000000000

This only occurs when I try to run the code for all three sensors; if I comment out just one sensor, the code works for the other two (it doesnt matter which sensor I comment out). Is there a reason for this? should I get an ESP32 that has more flash memory?

User avatar
mikeysklar
 
Posts: 13823
Joined: Mon Aug 01, 2016 8:10 pm

Re: ESP32 Connection Drop Off

Post by mikeysklar »

Since you have the code and the ELF file you can decode this crash that is occurring with all three sensors.

The Arduino IDE has a exception decoder under Tools --> ESP Exception Decoder. It appears when you have installed the ESP Board manager file.

https://makeabilitylab.github.io/physco ... -tips.html

If you have more questions on this issue please start a new thread as this is now off topic from the original.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”