Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clock wont boot #2

Open
Rambotnik87 opened this issue Feb 18, 2022 · 15 comments
Open

Clock wont boot #2

Rambotnik87 opened this issue Feb 18, 2022 · 15 comments

Comments

@Rambotnik87
Copy link

Hello i successfully build and upload your firmware. But The clock does not boot, no text appears.
When I check the serial connection using putty this statement keeps repeating ande rebooting:

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4005f0f4 PS : 0x00060730 A0 : 0x800d2272 A1 : 0x3ffb76a0
A2 : 0x3ffc9a68 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x3ffc1a68 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00008000 A11 : 0x00040000 A12 : 0x02000000 A13 : 0x00000000
A14 : 0xfffffffd A15 : 0x3ffc1a68 SAR : 0x0000000f EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffb

ELF file SHA256: 0000000000000000

Backtrace: 0x4005f0f4:0x3ffb76a0 0x400d226f:0x3ffb77b0 0x400d2422:0x3ffb7800 0x400d1341:0x3ffb7840 0x400d1350:0x3ffb7870 0x40150192:0x3ffb7890 0x40150207:0x3ffb78b0 0x4008b28a:0x3ffb78d0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8

@frankcohen
Copy link

The backtrace decodes to:
Decoding stack results
0x400d226f: sdReadSectors(unsigned char, char*, unsigned long long, int) at /Users/frankcohen/Documents/Arduino/hardware/espressif/esp32/libraries/SD/src/sd_diskio.cpp line 242
0x400d2422: sdWriteSectors(unsigned char, char const*, unsigned long long, int) at /Users/frankcohen/Documents/Arduino/hardware/espressif/esp32/libraries/SD/src/sd_diskio.cpp line 324
0x400d1341: VFSImpl::rename(char const*, char const*) at /Users/frankcohen/Documents/Arduino/hardware/espressif/esp32/libraries/FS/src/vfs_api.cpp line 104
0x400d1350: VFSImpl::rename(char const*, char const*) at /Users/frankcohen/Documents/Arduino/hardware/espressif/esp32/libraries/FS/src/vfs_api.cpp line 106

Is the code using SD for SPIFFS? I thought the best practice is to use littlefs?

-Frank

@Rambotnik87
Copy link
Author

@frankcohen I dont know, i just build and upload that code in Platformio. Btw i tried your firmware ElekstubeIPSHack, but with no succes too. Clock did not boot the same way as in this case. I was able to connect to EleksHack wifi, upload all bmp files, but after activating the "play clock", nothing happened.

@Rambotnik87
Copy link
Author

@frankcohen I try LITTLEFS instead of SPIFFS. Install library and add to code:

//#include <SPIFFS.h>
#include <LITTLEFS.h>
#define SPIFFS LITTLEFS

and there is result from serial monitor:

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
.pio\libdeps\m5stack-core-esp32\LittleFS_esp32\src\lfs.c:1076:error: Corrupted dir pair at {0x0, 0x1}
E (413) esp_littlefs: mount failed, (-84)
E (415) esp_littlefs: Failed to initialize LittleFS
[E][LITTLEFS.cpp:90] begin(): Mounting LITTLEFS failed! Error: -1
[E][vfs_api.cpp:22] open(): File system is not mounted
[E][vfs_api.cpp:22] open(): File system is not mounted
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4005f0f4 PS : 0x00060730 A0 : 0x800d257e A1 : 0x3ffb76a0
A2 : 0x3ffc9a78 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x3ffc1a78 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00008000 A11 : 0x00040000 A12 : 0x02000000 A13 : 0x00000000
A14 : 0xfffffffd A15 : 0x3ffc1a78 SAR : 0x0000000f EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400d26c4 LEND : 0x400d26e8 LCOUNT : 0x00000000

ELF file SHA256: 0000000000000000

Backtrace: 0x4005f0f4:0x3ffb76a0 0x400d257b:0x3ffb77b0 0x400d272e:0x3ffb7800 0x400d164d:0x3ffb7840 0x400d165c:0x3ffb7870 0x4014ed82:0x3ffb7890 0x4014edf7:0x3ffb78b0 0x4008b28a:0x3ffb78d0

