ruthsarian / Droid-Toolbox

An ESP32-based project to scan for and emit BLE beacons for Droids from Galaxy's Edge.
MIT License
41 stars 12 forks source link

Screen blinking white and black once every 2 seconds, but not booting #5

Closed dtshepherd closed 3 weeks ago

dtshepherd commented 3 weeks ago

I have a LilyGo S3 and I'm able to build and flash to the device:

image

Here's the TFT_eSPI version I'm running (latest):

image

I have commented out User_Select.h and uncommented User_Setups/Setup206_LilyGo_T_Display_S3.h and rebuilt. Then re-programmed, but still doesn't help.

I am loading this from MacOS, but I had no issue with the board being recognized after I loaded the proper driver (and gave it permission). Any ideas before I go deeper into debugging?

ruthsarian commented 3 weeks ago

The flashing screen means your S3 is crashing and rebooting itself. You should see something in the serial monitor showing a crash dump and a reboot.

For the board, select the "ESP32S3 Dev Module" instead of the "LilyGo T-Display-S3" and then try reuploading it. You may have to first put your S3 into a forced upload mode by removing power to the S3, holding down the top button (assuming the S3 is in the orientation of the buttons being to the left of the screen) and then plug the S3 into your computer. That will let you then reupload the code using the "ESP32S3 Dev Module" board.

dtshepherd commented 3 weeks ago

I tried flashing both "ESP32S3 Dev Module" and "LilyGo T-Display-S3" (though the diff looks the same for those configs when I look at the "boards.txt" from Espressif. This is the serial output error for both board configurations:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4037764c
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
E (15) gpio: gpio_set_level(227): GPIO output gpio_num error
E (15) gpio: gpio_set_level(227): GPIO output gpio_num error

CORRUPT HEAP: Bad head at 0x3fcebf0c. Expected 0xabba1234 got 0x0000000e

assert failed: multi_heap_free multi_heap_poisoning.c:259 (head != NULL)

Backtrace: 0x40377a3e:0x3fcee810 0x40380739:0x3fcee830 0x40385f71:0x3fcee850 0x40385b89:0x3fcee980 0x40378015:0x3fcee9a0 0x40385fa1:0x3fcee9c0 0x420308e6:0x3fcee9e0 0x42030997:0x3fceea00 0x42059789:0x3fceea60 0x4205bbcb:0x3fceea80

I'm running the latest the latest for esp32, which is v2.0.16, so I decided to downgrade to v2.0.7 from your MacOS YouTube video and that fixed things. I'll try to slice which version broke things.

ruthsarian commented 3 weeks ago

Probably broke on ESP 2.0.15. A similar issue was reported with a 2.0.15 install previously. I guess I need to sit down and figure out what's causing this crash with ESP 2.0.15 and above.

dtshepherd commented 3 weeks ago

Oh shoot, how did I miss that issue... Sorry. If I get some time this tonight/this week, I'll try to debug. I was trying to get the Droid Toolbox setup for my 6yo for the Disney trip next week :)

ruthsarian commented 3 weeks ago

No worries. Have a great trip!

Elcid8687 commented 3 weeks ago

Use board V2.0.14 or 13Sent from my iPhoneOn May 7, 2024, at 7:38 PM, David Shepherd @.***> wrote: I tried flashing both "ESP32S3 Dev Module" and "LilyGo T-Display-S3" (though the diff looks the same for those configs when I look at the "boards.txt" from Espressif. This is the serial output error for both board configurations: ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x4037764c SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3808,len:0x4bc load:0x403c9700,len:0xbd8 load:0x403cc700,len:0x2a0c entry 0x403c98d0 E (15) gpio: gpio_set_level(227): GPIO output gpio_num error E (15) gpio: gpio_set_level(227): GPIO output gpio_num error

CORRUPT HEAP: Bad head at 0x3fcebf0c. Expected 0xabba1234 got 0x0000000e

assert failed: multi_heap_free multi_heap_poisoning.c:259 (head != NULL)

Backtrace: 0x40377a3e:0x3fcee810 0x40380739:0x3fcee830 0x40385f71:0x3fcee850 0x40385b89:0x3fcee980 0x40378015:0x3fcee9a0 0x40385fa1:0x3fcee9c0 0x420308e6:0x3fcee9e0 0x42030997:0x3fceea00 0x42059789:0x3fceea60 0x4205bbcb:0x3fceea80

I'm running the latest the latest for esp32, which is v2.0.16, so I decided to downgrade to v2.0.7 from your MacOS YouTube video and that fixed things. I'll try to slice which version broke things.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

dtshepherd commented 3 weeks ago

Thanks @Elcid8687, that's what I did to get it working.

Debugging this a bit tonight and these lines trigger the heap corruption: https://github.com/ruthsarian/Droid-Toolbox/blob/main/Droid-Toolbox.ino#L3130-L3132. Maybe something isn't allocated correctly for the new version for advertising? Digging further...

ruthsarian commented 3 weeks ago

Excellent work! Thank you for fixing this issue!

Elcid8687 commented 3 weeks ago

I have successfully tested with latest board version TDisplay and T3DisplaySent from my iPhoneOn May 8, 2024, at 12:15 AM, The Forgettable Mister Ruthsarian @.***> wrote: Closed #5 as completed.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>