jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.67k stars 612 forks source link

Crash when try to access the overview page #173

Closed rgl closed 3 years ago

rgl commented 3 years ago

When I access the Overview page, ESP32-CAM crashes with:

uri: /wasserzaehler_roi.html
1 uri: /wasserzaehler_roi.html, filename: , filepath: /sdcard
Filename: 
File requested: /sdcard/html/wasserzaehler_roi.html
I (272754) serverhelp: Sending file : /sdcard/html/wasserzaehler_roi.html ...
I (272764) serverhelp: File sending complete
W (272784) httpd_txrx: httpd_sock_err: error in recv : 104
uri: /jquery-3.5.1.min.js
1 uri: /jquery-3.5.1.min.js, filename: , filepath: /sdcard
Filename: 
File requested: /sdcard/html/jquery-3.5.1.min.js
I (272814) serverhelp: Sending file : /sdcard/html/jquery-3.5.1.min.js ...
I (273164) serverhelp: File sending complete
W (273204) httpd_txrx: httpd_sock_err: error in recv : 104
handler_wasserzaehler uri:
/wasserzaehler.html?rawvalue=true
handler_wasserzaehler uri:
/wasserzaehler.html
uri: /img_tmp/alg_roi.jpg
1 uri: /img_tmp/alg_roi.jpg, filename: alg_roi.jpg, filepath: /sdcardalg_roi.jpg
File to upload: alg_roi.jpg
ClassFlowControll::GetJPGStream alg_roi.jpg
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x40198238  PS      : 0x00060430  A0      : 0x800f5f8c  A1      : 0x3ffe8020  
A2      : 0x3ffb7df4  A3      : 0x3ffe8080  A4      : 0x3ffe1334  A5      : 0x00000000  
A6      : 0x00000067  A7      : 0x3ffc3bac  A8      : 0x80198232  A9      : 0x3ffe8000  
A10     : 0x3ffc3bac  A11     : 0x3f42f018  A12     : 0x00000000  A13     : 0x0000000b  
A14     : 0x00000067  A15     : 0x2e696f72  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000108  LBEG    : 0x4008d1b5  LEND    : 0x4008d1c5  LCOUNT  : 0xfffffffc  

ELF file SHA256: c0935a69ab1cdc19

Backtrace: 0x40198235:0x3ffe8020 0x400f5f89:0x3ffe8080 0x400d4753:0x3ffe80c0 0x400eb7e9:0x3ffe8160 0x400ea7f1:0x3ffe81a0 0x400ea8a8:0x3ffe8230 0x400eaca0:0x3ffe8250 0x400e9b0e:0x3ffe8270 0x400e9b8a:0x3ffe82b0 0x4008fd59:0x3ffe82d0

Rebooting...

Maybe this is a power issue?

I'm using a YwRobot power MB V2 which is supposed to deliver a max of 700mA (plugged to a 1A AC to DC transformer). Maybe that's not enough? Or maybe this PSU is not good at all.

I didn't yet tried to add a electrolytic capacitor (cause I don't have one) like described in the installation page.

Github197 commented 3 years ago

Hi rgl.

Just one comment regarding YwRobot power MB V2. I was trying to use this in the past for some other projects and I always had issues with the power this device supplied. As I understand the ESP32-CAM is taking some power peeks when doing certain stuff so I really can imagine that this is causing issues. As a first step I propose to use a different power supply first and check if the issue is still appearing.

Rene

luckyhacky commented 3 years ago

Using an additional capacitor may help.

rgl commented 3 years ago

I've now tried with 2200uF capacitor(s) and directly connecting to an official raspberry pi 4 psu (5V 3A), but it has the same Guru Meditation problem. :-(

I also tried with the arduino ESP32-CAM example, streaming works fine, but when I try to use the face detection feature, it eventually crashes with:

CORRUPT HEAP: Bad head at 0x3ffec3cc. Expected 0xabba1234 got 0x00000008
abort() was called at PC 0x400859b1 on core 1

I've tried with two different esp32-cam boards, same result. So I'm kinda lost with this.

jomjol commented 3 years ago

Do you see any picture on the main page of the watermeter or is this happening directly on the first access? First time, such kind of strange error is reported. Usually you have a general problem with the SD card, but this intermediate failure is strange.

Currently no further idea. Maybe you could post the serial of the startup sequence. There I could check, if every component shows up as expected - just screening for anomalies.

rgl commented 3 years ago

I never see any picture.

Here's my full script to install everything (sorry for it being so long; please browse to the end to see the error, then go up from there I guess).


Create a python virtual environment in the current directory:

sudo apt-get install -y --no-install-recommends python3-pip python3-venv
python3 -m venv venv

Install esptool:

source ./venv/bin/activate
# NB this pip install will display several "error: invalid command 'bdist_wheel'"
#    messages, those can be ignored.
# see https://pypi.org/project/esptool/
# see https://github.com/espressif/esptool
# TODO use a requirements.txt file and then python3 -m pip install -r requirements.txt
esptool_version='3.0'
python3 -m pip install esptool==$esptool_version
esptool.py version

Make sure the board IOS pin is connected to GND. We need this to enter the booloader.

Connect the board to the USB port.

Press the RESET button on the board to make it go to the booloader.

Dump the information about the esp attached to the serial port:

esptool.py -p /dev/ttyUSB0 chip_id

You should see something alike:

esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:61:05:33:e9:14
Uploading stub...
Running stub...
Stub running...
Warning: ESP32 has no Chip ID. Reading MAC instead.
MAC: 3c:61:05:33:e9:14
Hard resetting via RTS pin...

Press the RESET button on the board to make it go to the booloader.

Dump the information about the flash:

esptool.py -p /dev/ttyUSB0 flash_id

You should see something alike:

esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:61:05:33:e9:14
Uploading stub...
Running stub...
Stub running...
Manufacturer: d8
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...

Press the RESET button on the board to make it go to the booloader.

Erase the Flash:

esptool.py -p /dev/ttyUSB0 erase_flash

Press the RESET button on the board to make it go to the booloader.

Flash the device with jomjol/AI-on-the-edge-device:

mkdir tmp && cd tmp
wget https://github.com/jomjol/AI-on-the-edge-device/raw/v6.6.1/firmware/bootloader.bin
wget https://github.com/jomjol/AI-on-the-edge-device/raw/v6.6.1/firmware/firmware.bin
wget https://github.com/jomjol/AI-on-the-edge-device/raw/v6.6.1/firmware/partitions.bin
wget https://github.com/jomjol/AI-on-the-edge-device/raw/v6.6.1/firmware/html.zip
# see https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation
# see https://github.com/espressif/esptool#flash-modes
# see https://github.com/espressif/esptool/wiki/SPI-Flash-Modes
esptool.py -p /dev/ttyUSB0 write_flash 0x01000 bootloader.bin 0x08000 partitions.bin 0x10000 firmware.bin

Unplug the board from USB.

Plug the sd-card into your computer.

Find which device was allocated for the sd-card that will store the data:

lsblk -o KNAME,SIZE,TRAN,FSTYPE,UUID,LABEL,MODEL,SERIAL
# lsblk should output all the plugged block devices, in my case, this is the device that I'm interested in:
#
# KNAME    SIZE TRAN   FSTYPE   UUID                                 LABEL  MODEL          SERIAL
# sde      1,9G usb                                                         STORAGE_DEVICE 000000078
# sde1     256M        vfat     4AD7-B4D5                            boot
# sde2     1,6G        ext4     2887d26c-6ae7-449d-9701-c5a4018755b0 rootfs

Wipe the sd-card (in this example its at /dev/sde) and put the html.zip we've downloaded before in it:

# switch to a root shell.
sudo -s

# set the sd-card target device and mount point.
target_device=/dev/sde
target=/mnt/esp32-cam-sd-card

# umount any existing partition that you might have already mounted.
umount ${target_device}?

# format the sd-card at $target_device.
parted --script $target_device mklabel msdos
parted --script $target_device mkpart primary fat32 4 100%
parted $target_device print
# You should see something alike:
#   Model: Generic STORAGE DEVICE (scsi)
#   Disk /dev/sde: 2003MB
#   Sector size (logical/physical): 512B/512B
#   Partition Table: msdos
#   Disk Flags:
#
#   Number  Start   End     Size    Type     File system  Flags
#    1      4194kB  2003MB  1999MB  primary  fat32        lba
mkfs -t vfat -n ESP32-CAM ${target_device}1

# install the html data in the sd-card.
mkdir -p $target
mount ${target_device}1 $target
mkdir $target/html
unzip html.zip -d $target/html

# set the wifi lan credentials.
# see the available options at https://github.com/jomjol/AI-on-the-edge-device/blob/v6.6.1/code/components/connect_wlan/connect_wlan.cpp#L334-L381
cat >$target/wlan.ini <<'EOF'
SSID = TODO_SET_YOUR_WIFI_NAME
PASSWORD = TODO_SET_YOUR_WIFI_PASSWORD
EOF

# eject the sd-card.
umount $target
eject $target_device

# exit the root shell.
exit

Remove the sd-card from your computer and insert it into the board.

Disconnect the board IOS pin from GND. We need this to exit the booloader.

Plug the board to USB.

Connect to the board to see its status:

picocom --baud 115200 /dev/ttyUSB0
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_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:0x3fff0030,len:4
load:0x3fff0034,len:7248
ho 0 tail 12 room 4
load:0x40078000,len:13856
load:0x40080400,len:4052
entry 0x40080688
I (31) boot: ESP-IDF 3.40100.200827 2nd stage bootloader
I (31) boot: compile time 10:16:06
I (31) boot: chip revision: 1
I (35) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (42) boot.esp32: SPI Speed      : 40MHz
I (47) boot.esp32: SPI Mode       : DIO
I (51) boot.esp32: SPI Flash Size : 4MB
I (56) boot: Enabling RNG early entropy source...
I (61) boot: Partition Table:
I (65) boot: ## Label            Usage          Type ST Offset   Length
I (72) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (79) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (87) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (94) boot:  3 ota_0            OTA app          00 10 00010000 001db000
I (102) boot:  4 ota_1            OTA app          00 11 001f0000 001db000
I (109) boot: End of partition table
I (114) boot: No factory image, trying OTA 0
I (118) boot_comm: chip revision: 1, min. application chip revision: 0
I (126) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x4ce24 (314916) map
I (271) esp_image: segment 1: paddr=0x0005ce4c vaddr=0x3ffb0000 size=0x031cc ( 12748) load
I (277) esp_image: segment 2: paddr=0x00060020 vaddr=0x400d0020 size=0x160374 (1442676) map
I (902) esp_image: segment 3: paddr=0x001c039c vaddr=0x3ffb31cc size=0x01f78 (  8056) load
I (906) esp_image: segment 4: paddr=0x001c231c vaddr=0x40080000 size=0x00404 (  1028) load
I (909) esp_image: segment 5: paddr=0x001c2728 vaddr=0x40080404 size=0x1ee40 (126528) load
I (997) boot: Loaded app from partition at offset 0x10000
I (1040) boot: Set actual ota_seq=1 in otadata[0]
I (1041) boot: Disabling RNG early entropy source...
I (1041) psram: This chip is ESP32-D0WD
I (1046) spiram: Found 64MBit SPI RAM device
I (1050) spiram: SPI RAM mode: flash 40m sram 40m
I (1055) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (1062) cpu_start: Pro cpu up.
I (1066) cpu_start: Application information:
I (1071) cpu_start: Project name:     esp32cam-server-only
I (1077) cpu_start: App version:      0.0.9.3
I (1082) cpu_start: Compile time:     Apr  5 2021 10:14:43
I (1089) cpu_start: ELF file SHA256:  2bf5916d49a6bf33...
I (1095) cpu_start: ESP-IDF:          3.40100.200827
I (1100) cpu_start: Starting app cpu, entry point is 0x40082bec
I (0) cpu_start: App cpu up.
I (1992) spiram: SPI SRAM memory test OK
I (1993) heap_init: Initializing. RAM available for dynamic allocation:
I (1993) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1999) heap_init: At 3FFC2B08 len 0001D4F8 (117 KiB): DRAM
I (2006) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (2012) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (2019) heap_init: At 4009F244 len 00000DBC (3 KiB): IRAM
I (2025) cpu_start: Pro cpu start user code
I (2030) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (2055) spi_flash: detected chip: generic
I (2056) spi_flash: flash io: dio
I (2056) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (2064) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
Do Reset Camera
I (2074) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
Init Camera
I (4084) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4084) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4084) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4094) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4104) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4114) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4124) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4134) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4144) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4154) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4164) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (4174) sccb: pin_sda 26 pin_scl 27