@frankcohen
Copy link

Littlefs gives similar class/method definitions to SD to make it easier to adopt. For example, replacing the #include is easy. And, the underlying file system needs to be formatted to littlefs for the library to work. The command to format the file system is:

        LITTLEFS.format();

In my EleksTubeIPSHack I add a check that the file system mounts correctly (https://github.com/frankcohen/EleksTubeIPSHack/blob/main/EleksHack/EleksHack.ino line 235) and offers to format the SPIFFS (through the Web interface).

"Mounting LITTLEFS failed! Error: -1" is a pretty good indication that something is wrong. Try formatting and see if that makes a difference.

-Frank

@Rambotnik87
Copy link
Author

succesfully formated but another error pop up:

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8


Success formatting
[E][vfs_api.cpp:64] open(): /littlefs/config.json does not exist
[E][vfs_api.cpp:64] open(): /littlefs/nix/0.clk does not exist
[E][vfs_api.cpp:64] open(): /littlefs/nix/7.clk does not exist
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x4005f0f4  PS      : 0x00060730  A0      : 0x800d25a6  A1      : 0x3ffb76a0
A2      : 0x3ffc9a78  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000
A6      : 0x00000000  A7      : 0x3ffc1a78  A8      : 0x00000000  A9      : 0x00000000
A10     : 0x00008000  A11     : 0x00040000  A12     : 0x02000000  A13     : 0x00000000
A14     : 0xfffffffd  A15     : 0x3ffc1a78  SAR     : 0x0000000f  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffa

ELF file SHA256: 0000000000000000

Backtrace: 0x4005f0f4:0x3ffb76a0 0x400d25a3:0x3ffb77b0 0x400d2756:0x3ffb7800 0x400d1675:0x3ffb7840 0x400d1684                                        :0x3ffb7870 0x4014efd2:0x3ffb7890 0x4014f047:0x3ffb78b0 0x4008b28a:0x3ffb78d0

@frankcohen
Copy link

Looks like progress. After you formatted the SPIFFS did you upload image files for the clock function? These errors make it look like the files are missing:

[E][vfs_api.cpp:64] open(): /littlefs/config.json does not exist
[E][vfs_api.cpp:64] open(): /littlefs/nix/0.clk does not exist
[E][vfs_api.cpp:64] open(): /littlefs/nix/7.clk does not exist

If you're using my hack, the Photobooth command uploads pictures in a fun (non-clock) way:
https://www.youtube.com/watch?v=GcQFnOWHs8E

The stack trace is:
Decoding stack results
0x400d25a3: fs::File::File(std::shared_ptr ) at /Users/frankcohen/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/shared_ptr_base.h line 665
0x400d2756: VFSImpl::rename(char const*, char const*) at /Users/frankcohen/Documents/Arduino/hardware/espressif/esp32/libraries/FS/src/vfs_api.cpp line 91
0x400d1675: SPIClass::beginTransaction(SPISettings) at /Users/frankcohen/Documents/Arduino/hardware/espressif/esp32/libraries/SPI/src/SPI.cpp line 135
0x400d1684: SPIClass::endTransaction() at /Users/frankcohen/Documents/Arduino/hardware/espressif/esp32/libraries/SPI/src/SPI.cpp line 140
0x4008b28a: rtc_wdt_set_stage at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/soc/esp32/rtc_wdt.c line 131

@Rambotnik87
Copy link
Author

@frankcohen I don't know what you mean specifically, I use this firmware. Can you be specific and show it in this code? Someone wrote here that it works without webserver and without any modifications, so I don't understand why I can't get it to work.

@frankcohen
Copy link

I'm sorry to be confusing. I wrote another project that re-uses part of this project and https://github.com/SmittyHalibut/EleksTubeHAX. Mine is at https://github.com/frankcohen/EleksTubeIPSHack and turns the clock into a Web server for a nice Web-based UI. I never got around to combining the projects.

What I see are these errors:
[E][vfs_api.cpp:64] open(): /littlefs/config.json does not exist
[E][vfs_api.cpp:64] open(): /littlefs/nix/0.clk does not exist
[E][vfs_api.cpp:64] open(): /littlefs/nix/7.clk does not exist

These indicate that some files are missing from the clock. I would start there to see what is missing.

-Frank

@Rambotnik87
Copy link
Author

I know, i tried both projects. As I wrote, i tried your firmware ElekstubeIPSHack, but with no succes too. Clock did not boot. I was able to connect to EleksHack wifi, upload all bmp files, but after activating the "play clock", nothing happened. I dont want spam here about another project, can you help me with your project?

@frankcohen
Copy link

Ok, I'll support you here on my project until Andrei says to bug-off to my project repository. :-D

Using ElekstubeIPSHack, start your clock, connect to it's wifi, browse the clock, choose Photobooth from the menu from your mobile phone or tablet, take a photo, and upload the images to your clock. Then tell me that it works. Then I'll help you with the clock mode.

@Rambotnik87
Copy link
Author

Ok, i erased flash using esptool and upload your firmware backup elekstube_backup_4M_20210628. No boot or text in my clock. I was able to connect to EleksHack SSID . Webserver only work with https://192.168.1.1. If I try connect to my wifi SSID, it scan properly all nearby SSIDs, but after click on my wifi it stuck forever. No text or color on my clock, i tried "play clock", "play images" Here is serial:

syncProvider()
Using RTC time.
time: 12:11:13
Saving config. Done.
[HTTPS:I] Request: GET /favicon.ico (FID=63)
[HTTPS:I] New connection. Socket FID=61
[HTTPS:E] SSL_accept failed. Aborting handshake. FID=61
[HTTPS:I] Connection closed. Socket FID=61
[HTTPS:I] Request: GET / (FID=63)
Handle Menu
[HTTPS:I] Request: GET /favicon.ico (FID=63)
[HTTPS:I] New connection. Socket FID=55
[HTTPS:E] SSL_accept failed. Aborting handshake. FID=55
[HTTPS:I] Connection closed. Socket FID=55
[HTTPS:I] Request: GET /images (FID=63)
[HTTPS:I] Request: GET /favicon.ico (FID=63)
[HTTPS:I] New connection. Socket FID=60
[HTTPS:E] SSL_accept failed. Aborting handshake. FID=60
[HTTPS:I] Connection closed. Socket FID=60
[HTTPS:I] Request: GET / (FID=63)
Handle Menu
[HTTPS:I] Request: GET /favicon.ico (FID=63)
[HTTPS:I] New connection. Socket FID=57
[HTTPS:E] SSL_accept failed. Aborting handshake. FID=57
[HTTPS:I] Connection closed. Socket FID=57
[HTTPS:I] Request: GET /wifi (FID=63)
handle_connectwifi()
scan done
[HTTPS:I] Request: GET /favicon.ico (FID=63) 

@frankcohen
Copy link

Once your clock starts the displays should be telling you some info on connecting to the clock. Are you seeing the displays show you anything?

If you'd like I could do a zoom/Google Meet call with you. I'm available now and for the next 4-5 hours.

@Rambotnik87
Copy link
Author

Once your clock starts the displays should be telling you some info on connecting to the clock. Are you seeing the displays show you anything?

If you'd like I could do a zoom/Google Meet call with you. I'm available now and for the next 4-5 hours.

You are awesome, can you email me [email protected]?

@frankcohen
Copy link

frankcohen commented Feb 19, 2022 via email

@andrei-tatar
Copy link
Owner

andrei-tatar commented Feb 19, 2022

Hey guys!
Yes, the firmware uses SPIFFS. I didn't bother changing it to littleFs. You can upload the default files (a config file, the default skin and the web client) using platformio run --target uploadfs or from vs code:
image

The code isn't complete yet. I still need to add a way to connect to WiFi and configure stuff (ntp/dst/etc.) but you can change the skin from the web client.

Until then you need to define the Wifi ssid/pass in the code: main.cpp.

Still need to add some progress bar/indicator while uploading:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants