prusa3d / Prusa-Firmware-ESP32-Cam

Firmware for ESP32 Cam modules to be used in Prusa Connect
GNU General Public License v3.0
161 stars 13 forks source link

Disconnect shortly after boot with 1.1.0 #59

Open swaggner opened 1 month ago

swaggner commented 1 month ago

Using a ESP32-S3-EYE and I just updated to 1.1.0 but it won't stay running more than a few minutes before the green status light rapidly flashes, and the camera disconnects from wifi.
I'm getting "CPU reset reason: Software reset due to exception/panic" and "CPU reset reason: Reset due to task watchdog"

I don't see anything else wrong in the log files. Is there a way to uncover what the "exception" or "panic" is?

It seems to be network-related because if I reflash the MCU and don't connect it to a SSID, the camera runs fine in AP mode. Once I re-establish network connection to a SSID, the camera will not stay running more than a few minutes. It's as if it doesn't handle a connect or disconnect from the WiFi elegantly.


Start MCU! SW Version: 1.1.0 ,Build: Aug 5 2024 18:32:19 Verbose mode: false Log level: 3 0000-00-00_00-00-00 - Init system lib 0000-00-00_00-00-00 - SW Version: 1.1.0 Build: Aug 5 2024 18:32:28 0000-00-00_00-00-00 - Board name: ESP32-S3-EYE_2.2 0000-00-00_00-00-00 - CPU reset reason: Software reset due to exception/panic 0000-00-00_00-00-00 - CPU0 reset reason: SW_CPU_RESET 0000-00-00_00-00-00 - CPU1 reset reason: SW_CPU_RESET 0000-00-00_00-00-00 - MCU Temperature: 46.30 *C 0000-00-00_00-00-00 - Internal Total heap: 351380 B, Internal Free Heap: 315216 0000-00-00_00-00-00 - PSRAM Total heap: 8388608 B, PSRAM Free Heap: 8358244 0000-00-00_00-00-00 - Chip model: ESP32-S3, ChipRevision: 2, Cpu Freq: 240 0000-00-00_00-00-00 - SDK Version: v5.1.4-586-gb6b4727c58-dirty, Core Version: 3.0.4 0000-00-00_00-00-00 - Flash Size: 8388608, Flash Speed 80000000, Flash Mode: 2 0000-00-00_00-00-00 - PSRAM is used. 0000-00-00_00-00-00 - malloc/new is not using SPIRAM 0000-00-00_00-00-00 - Init cfg module: 393 0000-00-00_00-00-00 - Read FirstMcuStart FLAG 0000-00-00_00-00-00 - It's not first start MCU: 15 0000-00-00_00-00-00 - Check reset MCU cfg 0000-00-00_00-00-00 - Reset pin status: 1 0000-00-00_00-00-00 - Reset MCU cfg false 0000-00-00_00-00-00 - web auth enable: 0 0000-00-00_00-00-00 - web auth user: admin 0000-00-00_00-00-00 - web auth pass: ** 0000-00-00_00-00-00 - Load camera CFG from EEPROM 0000-00-00_00-00-00 - Photo quality: 10 0000-00-00_00-00-00 - Framesize: 6 0000-00-00_00-00-00 - Framesize: 6 0000-00-00_00-00-00 - brightness: 0 0000-00-00_00-00-00 - contrast: 0 0000-00-00_00-00-00 - saturation: 0 0000-00-00_00-00-00 - awb: 1 0000-00-00_00-00-00 - awb_gain: 1 0000-00-00_00-00-00 - awb_mode: 0 0000-00-00_00-00-00 - aec2: 0 0000-00-00_00-00-00 - ae_level: 0 0000-00-00_00-00-00 - aec_value: 300 0000-00-00_00-00-00 - gain_ctrl: 1 0000-00-00_00-00-00 - agc_gain: 0 0000-00-00_00-00-00 - bpc: 1 0000-00-00_00-00-00 - wpc: 1 0000-00-00_00-00-00 - raw_gama: 1 0000-00-00_00-00-00 - hmirror: 1 0000-00-00_00-00-00 - vflip: 1 0000-00-00_00-00-00 - lensc: 1 0000-00-00_00-00-00 - exposure_ctrl: 1 0000-00-00_00-00-00 - Camera flash: 0 0000-00-00_00-00-00 - Camera flash time: 200 0000-00-00_00-00-00 - Camera image rotation: 1 0000-00-00_00-00-00 - Load PrusaConnect CFG from EEPROM

johnyHV commented 1 month ago

Hello @swaggner can you send me full log, in the verbose mode ?

swaggner commented 1 month ago

Thanks for your help @johnyHV I sent you an email with the serial monitor and SD card logs. The line that stands out is 0000-00-00_00-00-00 - WiFi disconnected from access point. Reason: 202

johnyHV commented 3 weeks ago

@swaggner could you please attach the logs here? Please ensure that all sensitive content, such as passwords and tokens, is removed. It will help me navigate through the issues more easily. Thank you very much!

swaggner commented 3 weeks ago

Ok. Here you go... log.txt

johnyHV commented 1 week ago

@swaggner sorry for the late response. Error 202 means that the connection to the WiFi network timed out. I see that your WiFi networks use WPA3, which could be causing issues. I'm not sure if the ESP32 supports WPA3 at the moment. It's a good question, and I need to check on that.

swaggner commented 1 week ago

Ok. That's interesting because that IoT network is set to WPA2, so either that setting isn't working, or the ESP cam is trying to connect with the wrong security protocol.

mozgy commented 1 week ago

ESP32 supports WPA3 in Arduino SDK v3