I (4174) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (4324) camera: Detected OV2640 camera
I (4324) camera: Allocating 1 frame buffers (150 KB total)
I (4344) camera: Allocating 150 KB frame buffer in OnBoard RAM
I (4914) server-main: Using SDMMC peripheral
Name: 00000
Type: SDSC
Speed: 20 MHz
Size: 1910MB
I (5354) server_ota: Start CheckOTAUpdateCheck ...
Start CheckOTAUpdateCheck ...
I (5364) server_ota: SHA-256 for the partition table: : 9d4a2809ae90fb20709a8ca3dd3ac3462e1e73286bcd31b689060c91de06fa3a
I (5434) server_ota: SHA-256 for bootloader: : 8677ca5aab674ba732c280f0c34b595fce09e670bf8282c4147250de215bf674
I (6154) server_ota: SHA-256 for current firmware: : 62e4fef658991044b32ff84d87e818cef486f87eb6b04b3876803a30a68785fb
CheckOTAUpdate Partition: ESP_OK
file loaded
SSID = xxx
PASSWORD = yyy

WLan: xxx, yyy
Hostename: watermeter
Fixed IP: , Gateway , Netmask , DNS 
Connect to WLAN with dyn. IP
I (6224) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (6224) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
W (6434) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (6594) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 2
I (6664) gpio: GPIO[33]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (9704) esp_netif_handlers: sta ip: 192.168.1.78, mask: 255.255.255.0, gw: 192.168.1.254
I (9704) gpio: GPIO[33]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
IPv4 :  192.168.1.78
HostName :  watermeter

Netparameter: IP: 192.168.1.78 - GW: 192.168.1.254 - NetMask 255.255.255.0
Autoflow: sleep for : 200ms
I (11724) sntp: Time is not set yet. Connecting to WiFi and getting time over NTP.
I (11724) sntp: Initializing SNTP
I (11724) sntp: Waiting for system time to be set... (1/10)
TimeZone set to CET-1CEST,M3.5.0,M10.5.0/3
Logfile opened: /sdcard/log/message/log_2021-04-09.txt
I (13724) log: Can't open log file /sdcard/log/message/log_2021-04-09.txt
I (13724) sntp: The current date/time in Berlin is: Fri Apr  9 21:16:15 2021
I (13734) sntp: The current date/time in Berlin is: 2021-04-09_21:16
timeist 20210409-211615
Logfile opened: /sdcard/log/message/log_2021-04-09.txt
I (13744) log: Can't open log file /sdcard/log/message/log_2021-04-09.txt
Logfile opened: /sdcard/log/message/log_2021-04-09.txt
I (13764) log: Can't open log file /sdcard/log/message/log_2021-04-09.txt
Logfile opened: /sdcard/log/message/log_2021-04-09.txt
I (13774) log: Can't open log file /sdcard/log/message/log_2021-04-09.txt
time 20210409-211615
Autoflow: sleep for : 200ms
I (15784) server-main: Starting server on port: '80'
I (15784) server-main: Registering URI handlers
I (15784) server_tflite: server_part_camera - Registering URI handlers
I (15784) server_ota: server_ota - Registering URI handlers
I (15794) server_GPIO: server_GPIO - Registering URI handlers
I (15804) gpio: GPIO[12]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (15814) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
File is locked: /sdcard/config/config.ini - wait for 1

Then I access http://192.168.1.78/ and it crashes:

uri: /
1 uri: /, filename: , filepath: /sdcard
Filename: 
File requested: /sdcard/html/index.html
I (225904) serverhelp: Sending file : /sdcard/html/index.html ...
I (225924) serverhelp: File sending complete
uri: /wasserzaehler_roi.html
1 uri: /wasserzaehler_roi.html, filename: , filepath: /sdcard
Filename: 
File requested: /sdcard/html/wasserzaehler_roi.html
I (226304) serverhelp: Sending file : /sdcard/html/wasserzaehler_roi.html ...
I (226324) serverhelp: File sending complete
uri: /jquery-3.5.1.min.js
1 uri: /jquery-3.5.1.min.js, filename: , filepath: /sdcard
Filename: 
File requested: /sdcard/html/jquery-3.5.1.min.js
I (226404) serverhelp: Sending file : /sdcard/html/jquery-3.5.1.min.js ...
I (226824) serverhelp: File sending complete
handler_wasserzaehler uri:
/wasserzaehler.html?rawvalue=true
handler_wasserzaehler uri:
/wasserzaehler.html
uri: /favicon.ico
1 uri: /favicon.ico, filename: , filepath: /sdcard
Filename: 
File requested: /sdcard/html/favicon.ico
I (226964) serverhelp: Sending file : /sdcard/html/favicon.ico ...
I (226994) serverhelp: File sending complete
uri: /img_tmp/alg_roi.jpg
1 uri: /img_tmp/alg_roi.jpg, filename: alg_roi.jpg, filepath: /sdcardalg_roi.jpg
File to upload: alg_roi.jpg
ClassFlowControll::GetJPGStream alg_roi.jpg
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x4019b295  PS      : 0x00060530  A0      : 0x8010e9df  A1      : 0x3ffe8020  
A2      : 0x3ffba994  A3      : 0x3ffe8080  A4      : 0x3ffe1314  A5      : 0x00000000  
A6      : 0x00000067  A7      : 0x3ffc3c64  A8      : 0x8019b28f  A9      : 0x3ffe8000  
A10     : 0x3ffc3c64  A11     : 0x3f42f8fc  A12     : 0x00000000  A13     : 0x0000000b  
A14     : 0x00000067  A15     : 0x2e696f72  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000108  LBEG    : 0x4008d1b5  LEND    : 0x4008d1c5  LCOUNT  : 0xfffffffc  

ELF file SHA256: 2bf5916d49a6bf33

Backtrace: 0x4019b292:0x3ffe8020 0x4010e9dc:0x3ffe8080 0x400d4c9b:0x3ffe80c0 0x40103d77:0x3ffe8160 0x40102ce5:0x3ffe81a0 0x40102d9c:0x3ffe8230 0x401031b8:0x3ffe8250 0x40101f02:0x3ffe8270 0x40101f82:0x3ffe82b0 0x4008fd59:0x3ffe82d0

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:0x3fff0030,len:4
load:0x3fff0034,len:7248
ho 0 tail 12 room 4
load:0x40078000,len:13856
load:0x40080400,len:4052
entry 0x40080688
I (31) boot: ESP-IDF 3.40100.200827 2nd stage bootloader
I (31) boot: compile time 10:16:06
... the same as before ...
jomjol commented 3 years ago

I think, the problem is with the SD-card. It is not sufficient to copy the html.zip, but you need the other subdirectories and files as well (e.g. firmware, config, img_tmp, log). I do not see, that you created or copied them. I'm not an expert in linux - so maybe I'm wrong.

The easiest way to do so is: copy the content, incl. subdirectories and files from the follwing sub folder of the repository: https://github.com/jomjol/AI-on-the-edge-device/tree/master/sd-card

The html.zip is only intended for updates later on.

rgl commented 3 years ago

That was it! Sorry for wasting your time... I'm not sure why I though it was enough to only extract html.zip :-(

I've modified my instructions to:

mkdir tmp && cd tmp
git clone https://github.com/jomjol/AI-on-the-edge-device
cd AI-on-the-edge-device
git checkout --force v6.6.1
# see https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation
# see https://github.com/espressif/esptool#flash-modes
# see https://github.com/espressif/esptool/wiki/SPI-Flash-Modes
cd firmware
esptool.py -p /dev/ttyUSB0 write_flash 0x01000 bootloader.bin 0x08000 partitions.bin 0x10000 firmware.bin
cd ..
...
rsync -rt --delete sd-card/ $target/

At startup it seems to now initialize correctly and only shows these errors (warnings?) which I'm not sure if they are normal:

[Ende]Image loaded from memory: 640, 480, 3
E (26846) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (26846) task_wdt:  - IDLE0 (CPU 0)
E (26846) task_wdt: Tasks currently running:
E (26846) task_wdt: CPU 0: task_autodoFlow
E (26846) task_wdt: CPU 1: IDLE1
jomjol commented 3 years ago

This warnings are okay and due to very long calculation times for the image processing. I'll close this issue for the time beeing.

Great that your system is now starting!

rgl commented 3 years ago

Thank You!