maximkulkin / esp32-homekit-camera

Firmware for esp32-camera module to act as Apple Homekit IP camera
MIT License
399 stars 78 forks source link

Compilation error #28

Closed JKSProds closed 5 years ago

JKSProds commented 5 years ago

Mac OS 10.14

In function 'copy', inlined from 'av_lzo1x_decode' at /Users/jmonteiro/Documents/ESP8266HomeKit/esp32-homekit-camera/components/libswscale/libavutil/lzo.c:197:9: /Users/jmonteiro/Documents/ESP8266HomeKit/esp32-homekit-camera/components/libswscale/libavutil/lzo.c:105:5: error: 'memcpy' specified size between 4294967292 and 4294967295 exceeds maximum object size 2147483647 [-Werror=stringop-overflow=] memcpy(dst, src, cnt);

beckmx commented 5 years ago

are you compiling against esp8266?, the compilation is actually very straightforward, did you also use the make menuconfig?

JKSProds commented 5 years ago

Thanks for your help, its very straightforward. However the board im using is from diymore. I got it to flash, boot, being detected by HomeKit but its giving errors with the camera. I think this module uses different pins from AIThinker. Can u help me?

E (5277) camera: Camera probe failed with error 0x20001 E (5277) esp32_camera: Camera init failed with error 0x20001

maximkulkin commented 5 years ago

You need to figure out pins.. Unfortunately I can not do this remotely and without proper equipment. You'd better search for a datasheet or some kind of documentation on the module you're using.

JKSProds commented 5 years ago

Ok, I've asked the suppler for the pinout. And no more probe error.

image

For anyone o needs it. PINS for DIYMORE Board.

However, every time I open de camera inside the home app the esp32 reboots.

`I (873) cpu_start: App cpu up. I (1772) spiram: SPI SRAM memory test OK I (1773) heap_init: Initializing. RAM available for dynamic allocation: I (1773) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (1779) heap_init: At 3FFBBB60 len 000244A0 (145 KiB): DRAM I (1785) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1792) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (1798) heap_init: At 40096268 len 00009D98 (39 KiB): IRAM I (1805) cpu_start: Pro cpu start user code I (1809) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (153) cpu_start: Chip Revision: 1 W (154) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it. I (157) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (168) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations I (238) wifi: wifi driver task: 3ffcb724, prio:23, stack:3584, core=0 I (238) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (238) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (288) wifi: wifi firmware version: aeed694 I (288) wifi: config NVS flash: enabled I (288) wifi: config nano formating: disabled I (288) wifi: Init dynamic tx buffer num: 32 I (288) wifi: Init data frame dynamic rx buffer num: 32 I (298) wifi: Init management frame dynamic rx buffer num: 32 I (298) wifi: Init management short buffer num: 32 I (308) wifi: Init static tx buffer num: 16 I (308) wifi: Init static rx buffer size: 1600 I (308) wifi: Init static rx buffer num: 10 I (318) wifi: Init dynamic rx buffer num: 32 I (418) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0 I (418) wifi: mode : sta (24:6f:28:0c:9f:60) STA start I (1148) wifi: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 I (2278) wifi: state: init -> auth (b0) I (2328) wifi: state: auth -> assoc (0) I (2388) wifi: state: assoc -> run (10) I (2718) wifi: connected with Monteiro-WIFI, channel 6, HT20, bssid = 78:11:dc:52:ea:86 I (2718) wifi: pm start, type: 1

I (3728) event: sta ip: 10.0.0.51, mask: 255.255.255.0, gw: 10.0.0.250 WiFI ready I (3728) esp32_camera: Free heap: 4364344 I (3728) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3738) gpio: GPIO[14]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3748) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (3778) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (3858) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3858) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3868) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3878) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3888) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3898) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3908) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3918) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3928) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3938) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3948) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (3958) camera: Allocating 2 frame buffers (18 KB total) I (3958) camera: Allocating 9 KB frame buffer in OnBoard RAM I (3968) camera: Allocating 9 KB frame buffer in OnBoard RAM

HomeKit: Starting server HomeKit: Using existing accessory ID: C6:22:A5:D7:B2:EC HomeKit: Found admin pairing with 0A192A4A-F0D2-4462-99DA-20044EE1A8D8, disabling pair setup HomeKit: Configuring mDNS HomeKit: Got new client connection: 55 HomeKit: [Client 55] Pair Verify Step 1/2 HomeKit: [Client 55] Pair Verify Step 2/2 HomeKit: [Client 55] Found pairing with 0A192A4A-F0D2-4462-99DA-20044EE1A8D8 HomeKit: [Client 55] Verification successful, secure session established HomeKit: [Client 55] Get Accessories I (22778) esp32_camera: Creating setup endpoints response HomeKit: [Client 55] Resource I (22808) esp32_camera: Resource payload: {"image-width":640,"image-height":480,"resource-type":"image"} HomeKit: [Client 55] Update Characteristics HomeKit: [Client 55] Update Characteristics HomeKit: [Client 55] Get Characteristics HomeKit: [Client 55] Update Characteristics HomeKit: [Client 55] Get Characteristics I (28908) esp32_camera: Creating setup endpoints response HomeKit: [Client 55] Update Characteristics assertion "res == coreID || res == portMUX_FREE_VAL" failed: file "/Users/jmonteiro/esp/esp-idf/components/freertos/portmux_impl.inc.h", line 105, function: vPortCPUAcquireMutexIntsDisabledInternal abort() was called at PC 0x400d8ae7 on core 1 0x400d8ae7: __assert_func at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)

ELF file SHA256: 554606289eddf2046c0be3a2a3ea4586d65f9865ce113074d797c1ee99278456

Backtrace: 0x4008a9a0:0x3ffeb950 0x4008abe9:0x3ffeb970 0x400d8ae7:0x3ffeb990 0x40092c11:0x3ffeb9c0 0x40094da6:0x3ffeb9f0 0x400851ed:0x3ffeba10 0x4008523f:0x3ffeba30 0x400857e5:0x3ffeba50 0x4000beaf:0x3ffeba70 0x400d7df0:0x3ffeba90 0x400913c5:0x3ffec2e0 0x4008a9a0: invoke_abort at /Users/jmonteiro/esp/esp-idf/components/esp32/panic.c:715

0x4008abe9: abort at /Users/jmonteiro/esp/esp-idf/components/esp32/panic.c:715

0x400d8ae7: __assert_func at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)

0x40092c11: vPortCPUAcquireMutexIntsDisabledInternal at /Users/jmonteiro/esp/esp-idf/components/freertos/tasks.c:3507 (inlined by) vPortCPUAcquireMutexIntsDisabled at /Users/jmonteiro/esp/esp-idf/components/freertos/portmux_impl.h:98 (inlined by) vTaskEnterCritical at /Users/jmonteiro/esp/esp-idf/components/freertos/tasks.c:4201

0x40094da6: multi_heap_internal_lock at /Users/jmonteiro/esp/esp-idf/components/heap/multi_heap.c:380 (inlined by) multi_heap_malloc_impl at /Users/jmonteiro/esp/esp-idf/components/heap/multi_heap.c:416

0x400851ed: heap_caps_malloc at /Users/jmonteiro/esp/esp-idf/components/heap/heap_caps.c:354

0x4008523f: heap_caps_malloc_default at /Users/jmonteiro/esp/esp-idf/components/heap/heap_caps.c:354

0x400857e5: _malloc_r at /Users/jmonteiro/esp/esp-idf/components/newlib/syscalls.c:37

0x400d7df0: camera_stream_task at /Users/jmonteiro/Documents/ESP8266HomeKit/esp32-homekit-camera/main/app_main.c:589

0x400913c5: vPortTaskWrapper at /Users/jmonteiro/esp/esp-idf/components/freertos/port.c:435

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:6328 load:0x40078000,len:11624 load:0x40080400,len:6648 entry 0x40080764 I (29) boot: ESP-IDF v3.3 2nd stage bootloader I (29) boot: compile time 22:34:16 I (38) boot: Enabling RNG early entropy source... I (38) boot: SPI Speed : 40MHz I (38) boot: SPI Mode : DIO I (42) boot: SPI Flash Size : 4MB I (46) boot: Partition Table: I (49) boot: ## Label Usage Type ST Offset Length I (56) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (64) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (71) boot: 2 factory factory app 00 00 00010000 001f0000 I (79) boot: End of partition table I (83) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0xaf48c (717964) map I (344) esp_image: segment 1: paddr=0x000bf4b4 vaddr=0x3ffb0000 size=0x00b5c ( 2908) load I (345) esp_image: segment 2: paddr=0x000c0018 vaddr=0x400d0018 size=0x11a6ec (1156844) map 0x400d0018: _stext at ??:?

I (757) esp_image: segment 3: paddr=0x001da70c vaddr=0x3ffb0b5c size=0x03190 ( 12688) load I (762) esp_image: segment 4: paddr=0x001dd8a4 vaddr=0x40080000 size=0x00400 ( 1024) load 0x40080000: _WindowOverflow4 at /Users/jmonteiro/esp/esp-idf/components/freertos/xtensa_vectors.S:1779

I (764) esp_image: segment 5: paddr=0x001ddcac vaddr=0x40080400 size=0x15e68 ( 89704) load I (823) boot: Loaded app from partition at offset 0x10000 I (823) boot: Disabling RNG early entropy source... I (823) psram: This chip is ESP32-D0WD I (829) spiram: Found 64MBit SPI RAM device I (832) spiram: SPI RAM mode: flash 40m sram 40m I (838) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (845) cpu_start: Pro cpu up. I (849) cpu_start: Application information: I (853) cpu_start: Project name: esp32-homekit-camera I (860) cpu_start: App version: f23b543 I (865) cpu_start: Compile time: Sep 16 2019 22:34:19 I (871) cpu_start: ELF file SHA256: 554606289eddf204... I (877) cpu_start: ESP-IDF: v3.3 I (881) cpu_start: Starting app cpu, entry point is 0x40081474 0x40081474: call_start_cpu1 at /Users/jmonteiro/esp/esp-idf/components/esp32/cpu_start.c:270`

maximkulkin commented 5 years ago

Thank you for posing pin numbers, I will incorporate that into configuration.

I think by "open camera" you've meant tapping on camera to get into live stream view. That part does not work yet and latest master is not stable in general.