Git Product home page Git Product logo

esp32-cam-ai-thinker's Introduction

Hey 👋, welcome to my Github

Stack overflow Easy EDA Linkedin Codesandbox

I'm Raphael Brandão, a millennial, tech enthusiast and programmer by vocation.

esp32-cam-ai-thinker's People

Contributors

elasticdotventures avatar raphaelbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-cam-ai-thinker's Issues

Make fails with exit code 2

my idf version :

ESP-IDF v4.2-dev-1905-g625bd5eb1-dirty
In function 'pinMode':
/home/dhruva/esp/cam/esp32-cam-ai-thinker/components/ov2640/camera/twi.c:61:24: error: 'rtc_gpio_desc' undeclared (first use in this function); did you mean 'rtc_io_desc'?
     uint32_t rtc_reg = rtc_gpio_desc[pin].reg;
                        ^~~~~~~~~~~~~
                        rtc_io_desc
/home/dhruva/esp/cam/esp32-cam-ai-thinker/components/ov2640/camera/twi.c:61:24: note: each undeclared identifier is reported only once for each function it appears in
esp-idf/ov2640/CMakeFiles/__idf_ov2640.dir/build.make:121: recipe for target 'esp-idf/ov2640/CMakeFiles/__idf_ov2640.dir/camera/twi.c.obj' failed
make[2]: *** [esp-idf/ov2640/CMakeFiles/__idf_ov2640.dir/camera/twi.c.obj] Error 1
CMakeFiles/Makefile2:4760: recipe for target 'esp-idf/ov2640/CMakeFiles/__idf_ov2640.dir/all' failed
make[1]: *** [esp-idf/ov2640/CMakeFiles/__idf_ov2640.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

after a few lines after this..

[ 72%] Built target __idf_cbor
[ 72%] Building C object esp-idf/coap/CMakeFiles/__idf_coap.dir/port/coap_mbedtls.c.obj
[ 72%] Linking CXX static library libcoap.a
[ 72%] Built target __idf_coap
[ 73%] Linking CXX static library libasio.a
[ 73%] Built target __idf_asio
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
make failed with exit code 2

Even The original espressif repo components would give me the same error, is there any problem with my idf version or how to solve this issue?

Auto brightness

Hi, I am uploading photos every 5 mins but when I am outside and it is sunny the photos are mostly white. Is there is a way to trigger the auto white balance?

Fail while initializing OV2640

I've compiled sd_jpg example, and while running code it throws an unhandled exception.

D (501) camera: Allocating DMA buffer #15, size=3200
I (511) camera: Allocating 1 frame buffers (234 KB total)
I (511) camera: Allocating 234 KB frame buffer in PSRAM
E (521) camera: Allocating 234 KB frame buffer Failed
E (531) camera: Failed to allocate frame buffer
E (531) gpio: gpio_isr_handler_remove(396): GPIO isr service is not installed, call gpio_install_isr_service() first
E (541) camera: Camera init failed with error 0x101
E (551) camera.c:: Camera Init Failed

Using OV2640 from waveshare and WiPY 3.0

Refreshing auth token

I'm trying to use your example with google integration. I manage to compile and upload the code to ESP32-CAM. I stuck on:

I (65397) example_google_storage: Refresh auth token...
E (67617) example_google_storage: Parse FAIL!
I (67617) example_google_storage: Status = 400
I (67617) example_google_storage: Checking bucket access []...
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

How to troubleshoot error 400? I followed your guide three times to tripple check if I miss something...
I put all the configuration in Kconfig.projbuild

menu "Google Cloud Configuration"
config GCP_CLIENT_ID
string "5r.apps.googleusercontent.com"
config GCP_CLIENT_SECRET
string "f
g"
config GCP_REFRESH_TOKEN
string "1%2F7KxQnAio"
config GCP_DEVICE_CODE
string "AH-1Ng2-R
6J7S32k6EgQxLL9YF4ubbElnU1-De-K7LQ"
config GCP_BUCKET
string "esp32-cam-timelapse.appspot.com"
config GCP_PROJECT
string "esp32-cam-timelapse"
endmenu

Reboot and flash through programmer

To ease development with my FTDI FT232R interface I found that the following connections are useful:

ESP32 Pin Serial Pin Comment
EN RTS EN = CHIP_PU (I think). Not broken out, but reachable through the soldered connection of the board button which points inward. Can be used to temporarily attach/solder a cable.
GPIO0 DTR Labelled pin on the board

This can be done instead of shorting GPIO0 and GND and hitting reset. The tools automatically trigger a reboot and flashing mode that way. This should also work with CP2102 boards which have DTR and RTS available.

Additional information regarding the connection: https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader The CHIP_PU connection was deduced from the schematic.

Might be helpful to add that information?

Issue while reading file from SD card

Hello,
I want to read a simple text file, after face detection, system crashed when fread function called, writing a txt file/ image file it is working well, I pasted the backtrace please refer

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d8404 PS : 0x00060230 A0 : 0x800d84fc A1 : 0x3ffc4da0
0x400d8404: _fread_r at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/fread.c:194

A2 : 0x3ffc4f6c A3 : 0x3ffc4e00 A4 : 0x00000001 A5 : 0x00000001
A6 : 0x00000000 A7 : 0x3ffb22a8 A8 : 0x00000001 A9 : 0x3ffc4d90
A10 : 0x3ffc4f04 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x000001b6
A14 : 0x00000072 A15 : 0x0000002b SAR : 0x0000000c EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000064 LBEG : 0x40090ac0 LEND : 0x40090acb LCOUNT : 0x00000000
0x40090ac0: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:142

0x40090acb: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:152

Backtrace: 0x400d8404:0x3ffc4da0 0x400d84f9:0x3ffc4dd0 0x400d59d9:0x3ffc4df0 0x400891a9:0x3ffc4e70
0x400d8404: _fread_r at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/fread.c:194

0x400d84f9: fread at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/fread.c:301

0x400d59d9: task_process at C:\Users\XL008\Desktop\esp-idf\esp-who-master\examples\single_chip\fd_sd\build/../main/app_facenet.c:156

0x400891a9: vPortTaskWrapper at C:/Users/XL008/Desktop/ESP/esp-idf-2/components/freertos/port.c:435

Thanks & Regards,
Kiran

Have you solved the square problem?

I'v tried the ESP32-CAM-DEMO stuff and just got a bad image. far from the youtube video did.
some times even have no image.and just a square.
have you solved this problem? can you take a good picture now?

CORRUPT HEAP - Google_Storage

@raphaelbs, estava tentando upar o seu código para a minha câmera, e me deparei com esse erro:

I (5832) event: sta ip: 10.0.0.120, mask: 255.255.255.0, gw: 10.0.0.1
I (5832) example_google_storage: SYSTEM_EVENT_STA_GOT_IP
I (5832) example_google_storage: Got IP: '10.0.0.120'
I (5842) example_google_storage: Initializing SNTP
I (5852) example_google_storage: Waiting for system time to be set... (1/10)
I (7852) example_google_storage: Date from NTP: 2019-11-10_16-51-41
I (7852) example_google_storage: Set SYNC_NTP
Heap summary for capabilities 0x00000004:
  At 0x3ffbd204 len 32767 free 15980 allocated 16740 min_free 15980
    largest_free_block 15980 alloc_blocks 2 free_blocks 1 total_blocks 3
  At 0x3f800000 len 4194303 free 3950904 allocated 243316 min_free 3930984
    largest_free_block 3949520 alloc_blocks 9 free_blocks 3 total_blocks 12
  At 0x3ffae6e0 len 6432 free 0 allocated 6292 min_free 0
    largest_free_block 0 alloc_blocks 27 free_blocks 0 total_blocks 27
  At 0x3ffb9888 len 157560 free 4096 allocated 152824 min_free 96
    largest_free_block 4008 alloc_blocks 147 free_blocks 5 total_blocks 152
  At 0x3ffe0440 len 15072 free 320 allocated 14676 min_free 148
    largest_free_block 320 alloc_blocks 10 free_blocks 1 total_blocks 11
  At 0x3ffe4350 len 113840 free 110588 allocated 3208 min_free 108680
    largest_free_block 110588 alloc_blocks 2 free_blocks 1 total_blocks 3
  Totals:
    free 4081888 allocated 437056 min_free 4055888 largest_free_block 3949520
I (27932) example_google_storage: Refresh auth token...
CORRUPT HEAP: multi_heap.c:432 detected at 0x78447664
abort() was called at PC 0x40098a43 on core 0
0x40098a43: multi_heap_assert at C:/msys32/home/Acer/esp/esp-idf/components/heap/multi_heap.c:716
 (inlined by) multi_heap_malloc_impl at C:/msys32/home/Acer/esp/esp-idf/components/heap/multi_heap.c:432


ELF file SHA256: 93ed5a714f7849f63954918d2dc9cd7cfd6baf181db015b6f484f1faf0c62bec

Backtrace: 0x4008ca93:0x3ffc0ed0 0x4008cd88:0x3ffc0f00 0x40098a43:0x3ffc0f30 0x40085b34:0x3ffc0f60 0x40085ba1:0x3ffc0f90 0x400865b9:0x3ffc0fc0 0x4000beaf:0x3ffc0ff0 0x40086654:0x3ffc1010 0x400
0bef5:0x3ffc1040 0x401542e0:0x3ffc1060 0x4012c91d:0x3ffc1090 0x400d7473:0x3ffc1110 0x40095e42:0x3ffc1180
0x4008ca93: invoke_abort at C:/msys32/home/Acer/esp/esp-idf/components/esp32/panic.c:716

0x4008cd88: abort at C:/msys32/home/Acer/esp/esp-idf/components/esp32/panic.c:716

0x40098a43: multi_heap_assert at C:/msys32/home/Acer/esp/esp-idf/components/heap/multi_heap.c:716
 (inlined by) multi_heap_malloc_impl at C:/msys32/home/Acer/esp/esp-idf/components/heap/multi_heap.c:432

0x40085b34: heap_caps_malloc at C:/msys32/home/Acer/esp/esp-idf/components/heap/heap_caps.c:354

0x40085ba1: heap_caps_malloc_default at C:/msys32/home/Acer/esp/esp-idf/components/heap/heap_caps.c:354

0x400865b9: _malloc_r at C:/msys32/home/Acer/esp/esp-idf/components/newlib/syscalls.c:37

0x40086654: _calloc_r at C:/msys32/home/Acer/esp/esp-idf/components/newlib/syscalls.c:58

0x401542e0: esp_http_client_init at C:/msys32/home/Acer/esp/esp-idf/components/esp_http_client/esp_http_client.c:1236

0x4012c91d: gcp_auth_refresh_token at C:/msys32/home/Acer/esp/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_refresh_token.c:47

0x400d7473: task_gcp at C:/msys32/home/Acer/esp/esp32-cam-ai-thinker/examples/google_storage/main/main.c:122

0x40095e42: vPortTaskWrapper at C:/msys32/home/Acer/esp/esp-idf/components/freertos/port.c:436

Aparentemente, quando ele chama o gcp_auth_refresh_token() em task_gcp, ele tenta alocar em um espaço de memória já ocupado. Tem ideia do que possa ser/como resolver? estou usando a ESP-IDF stable version.
ele puxa bibliotecas da pasta raiz esp/esp-idf/components, é normal mesmo? ou devo puxar essas bibliotecas para o repositório google_storage?

Guru Meditation Error

Hello There!
One week ago i was able to do take_picture example in esp-idf platform io. Now it always gives same error, a reload loop with console down below. even i create new projects fresh, it gives same error.

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:7284
load:0x40078000,len:13664
load:0x40080400,len:4632
entry 0x400806f4
␛[0;32mI (29) boot: ESP-IDF 3.40200.210118 2nd stage bootloader␛[0m
␛[0;32mI (29) boot: compile time 12:52:06␛[0m
␛[0;32mI (29) boot: chip revision: 1␛[0m
␛[0;32mI (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0␛[0m
␛[0;32mI (40) boot.esp32: SPI Speed : 40MHz␛[0m
␛[0;32mI (44) boot.esp32: SPI Mode : DIO␛[0m
␛[0;32mI (49) boot.esp32: SPI Flash Size : 4MB␛[0m
␛[0;32mI (53) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (59) boot: Partition Table:␛[0m
␛[0;32mI (62) boot: ## Label Usage Type ST Offset Length␛[0m
␛[0;32mI (70) boot: 0 nvs WiFi data 01 02 00009000 00006000␛[0m
␛[0;32mI (77) boot: 1 phy_init RF data 01 01 0000f000 00001000␛[0m
␛[0;32mI (85) boot: 2 factory factory app 00 00 00010000 00100000␛[0m
␛[0;32mI (92) boot: End of partition table␛[0m
␛[0;32mI (96) boot_comm: chip revision: 1, min. application chip revision: 0␛[0m
␛[0;32mI (103) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d1e4 ( 53732) map␛[0m
␛[0;32mI (135) esp_image: segment 1: paddr=0x0001d20c vaddr=0x3ffb0000 size=0x021b0 ( 8624) load␛[0m
␛[0;32mI (139) esp_image: segment 2: paddr=0x0001f3c4 vaddr=0x40080000 size=0x00404 ( 1028) load␛[0m
␛[0;32mI (142) esp_image: segment 3: paddr=0x0001f7d0 vaddr=0x40080404 size=0x00848 ( 2120) load␛[0m
␛[0;32mI (151) esp_image: segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x1c008 (114696) map␛[0m
␛[0;32mI (207) esp_image: segment 5: paddr=0x0003c030 vaddr=0x40080c4c size=0x0d4d8 ( 54488) load␛[0m
␛[0;32mI (242) boot: Loaded app from partition at offset 0x10000␛[0m
␛[0;32mI (242) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (242) psram: This chip is ESP32-D0WD␛[0m
␛[0;32mI (248) spiram: Found 64MBit SPI RAM device␛[0m
␛[0;32mI (251) spiram: SPI RAM mode: flash 40m sram 40m␛[0m
␛[0;32mI (256) spiram: PSRAM initialized, cache is in low/high (2-core) mode.␛[0m
␛[0;32mI (264) cpu_start: Pro cpu up.␛[0m
␛[0;32mI (267) cpu_start: Application information:␛[0m
␛[0;32mI (272) cpu_start: Project name: sil_bastan_baslamak_gerek_bazen␛[0m
␛[0;32mI (279) cpu_start: App version: 1␛[0m
␛[0;32mI (284) cpu_start: Compile time: Feb 19 2021 12:53:16␛[0m
␛[0;32mI (290) cpu_start: ELF file SHA256: 6f2280c70e8e132b...␛[0m
␛[0;32mI (296) cpu_start: ESP-IDF: 3.40200.210118␛[0m
␛[0;32mI (301) cpu_start: Starting app cpu, entry point is 0x4008159c␛[0m
␛[0;32mI (294) cpu_start: App cpu up.␛[0m
␛[0;32mI (1194) spiram: SPI SRAM memory test OK␛[0m
␛[0;32mI (1194) heap_init: Initializing. RAM available for dynamic allocation:␛[0m
␛[0;32mI (1194) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM␛[0m
␛[0;32mI (1200) heap_init: At 3FFB2AF0 len 0002D510 (181 KiB): DRAM␛[0m
␛[0;32mI (1207) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM␛[0m
␛[0;32mI (1213) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM␛[0m
␛[0;32mI (1220) heap_init: At 4008E124 len 00011EDC (71 KiB): IRAM␛[0m
␛[0;32mI (1226) cpu_start: Pro cpu start user code␛[0m
␛[0;32mI (1231) spiram: Adding pool of 4096K of external SPI memory to heap allocator␛[0m
␛[0;32mI (1253) spi_flash: detected chip: generic␛[0m
␛[0;32mI (1253) spi_flash: flash io: dio␛[0m
␛[0;32mI (1253) cpu_start: Starting scheduler on PRO CPU.␛[0m
␛[0;32mI (0) cpu_start: Starting scheduler on APP CPU.␛[0m
␛[0;32mI (1261) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations␛[0m
␛[0;32mI (1271) sccb: pin_sda 26 pin_scl 27
␛[0m
␛[0;32mI (1271) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 ␛[0m
␛[0;32mI (1311) sccb: SCCB_Probe start␛[0m
␛[0;31mE (1801) camera: Detected camera not supported.␛[0m
␛[0;31mE (1801) camera: Camera probe failed with error 0x20004␛[0m
␛[0;31mE (1801) example:take_picture: Camera Init Failed␛[0m
␛[0;32mI (1801) example:take_picture: Taking picture...␛[0m
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

Core 0 register dump:
PC : 0x400d0e80 PS : 0x00060130 A0 : 0x800d33a1 A1 : 0x3ffb4940
A2 : 0x3f400120 A3 : 0x00000000 A4 : 0x00000001 A5 : 0x3ffb24d8
A6 : 0xffffffff A7 : 0x00000000 A8 : 0x800d0e80 A9 : 0x3ffb4920
A10 : 0x00000713 A11 : 0x3f400120 A12 : 0x3f400164 A13 : 0x00000709
A14 : 0x3f400120 A15 : 0x00000001 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000004 LBEG : 0x40087015 LEND : 0x40087025 LCOUNT : 0xfffffffa

Backtrace:0x400d0e7d:0x3ffb4940 0x400d339e:0x3ffb4960 0x4008809d:0x3ffb4990

ELF file SHA256: 6f2280c70e8e132b

Thanks..

Fail on motion detect (change_detect example)

Hi,
I flashed the change_detect example and it seemed to failed on during motion detection 👍

D (4487) camera: Allocating DMA buffer #0, size=1280
D (4497) camera: Allocating DMA buffer #1, size=1280
D (4507) camera: Allocating DMA buffer #2, size=1280
D (4507) camera: Allocating DMA buffer #3, size=1280
I (4517) camera: Allocating 2 frame buffers (37 KB total)
I (4517) camera: Allocating 18 KB frame buffer in OnBoard RAM
I (4527) camera: Allocating 18 KB frame buffer in OnBoard RAM
E (4527) gpio: gpio_install_isr_service(409): GPIO isr service already installed
E (4537) camera: gpio_install_isr_service failed (103)
E (4547) camera: Camera init failed with error 0x103
ESP_ERROR_CHECK failed: esp_err_t 0x103 (ESP_ERR_INVALID_STATE) at 0x40089ce8
0x40089ce8: _esp_error_check_failed at C:/Users/mrtom/OneDrive/Bureau/esp-idf-3/components/esp32/panic.c:726

file: "../main/main.c" line 139
func: change_detector
expression: esp_camera_init(&detection_config)

ELF file SHA256: 1021f35fa30c9879509aa9f14268eb33826956a052f05b14028a7b07a30fc08e

Backtrace: 0x40089589:0x3ffc12f0 0x40089ceb:0x3ffc1320 0x400d892f:0x3ffc1350 0x4008cf5a:0x3ffc1390
0x40089589: invoke_abort at C:/Users/mrtom/OneDrive/Bureau/esp-idf-3/components/esp32/panic.c:155

0x40089ceb: _esp_error_check_failed at C:/Users/mrtom/OneDrive/Bureau/esp-idf-3/components/esp32/panic.c:727

0x400d892f: change_detector at c:\users\mrtom\onedrive\bureau\esp-idf-3\esp32-cam-ai-thinker\examples\change_detection\build/../main/main.c:139 (discriminator 1)

0x4008cf5a: vPortTaskWrapper at C:/Users/mrtom/OneDrive/Bureau/esp-idf-3/components/freertos/port.c:143

I wonder if it's not due to the fact that esp_camera_init can only be called once.

OV2640 Camera shuts down after a couple of minutes

I'm using the ESP32-CAM.

I am running the camera in 1600x1200 8 bit mode where I am acquiring the camera's "Bayer" pattern.

I can capture multiple images but after a couple of minutes, the camera stops outputting Vsync and Hsync. I am still driving Xclk and it appears the camera's Pclk is still being outputted.

Does anyone know if the camera has a auto-shutdown mode of some sort?

Any ideas on how to address this issue?

Thanks in advance for any suggestions/comments.

Joe

What is GCP_BUCKET and GCP_PROJECT in example google_storage?

I am trying to implement the google_storage example for esp-cam. I have followed the README.md and have successfully generated the device code,access token and refresh token for the said scope on google console. However while setting the menuconfig , I am not aware of the parameters GCP_BUCKET and GCP_PROJECT. I tried to search for BUCKET concept and configured a bucket for my google cloud. Should I give my bucket name for GCP_BUCKET? and what to input for GCP_PROJECT?

mbedtls_ssl_handshake returned -0x10

Environment

  • Development Kit: ESP32-S AI-Thinker
  • Kit version (for ESP32-S AI-Thinke): v1.0
  • Module or chip used: ESP32-WROVER
  • IDF version (run git describe --tags to find it): v3.2.2
  • Build System: CMake
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it): 1.22.0-80-g6c4433a5
  • Operating System: Windows
  • Power Supply: USB

Problem Description

I am using google storage example, It uploading up to 24 images on firebase, after that it fails to open the new connection and mbedtls_ssl_handshake returned -0x10.

Code to reproduce this issue

esp_err_t gcp_storage_insert_object(const char *pic_name, const char *binary, size_t binary_size)
{
  ESP_LOGI(TAG, "Insert object [%s] in bucket [%s]...", pic_name, CONFIG_GCP_BUCKET);

  const char *URL = "https://www.googleapis.com/upload/storage/v1/b/%s/o?uploadType=media&name=%s";
  char *post_url = malloc(strlen(URL) + strlen(CONFIG_GCP_BUCKET) + strlen(pic_name));
  sprintf(post_url, URL, CONFIG_GCP_BUCKET, pic_name);

  esp_http_client_config_t config = {
      .url = post_url,
      .event_handler = gcp_build_event_handle(http_handler_cb),
      .method = HTTP_METHOD_POST};
  esp_http_client_handle_t http_client = esp_http_client_init(&config);
  esp_http_client_set_post_field(http_client, binary, binary_size);

  esp_http_client_set_header(http_client, "Content-Type", "image/jpg");
  esp_http_client_set_header(http_client, "Authorization", ACCESS_TOKEN);

  esp_err_t err = esp_http_client_perform(http_client);
  if (err == ESP_OK)
  {
    ESP_LOGI(TAG, "Status = %d", esp_http_client_get_status_code(http_client));
  }
  esp_http_client_cleanup(http_client);

  free(post_url);

  return http_status;
} 

Debug Logs

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_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:6200
load:0x40078000,len:11208
load:0x40080400,len:7124
entry 0x40080764
I (28) boot: ESP-IDF v3.2.2 2nd stage bootloader
I (28) boot: compile time 11:03:56
I (29) boot: Enabling RNG early entropy source...
I (33) boot: SPI Speed      : 40MHz
I (37) boot: SPI Mode       : DIO
I (41) boot: SPI Flash Size : 4MB
I (45) 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 00180000
I (79) boot: End of partition table
I (83) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x3a49c (238748) map
I (175) esp_image: segment 1: paddr=0x0004a4c4 vaddr=0x3ffbdb60 size=0x04008 ( 16392) load
I (182) esp_image: segment 2: paddr=0x0004e4d4 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at C:/Users/XL008/Desktop/ESP/esp-idf-2/components/freertos/xtensa_vectors.S:1779

I (183) esp_image: segment 3: paddr=0x0004e8dc vaddr=0x40080400 size=0x01734 (  5940) load
I (194) esp_image: segment 4: paddr=0x00050018 vaddr=0x400d0018 size=0x11c730 (1165104) map
0x400d0018: _flash_cache_start at ??:?

I (608) esp_image: segment 5: paddr=0x0016c750 vaddr=0x40081b34 size=0x1c81c (116764) load
0x40081b34: esp_dport_access_reg_read at C:/Users/XL008/Desktop/ESP/esp-idf-2/components/esp32/dport_access.c:270

I (676) boot: Loaded app from partition at offset 0x10000
I (676) boot: Disabling RNG early entropy source...
I (679) spiram: Found 64MBit SPI RAM device
I (682) spiram: SPI RAM mode: flash 40m sram 40m
I (687) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (694) cpu_start: Pro cpu up.
I (698) cpu_start: Starting app cpu, entry point is 0x400814c0
0x400814c0: call_start_cpu1 at C:/Users/XL008/Desktop/ESP/esp-idf-2/components/esp32/cpu_start.c:246

I (0) cpu_start: App cpu up.
I (1589) spiram: SPI SRAM memory test OK
I (1590) heap_init: Initializing. RAM available for dynamic allocation:
I (1590) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (1596) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (1602) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (1609) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (1615) heap_init: At 3FFCF088 len 00010F78 (67 KiB): DRAM
I (1621) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1627) heap_init: At 3FFE4350 len 00013CB0 (79 KiB): D/IRAM
I (1634) heap_init: At 4009E350 len 00001CB0 (7 KiB): IRAM

I (1640) cpu_start: Pro cpu start user code
I (1645) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (324) esp_apptrace: Initialized TRAX on CPU0
I (325) cpu_start: Starting scheduler on PRO CPU.
I (483) esp_apptrace: Initialized TRAX on CPU1
I (0) cpu_start: Starting scheduler on APP CPU.
I (334) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (444) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE

I (464) example_google_storage: Saved wifi found on startup. Will attempt to connect.
I (474) wifi: wifi driver task: 3ffdb488, prio:23, stack:3584, core=0
I (474) wifi: wifi firmware version: 693c7b6
I (484) wifi: config NVS flash: disabled
I (484) wifi: config nano formating: disabled

I (484) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (494) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE

I (514) wifi: Init dynamic tx buffer num: 32
I (514) wifi: Init data frame dynamic rx buffer num: 32
I (514) wifi: Init management frame dynamic rx buffer num: 32
I (524) wifi: Init management short buffer num: 32
I (524) wifi: Init static tx buffer num: 16
I (534) wifi: Init static rx buffer size: 1600
I (534) wifi: Init static rx buffer num: 16
I (534) wifi: Init dynamic rx buffer num: 32
I (614) phy: phy_version: 4008, 544f89f, Jan 24 2019, 14:54:06, 0, 0
I (614) wifi: mode : sta (24:0a:c4:bb:33:40)
I (1954) wifi: n:11 0, o:1 0, ap:255 255, sta:11 0, prof:1
I (3194) wifi: state: init -> auth (b0)
I (3204) wifi: state: auth -> assoc (0)
I (3214) wifi: state: assoc -> run (10)
I (4284) wifi: connected with Appstute_2.4, channel 11
I (4284) wifi: pm start, type: 1
I (5474) event: sta ip: 172.30.1.64, mask: 255.255.255.0, gw: 172.30.1.1

I (5474) example_google_storage: Connected to WiFi AP

I (5504) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (5614) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5614) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5624) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5634) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5644) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5654) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5664) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5674) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5684) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5694) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (5694) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0

I (5704) camera: Allocating 1 frame buffers (37 KB total)
I (5714) camera: Allocating 37 KB frame buffer in OnBoard RAM

Heap summary for capabilities 0x00000004:
  At 0x3ffbdb28 len 52 free 0 allocated 16 min_free 0
    largest_free_block 0 alloc_blocks 1 free_blocks 0 total_blocks 1
  At 0x3ffb8000 len 6688 free 0 allocated 6600 min_free 0
    largest_free_block 0 alloc_blocks 14 free_blocks 0 total_blocks 14
  At 0x3ffb0000 len 10032 free 1516 allocated 8448 min_free 1516
    largest_free_block 1516 alloc_blocks 8 free_blocks 1 total_blocks 9
  At 0x3ffae6e0 len 6192 free 988 allocated 5156 min_free 988
    largest_free_block 988 alloc_blocks 3 free_blocks 1 total_blocks 4
  At 0x3ffb2730 len 15448 free 4704 allocated 10692 min_free 4704
    largest_free_block 4704 alloc_blocks 4 free_blocks 1 total_blocks 5
  At 0x3ffcf8a8 len 32767 free 20628 allocated 12096 min_free 20628
    largest_free_block 20628 alloc_blocks 1 free_blocks 1 total_blocks 2
  At 0x3f800000 len 4194303 free 4152492 allocated 41724 min_free 4150808
    largest_free_block 4151124 alloc_blocks 10 free_blocks 3 total_blocks 13
  At 0x3ffaff10 len 240 free 4 allocated 152 min_free 4
    largest_free_block 4 alloc_blocks 12 free_blocks 1 total_blocks 13
  At 0x3ffb6388 len 7288 free 132 allocated 7004 min_free 0
    largest_free_block 64 alloc_blocks 27 free_blocks 3 total_blocks 30
  At 0x3ffb9a20 len 16648 free 1908 allocated 14560 min_free 4
    largest_free_block 1868 alloc_blocks 33 free_blocks 4 total_blocks 37
  At 0x3ffcf088 len 69496 free 184 allocated 69116 min_free 4
    largest_free_block 156 alloc_blocks 39 free_blocks 2 total_blocks 41
  At 0x3ffe0440 len 15072 free 880 allocated 14084 min_free 880
    largest_free_block 876 alloc_blocks 17 free_blocks 2 total_blocks 19
  At 0x3ffe4350 len 81072 free 60132 allocated 20852 min_free 58224
    largest_free_block 60132 alloc_blocks 13 free_blocks 1 total_blocks 14
  Totals:
    free 4243560 allocated 210508 min_free 4237740 largest_free_block 4151124

I (6074) example_google_storage: Initializing SNTP
I (6084) example_google_storage: Waiting for system time to be set... (1/10)
I (8094) example_google_storage: Setting Indian Timezone...
I (8094) example_google_storage: Date from NTP: 2019-11-20_13-01-23
I (8094) example_google_storage: Set SYNC_NTP

I (8194) example_google_storage: Refresh auth token...
I (12484) example_google_storage: Access_token: "ya29.ImCxB3HsEuNLw2JkRkTjrcMI6izgb9Y9WgFdas4pFtbNyK-cikNfZoNivzI3AXUu5Uiji6I8EC2B57YNORcGFGphQ4aBofdlNEizDxdxGfXdrCFj9v-kKAuSD6G-pnXRqmk"
I (12484) example_google_storage: Status = 200
I (12494) example_google_storage: Checking bucket access [esp-32-cam.appspot.com]...
I (17074) example_google_storage: Bucket read!
I (17074) example_google_storage: Status = 200
I (17084) example_google_storage: Set HAS_AUTH_TOKEN

Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....

Bell Pressed
I (19284) example_google_storage: Before upload -----> free DRAM 4239796 IRAM 4247104
Photo N0. 1
I (19284) example_google_storage: Taking picture...
I (19414) example_google_storage: Setting Indian Timezone...
I (19414) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_34.jpg taken.
I (19414) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_34.jpg...
Before Upload To GCS DRAM 4239732 IRAM 4247040
I (19434) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_34.jpg] in bucket [esp-32-cam.appspot.com]...
I (23624) example_google_storage: Image uploaded!
I (23624) example_google_storage: Status = 200

After Upload To GCS DRAM 4237468 IRAM 4244776
DRAM 4237468 IRAM 4244776

Photo N0. 2
I (23634) example_google_storage: Taking picture...
I (23734) example_google_storage: Setting Indian Timezone...
I (23734) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_39.jpg taken.
I (23734) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_39.jpg...
Before Upload To GCS DRAM 4237604 IRAM 4244912
I (23754) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_39.jpg] in bucket [esp-32-cam.appspot.com]...
I (28234) example_google_storage: Image uploaded!
I (28234) example_google_storage: Status = 200

After Upload To GCS DRAM 4235316 IRAM 4242624
DRAM 4235316 IRAM 4242624

Photo N0. 3
I (28244) example_google_storage: Taking picture...
I (28374) example_google_storage: Setting Indian Timezone...
I (28374) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_43.jpg taken.
I (28374) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_43.jpg...
Before Upload To GCS DRAM 4235452 IRAM 4242760
I (28394) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_43.jpg] in bucket [esp-32-cam.appspot.com]...
I (33354) example_google_storage: Image uploaded!
I (33354) example_google_storage: Status = 200

After Upload To GCS DRAM 4233168 IRAM 4240476
DRAM 4233168 IRAM 4240476

Photo N0. 4
I (33364) example_google_storage: Taking picture...
I (33484) example_google_storage: Setting Indian Timezone...
I (33484) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_48.jpg taken.
I (33494) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_48.jpg...
Before Upload To GCS DRAM 4233300 IRAM 4240608
I (33504) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_48.jpg] in bucket [esp-32-cam.appspot.com]...
I (37864) example_google_storage: Image uploaded!
I (37864) example_google_storage: Status = 200

After Upload To GCS DRAM 4231032 IRAM 4238340
DRAM 4231032 IRAM 4238340

Photo N0. 5
I (37874) example_google_storage: Taking picture...
I (37964) example_google_storage: Setting Indian Timezone...
I (37964) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_53.jpg taken.
I (37974) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_53.jpg...
Before Upload To GCS DRAM 4231176 IRAM 4238484
I (37984) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_53.jpg] in bucket [esp-32-cam.appspot.com]...
I (42364) example_google_storage: Image uploaded!
I (42374) example_google_storage: Status = 200

After Upload To GCS DRAM 4228900 IRAM 4236208
DRAM 4228900 IRAM 4236208

Photo N0. 6
I (42374) example_google_storage: Taking picture...
I (42524) example_google_storage: Setting Indian Timezone...
I (42524) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_57.jpg taken.
I (42534) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_57.jpg...
Before Upload To GCS DRAM 4229028 IRAM 4236336
I (42544) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_01_57.jpg] in bucket [esp-32-cam.appspot.com]...
I (47074) example_google_storage: Image uploaded!
I (47074) example_google_storage: Status = 200

After Upload To GCS DRAM 4226772 IRAM 4234080
DRAM 4226772 IRAM 4234080

Photo N0. 7
I (47084) example_google_storage: Taking picture...
I (47164) example_google_storage: Setting Indian Timezone...
I (47164) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_02.jpg taken.
I (47164) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_02.jpg...
Before Upload To GCS DRAM 4226900 IRAM 4234208
I (47184) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_02.jpg] in bucket [esp-32-cam.appspot.com]...
I (51784) example_google_storage: Image uploaded!
I (51784) example_google_storage: Status = 200

After Upload To GCS DRAM 4224620 IRAM 4231928
DRAM 4224620 IRAM 4231928

Photo N0. 8
I (51794) example_google_storage: Taking picture...
I (51884) example_google_storage: Setting Indian Timezone...
I (51884) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_07.jpg taken.
I (51884) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_07.jpg...
Before Upload To GCS DRAM 4224748 IRAM 4232056
I (51904) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_07.jpg] in bucket [esp-32-cam.appspot.com]...
I (56404) example_google_storage: Image uploaded!
I (56404) example_google_storage: Status = 200

After Upload To GCS DRAM 4222480 IRAM 4229788
DRAM 4222480 IRAM 4229788

Photo N0. 9
I (56404) example_google_storage: Taking picture...
I (56514) example_google_storage: Setting Indian Timezone...
I (56524) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_11.jpg taken.
I (56524) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_11.jpg...
Before Upload To GCS DRAM 4222612 IRAM 4229920
I (56534) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_11.jpg] in bucket [esp-32-cam.appspot.com]...
I (61004) example_google_storage: Image uploaded!
I (61004) example_google_storage: Status = 200

After Upload To GCS DRAM 4220440 IRAM 4227748
DRAM 4220440 IRAM 4227748

Photo N0. 10
I (61014) example_google_storage: Taking picture...
I (61154) example_google_storage: Setting Indian Timezone...
I (61154) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_16.jpg taken.
I (61164) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_16.jpg...
Before Upload To GCS DRAM 4220568 IRAM 4227876
I (61174) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_16.jpg] in bucket [esp-32-cam.appspot.com]...
I (65714) example_google_storage: Image uploaded!
I (65714) example_google_storage: Status = 200

After Upload To GCS DRAM 4218380 IRAM 4225688
DRAM 4218380 IRAM 4225688

Photo N0. 11
I (65724) example_google_storage: Taking picture...
I (65874) example_google_storage: Setting Indian Timezone...
I (65874) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_21.jpg taken.
I (65884) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_21.jpg...
Before Upload To GCS DRAM 4218512 IRAM 4225820
I (65894) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_21.jpg] in bucket [esp-32-cam.appspot.com]...
I (70334) example_google_storage: Image uploaded!
I (70334) example_google_storage: Status = 200

After Upload To GCS DRAM 4216328 IRAM 4223636
DRAM 4216328 IRAM 4223636

Photo N0. 12
I (70344) example_google_storage: Taking picture...
I (70434) example_google_storage: Setting Indian Timezone...
I (70434) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_25.jpg taken.
I (70434) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_25.jpg...
Before Upload To GCS DRAM 4216460 IRAM 4223768
I (70454) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_01_34/2019_11_20_13_02_25.jpg] in bucket [esp-32-cam.appspot.com]...
I (74844) example_google_storage: Image uploaded!
I (74844) example_google_storage: Status = 200

After Upload To GCS DRAM 4214288 IRAM 4221596
DRAM 4214288 IRAM 4221596

I (74844) example_google_storage: After Upload -----> free DRAM 4214352 IRAM 4221660
I (74854) example_google_storage: After memory release -----> free DRAM 4214352 IRAM 4221660

Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....

Bell Pressed
I (76864) example_google_storage: Before upload -----> free DRAM 4214480 IRAM 4221788
Photo N0. 1
I (76864) example_google_storage: Taking picture...
I (76994) example_google_storage: Setting Indian Timezone...
I (76994) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_32.jpg taken.
I (76994) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_32.jpg...
Before Upload To GCS DRAM 4214416 IRAM 4221724
I (77014) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_32.jpg] in bucket [esp-32-cam.appspot.com]...
I (81484) example_google_storage: Image uploaded!
I (81484) example_google_storage: Status = 200

After Upload To GCS DRAM 4212252 IRAM 4219560
DRAM 4212252 IRAM 4219560

Photo N0. 2
I (81484) example_google_storage: Taking picture...
I (81624) example_google_storage: Setting Indian Timezone...
I (81634) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_37.jpg taken.
I (81634) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_37.jpg...
Before Upload To GCS DRAM 4212376 IRAM 4219684
I (81644) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_37.jpg] in bucket [esp-32-cam.appspot.com]...
I (86194) example_google_storage: Image uploaded!
I (86194) example_google_storage: Status = 200

After Upload To GCS DRAM 4210200 IRAM 4217508
DRAM 4210200 IRAM 4217508

Photo N0. 3
I (86204) example_google_storage: Taking picture...
I (86344) example_google_storage: Setting Indian Timezone...
I (86344) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_41.jpg taken.
I (86354) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_41.jpg...
Before Upload To GCS DRAM 4210324 IRAM 4217632
I (86364) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_41.jpg] in bucket [esp-32-cam.appspot.com]...
I (91104) example_google_storage: Image uploaded!
I (91104) example_google_storage: Status = 200

After Upload To GCS DRAM 4208356 IRAM 4215664
DRAM 4208356 IRAM 4215664

Photo N0. 4
I (91114) example_google_storage: Taking picture...
I (91224) example_google_storage: Setting Indian Timezone...
I (91224) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_46.jpg taken.
I (91234) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_46.jpg...
Before Upload To GCS DRAM 4208480 IRAM 4215788
I (91244) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_46.jpg] in bucket [esp-32-cam.appspot.com]...
I (96024) example_google_storage: Image uploaded!
I (96024) example_google_storage: Status = 200

After Upload To GCS DRAM 4206512 IRAM 4213820
DRAM 4206512 IRAM 4213820

Photo N0. 5
I (96034) example_google_storage: Taking picture...
I (96184) example_google_storage: Setting Indian Timezone...
I (96184) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_51.jpg taken.
I (96184) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_51.jpg...
Before Upload To GCS DRAM 4206624 IRAM 4213932
I (96204) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_51.jpg] in bucket [esp-32-cam.appspot.com]...
I (100944) example_google_storage: Image uploaded!
I (100944) example_google_storage: Status = 200

After Upload To GCS DRAM 4204668 IRAM 4211976
DRAM 4204668 IRAM 4211976

Photo N0. 6
I (100954) example_google_storage: Taking picture...
I (101064) example_google_storage: Setting Indian Timezone...
I (101064) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_56.jpg taken.
I (101064) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_56.jpg...
Before Upload To GCS DRAM 4204792 IRAM 4212100
I (101084) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_02_56.jpg] in bucket [esp-32-cam.appspot.com]...
I (105554) example_google_storage: Image uploaded!
I (105554) example_google_storage: Status = 200

After Upload To GCS DRAM 4202812 IRAM 4210120
DRAM 4202812 IRAM 4210120

Photo N0. 7
I (105554) example_google_storage: Taking picture...
I (105694) example_google_storage: Setting Indian Timezone...
I (105704) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_01.jpg taken.
I (105704) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_01.jpg...
Before Upload To GCS DRAM 4202936 IRAM 4210244
I (105724) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_01.jpg] in bucket [esp-32-cam.appspot.com]...
I (110254) example_google_storage: Image uploaded!
I (110254) example_google_storage: Status = 200

After Upload To GCS DRAM 4200964 IRAM 4208272
DRAM 4200964 IRAM 4208272

Photo N0. 8
I (110264) example_google_storage: Taking picture...
I (110414) example_google_storage: Setting Indian Timezone...
I (110414) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_05.jpg taken.
I (110424) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_05.jpg...
Before Upload To GCS DRAM 4201080 IRAM 4208388
I (110434) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_05.jpg] in bucket [esp-32-cam.appspot.com]...
I (115024) example_google_storage: Image uploaded!
I (115024) example_google_storage: Status = 200

After Upload To GCS DRAM 4199124 IRAM 4206432
DRAM 4199124 IRAM 4206432

Photo N0. 9
I (115024) example_google_storage: Taking picture...
I (115134) example_google_storage: Setting Indian Timezone...
I (115134) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_10.jpg taken.
I (115144) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_10.jpg...
Before Upload To GCS DRAM 4199248 IRAM 4206556
I (115154) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_10.jpg] in bucket [esp-32-cam.appspot.com]...
I (119614) example_google_storage: Image uploaded!
I (119624) example_google_storage: Status = 200

After Upload To GCS DRAM 4197260 IRAM 4204568
DRAM 4197260 IRAM 4204568

Photo N0. 10
I (119624) example_google_storage: Taking picture...
I (119774) example_google_storage: Setting Indian Timezone...
I (119774) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_15.jpg taken.
I (119774) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_15.jpg...
Before Upload To GCS DRAM 4197404 IRAM 4204712
I (119794) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_15.jpg] in bucket [esp-32-cam.appspot.com]...
I (124224) example_google_storage: Image uploaded!
I (124224) example_google_storage: Status = 200

After Upload To GCS DRAM 4195420 IRAM 4202728
DRAM 4195420 IRAM 4202728

Photo N0. 11
I (124234) example_google_storage: Taking picture...
I (124334) example_google_storage: Setting Indian Timezone...
I (124334) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_19.jpg taken.
I (124334) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_19.jpg...
Before Upload To GCS DRAM 4195548 IRAM 4202856
I (124354) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_19.jpg] in bucket [esp-32-cam.appspot.com]...
I (128944) example_google_storage: Image uploaded!
I (128944) example_google_storage: Status = 200

After Upload To GCS DRAM 4193576 IRAM 4200884
DRAM 4193576 IRAM 4200884

Photo N0. 12
I (128944) example_google_storage: Taking picture...
I (129054) example_google_storage: Setting Indian Timezone...
I (129054) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_24.jpg taken.
I (129054) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_24.jpg...
Before Upload To GCS DRAM 4193700 IRAM 4201008
I (129074) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_02_32/2019_11_20_13_03_24.jpg] in bucket [esp-32-cam.appspot.com]...
I (133754) example_google_storage: Image uploaded!
I (133754) example_google_storage: Status = 200

After Upload To GCS DRAM 4191720 IRAM 4199028
DRAM 4191720 IRAM 4199028

I (133764) example_google_storage: After Upload -----> free DRAM 4191780 IRAM 4199088
I (133774) example_google_storage: After memory release -----> free DRAM 4191784 IRAM 4199092

Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....

Bell Pressed
I (136484) example_google_storage: Before upload -----> free DRAM 4191912 IRAM 4199220
Photo N0. 1
I (136484) example_google_storage: Taking picture...
I (136564) example_google_storage: Setting Indian Timezone...
I (136564) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_32.jpg taken.
I (136574) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_32.jpg...
Before Upload To GCS DRAM 4191848 IRAM 4199156
I (136584) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_32.jpg] in bucket [esp-32-cam.appspot.com]...
I (141134) example_google_storage: Image uploaded!
I (141134) example_google_storage: Status = 200

After Upload To GCS DRAM 4189864 IRAM 4197172
DRAM 4189864 IRAM 4197172

Photo N0. 2
I (141144) example_google_storage: Taking picture...
I (141284) example_google_storage: Setting Indian Timezone...
I (141284) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_36.jpg taken.
I (141294) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_36.jpg...
Before Upload To GCS DRAM 4189980 IRAM 4197288
I (141304) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_36.jpg] in bucket [esp-32-cam.appspot.com]...

E (142164) esp-tls: mbedtls_ssl_handshake returned -0x10
E (142164) esp-tls: Failed to open new connection
E (142164) TRANS_SSL: Failed to open a new connection
E (142164) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 3
I (142184) example_google_storage: Taking picture...
I (142324) example_google_storage: Setting Indian Timezone...
I (142324) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_37.jpg taken.
I (142334) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_37.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (142344) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_37.jpg] in bucket [esp-32-cam.appspot.com]...

E (143194) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (143194) esp-tls: Failed to open new connection
E (143194) TRANS_SSL: Failed to open a new connection
E (143204) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 4
I (143214) example_google_storage: Taking picture...
I (143364) example_google_storage: Setting Indian Timezone...
I (143364) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_38.jpg taken.
I (143374) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_38.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (143384) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_38.jpg] in bucket [esp-32-cam.appspot.com]...

E (144104) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (144114) esp-tls: Failed to open new connection
E (144114) TRANS_SSL: Failed to open a new connection
E (144114) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 5
I (144124) example_google_storage: Taking picture...
I (144244) example_google_storage: Setting Indian Timezone...
I (144244) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_39.jpg taken.
I (144244) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_39.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (144264) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_39.jpg] in bucket [esp-32-cam.appspot.com]...

E (145034) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (145044) esp-tls: Failed to open new connection
E (145044) TRANS_SSL: Failed to open a new connection
E (145044) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 6
I (145054) example_google_storage: Taking picture...
I (145204) example_google_storage: Setting Indian Timezone...
I (145204) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_40.jpg taken.
I (145214) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_40.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (145224) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_40.jpg] in bucket [esp-32-cam.appspot.com]...

E (145954) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (145954) esp-tls: Failed to open new connection
E (145954) TRANS_SSL: Failed to open a new connection
E (145964) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 7
I (145974) example_google_storage: Taking picture...
I (146084) example_google_storage: Setting Indian Timezone...
I (146084) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_41.jpg taken.
I (146084) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_41.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (146104) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_41.jpg] in bucket [esp-32-cam.appspot.com]...

E (146884) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (146894) esp-tls: Failed to open new connection
E (146894) TRANS_SSL: Failed to open a new connection
E (146894) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189868 IRAM 4197176
DRAM 4189868 IRAM 4197176

Photo N0. 8
I (146904) example_google_storage: Taking picture...
I (147044) example_google_storage: Setting Indian Timezone...
I (147044) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_42.jpg taken.
I (147044) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_42.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (147064) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_42.jpg] in bucket [esp-32-cam.appspot.com]...

E (147814) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (147824) esp-tls: Failed to open new connection
E (147824) TRANS_SSL: Failed to open a new connection
E (147824) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 9
I (147834) example_google_storage: Taking picture...
I (147924) example_google_storage: Setting Indian Timezone...
I (147924) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_43.jpg taken.
I (147924) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_43.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (147944) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_43.jpg] in bucket [esp-32-cam.appspot.com]...

E (148724) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (148734) esp-tls: Failed to open new connection
E (148734) TRANS_SSL: Failed to open a new connection
E (148734) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 10
I (148744) example_google_storage: Taking picture...
I (148884) example_google_storage: Setting Indian Timezone...
I (148884) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_44.jpg taken.
I (148884) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_44.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (148904) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_44.jpg] in bucket [esp-32-cam.appspot.com]...

E (149594) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (149604) esp-tls: Failed to open new connection
E (149604) TRANS_SSL: Failed to open a new connection
E (149604) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 11
I (149614) example_google_storage: Taking picture...
I (149764) example_google_storage: Setting Indian Timezone...
I (149764) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_45.jpg taken.
I (149764) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_45.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (149784) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_45.jpg] in bucket [esp-32-cam.appspot.com]...

E (150474) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (150484) esp-tls: Failed to open new connection
E (150484) TRANS_SSL: Failed to open a new connection
E (150484) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

Photo N0. 12
I (150494) example_google_storage: Taking picture...
I (150644) example_google_storage: Setting Indian Timezone...
I (150644) example_google_storage: Picture 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_46.jpg taken.
I (150644) example_google_storage: Uploading 240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_46.jpg...
Before Upload To GCS DRAM 4189992 IRAM 4197300
I (150664) example_google_storage: Insert object [240AC4BB3340/2019_11_20_13_03_32/2019_11_20_13_03_46.jpg] in bucket [esp-32-cam.appspot.com]...

E (151394) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (151404) esp-tls: Failed to open new connection
E (151404) TRANS_SSL: Failed to open a new connection
E (151404) HTTP_CLIENT: Connection failed, sock < 0

After Upload To GCS DRAM 4189992 IRAM 4197300
DRAM 4189992 IRAM 4197300

I (151414) example_google_storage: After Upload -----> free DRAM 4190056 IRAM 4197364
I (151424) example_google_storage: After memory release -----> free DRAM 4190056 IRAM 4197364

Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....
Waiting for bell trigger....

Other items if possible

Failure to run example with memory error

I am trying to run the change detection example. After much consternation I got it to compile in platformIO. My attemps to run it have not been successful. Here is the failure.

␛[0;32mI (1214) spiram: SPI SRAM memory test OK␛[0m
D (1215) memory_layout: Checking 8 reserved memory ranges:␛[0m
D (1215) memory_layout: Reserved memory range 0x3f800000 - 0x40000000␛[0m
␛[0;31mE (1220) memory_layout: SOC_RESERVE_MEMORY_REGION region range 0x3f800000 - 0x40000000 overlaps with 0x3ffae000 - 0x3ffae6e0␛[0m
abort() was called at PC 0x400dc81b on core 0

ELF file SHA256: 9af668d35db12fb1

Backtrace: 0x40089370:0x3ffe34a0 0x4008981c:0x3ffe34d0 0x400dc81b:0x3ffe3500 0x400dc8c0:0x3ffe3540 0x400db895:0x3ffe3890 0x40082599:0x3ffe3c40 0x4007931a:0x3ffe3c80 |<-CORRUPTED

Rebooting...

Any ideas on what could be wrong?

LED flash turn off while taking picture

Hi,

I am aware that it is not possible to completly turn off LED as is it connected to SD card also,
but how can you at least prevent it from flashing when taking picture?

Thanx,
D

Do all pins have PWM?

When attaching a servo to PIN 16, the board panics and I get a LoadProhibited error consistently.

However, if I use PIN 12, it works phenomenally. Does pin 16 not have PWM?

avr/io.h issue on esp32 ai cam

I'm trying to store an image in the SD card and sending to server simultaneously. The included libraries are:

#include "esp_camera.h"
//#include <WiFi.h>
#include "Arduino.h"
#include <ArduinoWebsockets.h>
// Time
#include "time.h"
#include "lwip/err.h"
#include "lwip/apps/sntp.h"

// MicroSD
#include "driver/sdmmc_host.h"
#include "driver/sdmmc_defs.h"
#include "sdmmc_cmd.h"
#include "esp_vfs_fat.h"

#include <Arduino_FreeRTOS.h>
#include "camera_pins.h"

I commented wifi.h because it's getting multiple file issue

Debug messgaes
In file included from C:\Users\CG-DTE\Documents\Arduino\libraries\Arduino_FreeRTOS\src/Arduino_FreeRTOS.h:104:0,

         from D:\Codes\esp cam\cam_sd\camsd2\camsd2.ino:16:

C:\Users\CG-DTE\Documents\Arduino\libraries\Arduino_FreeRTOS\src/FreeRTOSVariant.h:12:20: fatal error: avr/io.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board AI Thinker ESP32-CAM.

How can I resolve this issue?

I can not connect again (ERR_EMPTY_RESPONSE)

First of all, thank you for all the work. Only one device can access the camera at a time. I often have the problem that if I just put down the browser I can not connect again (ERR_EMPTY_RESPONSE). Would it be possible to add a button with "disconnect"?
My second concern, a switch that the LED with set brightness only turns on when a picture or stream is made.
Thanks a lot

Arduino IDE

Do you have a version of the google storage code for arduino ide?

Error when loading in M5Cam

I am trying to adapt the google-storage example code in this repo to my M5Cam, but despite trying to force it to recognise the 4Mb RAM, it still crashes with this error:

E (489) spiram: Expected 8192KiB chip but found 4096KiB chip. Bailing out..

Are there any reasons why the code here should not work with my ESP32-based board? Thanks!

Getting the list of errors and warning while make flash

$ make flash
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
GENCONFIG
App "esp32_cam_google_storage" version: 0c5146e-dirty
CC build/bootloader/bootloader_support/src/bootloader_random.o
CC build/bootloader/bootloader_support/src/flash_encrypt.o
CC build/bootloader/bootloader_support/src/bootloader_sha.o
CC build/bootloader/bootloader_support/src/esp_image_format.o
CC build/bootloader/bootloader_support/src/flash_partitions.o
CC build/bootloader/bootloader_support/src/bootloader_clock.o
CC build/bootloader/bootloader_support/src/secure_boot.o
CC build/bootloader/bootloader_support/src/bootloader_common.o
CC build/bootloader/bootloader_support/src/bootloader_utility.o
CC build/bootloader/bootloader_support/src/bootloader_init.o
CC build/bootloader/bootloader_support/src/secure_boot_signatures.o
CC build/bootloader/bootloader_support/src/flash_qio_mode.o
CC build/bootloader/bootloader_support/src/bootloader_flash.o
AR build/bootloader/bootloader_support/libbootloader_support.a
CC build/bootloader/log/log.o
AR build/bootloader/log/liblog.a
CC build/bootloader/spi_flash/spi_flash_rom_patch.o
AR build/bootloader/spi_flash/libspi_flash.a
CC build/bootloader/soc/esp32/rtc_clk.o
CC build/bootloader/soc/esp32/rtc_time.o
CC build/bootloader/soc/esp32/rtc_sleep.o
CC build/bootloader/soc/esp32/rtc_clk_init.o
CC build/bootloader/soc/esp32/rtc_init.o
CC build/bootloader/soc/esp32/cpu_util.o
CC build/bootloader/soc/src//soc_include_legacy_warn.o
CC build/bootloader/soc/src//memory_layout_utils.o
CC build/bootloader/soc/src/hal/spi_hal.o
CC build/bootloader/soc/src/hal/spi_hal_iram.o
AR build/bootloader/soc/libsoc.a
CC build/bootloader/main/bootloader_start.o
AR build/bootloader/main/libmain.a
CC build/bootloader/efuse/esp32/esp_efuse_table.o
CC build/bootloader/efuse/src/esp_efuse_fields.o
CC build/bootloader/efuse/src/esp_efuse_utility.o
CC build/bootloader/efuse/src/esp_efuse_api.o
AR build/bootloader/efuse/libefuse.a
LD build/bootloader/bootloader.elf
esptool.py v2.7-dev
Python requirements from C:/msys32/home/nDesign/esp/esp-idf/requirements.txt are satisfied.
Building partitions from /home/nDesign/esp/esp-idf/components/partition_table/partitions_singleapp.csv...

CC build/app_trace/heap_trace_tohost.o
CC build/app_trace/app_trace.o
CC build/app_trace/host_file_io.o
CC build/app_trace/app_trace_util.o
CC build/app_trace/gcov/gcov_rtio.o
AR build/app_trace/libapp_trace.a
App "esp32_cam_google_storage" version: 0c5146e-dirty
CC build/app_update/esp_app_desc.o
CC build/app_update/esp_ota_ops.o
AR build/app_update/libapp_update.a
CXX build/asio/asio/asio/src/asio.o
AR build/asio/libasio.a
CC build/bootloader_support/src/bootloader_random.o
CC build/bootloader_support/src/flash_encrypt.o
CC build/bootloader_support/src/bootloader_sha.o
CC build/bootloader_support/src/esp_image_format.o
CC build/bootloader_support/src/flash_partitions.o
CC build/bootloader_support/src/bootloader_clock.o
CC build/bootloader_support/src/secure_boot.o
CC build/bootloader_support/src/bootloader_common.o
CC build/bootloader_support/src/bootloader_utility.o
CC build/bootloader_support/src/secure_boot_signatures.o
CC build/bootloader_support/src/flash_qio_mode.o
CC build/bootloader_support/src/bootloader_flash.o
AR build/bootloader_support/libbootloader_support.a
CC build/bt/bt.o
AR build/bt/libbt.a
CC build/coap/libcoap/src/address.o
CC build/coap/libcoap/src/async.o
CC build/coap/libcoap/src/block.o
CC build/coap/libcoap/src/coap_event.o
CC build/coap/libcoap/src/coap_hashkey.o
CC build/coap/libcoap/src/coap_session.o
CC build/coap/libcoap/src/coap_time.o
CC build/coap/libcoap/src/coap_debug.o
CC build/coap/libcoap/src/encode.o
CC build/coap/libcoap/src/mem.o
CC build/coap/libcoap/src/net.o
CC build/coap/libcoap/src/option.o
CC build/coap/libcoap/src/pdu.o
CC build/coap/libcoap/src/resource.o
CC build/coap/libcoap/src/str.o
CC build/coap/libcoap/src/subscribe.o
CC build/coap/libcoap/src/uri.o
CC build/coap/libcoap/src/coap_notls.o
CC build/coap/port/coap_io.o
AR build/coap/libcoap.a
CC build/console/commands.o
AR build/console/libconsole.a
CXX build/cxx/cxx_exception_stubs.o
CXX build/cxx/cxx_guards.o
AR build/cxx/libcxx.a
CC build/driver/rtc_module.o
CC build/driver/i2c.o
CC build/driver/sdmmc_host.o
CC build/driver/spi_slave.o
CC build/driver/can.o
CC build/driver/sdmmc_transaction.o
CC build/driver/mcpwm.o
CC build/driver/rmt.o
CC build/driver/pcnt.o
CC build/driver/timer.o
CC build/driver/gpio.o
CC build/driver/sdspi_host.o
CC build/driver/ledc.o
CC build/driver/periph_ctrl.o
CC build/driver/i2s.o
CC build/driver/sdio_slave.o
CC build/driver/sdspi_transaction.o
CC build/driver/uart.o
CC build/driver/sigmadelta.o
CC build/driver/spi_master.o
CC build/driver/spi_common.o
AR build/driver/libdriver.a
CC build/efuse/esp32/esp_efuse_table.o
CC build/efuse/src/esp_efuse_fields.o
CC build/efuse/src/esp_efuse_utility.o
CC build/efuse/src/esp_efuse_api.o
AR build/efuse/libefuse.a
CC build/esp-tls/esp_tls.o
AR build/esp-tls/libesp-tls.a
CC build/esp32/int_wdt.o
CC build/esp32/brownout.o
CC build/esp32/system_api.o
CC build/esp32/esp_himem.o
CC build/esp32/dport_access.o
CC build/esp32/hw_random.o
CC build/esp32/pm_esp32.o
CC build/esp32/reset_reason.o
CC build/esp32/intr_alloc.o
CC build/esp32/cache_err_int.o
CC build/esp32/spiram.o
CC build/esp32/clk.o
CC build/esp32/spiram_psram.o
CC build/esp32/esp_timer_esp32.o
CC build/esp32/pm_trace.o
CC build/esp32/crosscore_int.o
CC build/esp32/gdbstub.o
CC build/esp32/cache_sram_mmu.o
CC build/esp32/cpu_start.o
CC build/esp32/sleep_modes.o
CC build/esp32/task_wdt.o
CC build/esp32/esp_adapter.o
CC build/esp32/panic.o
AS build/esp32/dport_panic_highint_hdl.o
AR build/esp32/libesp32.a
CC build/esp_adc_cal/esp_adc_cal.o
AR build/esp_adc_cal/libesp_adc_cal.a
CC build/esp_common/src/esp_timer.o
CC build/esp_common/src/stack_check.o
CC build/esp_common/src/esp_err_to_name.o
CC build/esp_common/src/pm_locks.o
CC build/esp_common/src/ipc.o
CC build/esp_common/src/ets_timer_legacy.o
CC build/esp_common/src/freertos_hooks.o
CC build/esp_common/src/dbg_stubs.o
AR build/esp_common/libesp_common.a
CC build/esp_event/esp_event_private.o
CC build/esp_event/event_loop_legacy.o
CC build/esp_event/esp_event.o
CC build/esp_event/event_send.o
CC build/esp_event/default_event_loop.o
AR build/esp_event/libesp_event.a
CC build/esp_http_client/esp_http_client.o
CC build/esp_http_client/lib/http_utils.o
CC build/esp_http_client/lib/http_auth.o
CC build/esp_http_client/lib/http_header.o
AR build/esp_http_client/libesp_http_client.a
CC build/esp_http_server/src/httpd_sess.o
CC build/esp_http_server/src/httpd_parse.o
CC build/esp_http_server/src/httpd_uri.o
CC build/esp_http_server/src/httpd_txrx.o
CC build/esp_http_server/src/httpd_main.o
CC build/esp_http_server/src/util/ctrl_sock.o
AR build/esp_http_server/libesp_http_server.a
CC build/esp_https_ota/src/esp_https_ota.o
AR build/esp_https_ota/libesp_https_ota.a
CC build/esp_https_server/src/https_server.o
AR build/esp_https_server/libesp_https_server.a
CC build/esp_ringbuf/ringbuf.o
AR build/esp_ringbuf/libesp_ringbuf.a
CC build/esp_wifi/src/wifi_init.o
CC build/esp_wifi/src/coexist.o
CC build/esp_wifi/src/fast_crypto_ops.o
CC build/esp_wifi/src/mesh_event.o
CC build/esp_wifi/src/phy_init.o
CC build/esp_wifi/src/restore.o
CC build/esp_wifi/src/lib_printf.o
AR build/esp_wifi/libesp_wifi.a
CC build/espcoredump/src/core_dump_uart.o
CC build/espcoredump/src/core_dump_common.o
CC build/espcoredump/src/core_dump_flash.o
CC build/espcoredump/src/core_dump_port.o
AR build/espcoredump/libespcoredump.a
CC build/ethernet/emac_main.o
CC build/ethernet/emac_dev.o
CC build/ethernet/eth_phy/phy_tlk110.o
CC build/ethernet/eth_phy/phy_ip101.o
CC build/ethernet/eth_phy/phy_lan8720.o
CC build/ethernet/eth_phy/phy_common.o
AR build/ethernet/libethernet.a
CC build/expat/expat/expat/lib/xmlparse.o
AR build/expat/libexpat.a
CC build/fatfs/src/diskio.o
CC build/fatfs/src/vfs_fat.o
CC build/fatfs/src/vfs_fat_spiflash.o
CC build/fatfs/src/diskio_sdmmc.o
CC build/fatfs/src/vfs_fat_sdmmc.o
CC build/fatfs/src/diskio_rawflash.o
CC build/fatfs/src/ffunicode.o
CC build/fatfs/src/ff.o
CC build/fatfs/src/diskio_wl.o
CC build/fatfs/src/ffsystem.o
AR build/fatfs/libfatfs.a
CC build/freemodbus/modbus/mb.o
CC build/freemodbus/port/portevent.o
CC build/freemodbus/port/portserial.o
CC build/freemodbus/port/porttimer.o
CC build/freemodbus/port/portother.o
CC build/freemodbus/modbus/ascii/mbascii.o
CC build/freemodbus/modbus/functions/mbutils.o
CC build/freemodbus/modbus/functions/mbfunccoils.o
CC build/freemodbus/modbus/functions/mbfuncother.o
CC build/freemodbus/modbus/functions/mbfuncdisc.o
CC build/freemodbus/modbus/functions/mbfuncinput.o
CC build/freemodbus/modbus/functions/mbfuncholding.o
CC build/freemodbus/modbus/rtu/mbrtu.o
CC build/freemodbus/modbus/rtu/mbcrc.o
CC build/freemodbus/modbus_controller/mbcontroller.o
AR build/freemodbus/libfreemodbus.a
CC build/freertos/xtensa_overlay_os_hook.o
CC build/freertos/FreeRTOS-openocd.o
CC build/freertos/timers.o
CC build/freertos/tasks.o
CC build/freertos/event_groups.o
CC build/freertos/port.o
CC build/freertos/xtensa_init.o
CC build/freertos/list.o
CC build/freertos/croutine.o
CC build/freertos/queue.o
CC build/freertos/xtensa_intr.o
AS build/freertos/portasm.o
AS build/freertos/xtensa_vector_defaults.o
AS build/freertos/xtensa_vectors.o
AS build/freertos/xtensa_context.o
AS build/freertos/xtensa_intr_asm.o
AR build/freertos/libfreertos.a
CC build/google_api/gcp_auth_get_device_code.o
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_get_device_code.c: In function 'gcp_auth_get_device_code':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_get_device_code.c:27:13: warning: unused variable 'err' [-Wunused-variable]
esp_err_t err = esp_http_client_perform(http_client);
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_get_device_code.c: At top level:
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/google_api/gcp_auth_get_token.o
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_get_token.c: In function 'gcp_auth_get_token':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_get_token.c:30:13: warning: unused variable 'err' [-Wunused-variable]
esp_err_t err = esp_http_client_perform(http_client);
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_get_token.c: At top level:
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/google_api/gcp_check_bucket_access.o
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_check_bucket_access.c: In function 'gcp_check_bucket_access':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_check_bucket_access.c:34:24: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.event_handler = gcp_build_event_handle(http_handler_cb),
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_check_bucket_access.c:34:24: note: (near initialization for 'config.event_handler')
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_check_bucket_access.c: At top level:
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/google_api/http_handler.o
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/http_handler.c: In function 'gcp_build_event_handle':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/http_handler.c:92:10: warning: return from incompatible pointer type [-Wincompatible-pointer-types]
return gcp_http_event_handler;
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/http_handler.c: At top level:
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/google_api/gcp_auth_refresh_token.o
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_refresh_token.c: In function 'gcp_auth_refresh_token':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_refresh_token.c:45:24: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.event_handler = gcp_build_event_handle(http_handler_cb),
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_refresh_token.c:45:24: note: (near initialization for 'config.event_handler')
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_auth_refresh_token.c: At top level:
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/google_api/gcp_storage_insert_object.o
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_storage_insert_object.c: In function 'gcp_storage_insert_object':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_storage_insert_object.c:32:24: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.event_handler = gcp_build_event_handle(http_handler_cb),
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_storage_insert_object.c:32:24: note: (near initialization for 'config.event_handler')
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/components/google_api/gcp_storage_insert_object.c: At top level:
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
AR build/google_api/libgoogle_api.a
CC build/heap/heap_caps_init.o
CC build/heap/heap_caps.o
CC build/heap/multi_heap.o
AR build/heap/libheap.a
CC build/libsodium/port/randombytes_esp32.o
CC build/libsodium/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.o
CC build/libsodium/libsodium/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.o
CC build/libsodium/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.o
CC build/libsodium/libsodium/src/libsodium/randombytes/randombytes.o
CC build/libsodium/libsodium/src/libsodium/sodium/utils.o
CC build/libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.o
CC build/libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.o
AR build/libsodium/liblibsodium.a
CC build/log/log.o
AR build/log/liblog.a
CC build/lwip/apps/dhcpserver/dhcpserver.o
CC build/lwip/apps/ping/esp_ping.o
CC build/lwip/apps/ping/ping.o
CC build/lwip/apps/sntp/sntp.o
CC build/lwip/lwip/src/api/sockets.o
CC build/lwip/lwip/src/api/api_msg.o
CC build/lwip/lwip/src/api/err.o
CC build/lwip/lwip/src/api/netbuf.o
CC build/lwip/lwip/src/api/tcpip.o
CC build/lwip/lwip/src/api/netifapi.o
CC build/lwip/lwip/src/api/api_lib.o
CC build/lwip/lwip/src/api/netdb.o
CC build/lwip/lwip/src/apps/sntp/sntp.o
CC build/lwip/lwip/src/core/tcp_out.o
CC build/lwip/lwip/src/core/udp.o
CC build/lwip/lwip/src/core/def.o
CC build/lwip/lwip/src/core/stats.o
CC build/lwip/lwip/src/core/netif.o
CC build/lwip/lwip/src/core/pbuf.o
CC build/lwip/lwip/src/core/tcp_in.o
CC build/lwip/lwip/src/core/raw.o
CC build/lwip/lwip/src/core/ip.o
CC build/lwip/lwip/src/core/dns.o
CC build/lwip/lwip/src/core/timeouts.o
CC build/lwip/lwip/src/core/tcp.o
CC build/lwip/lwip/src/core/sys.o
CC build/lwip/lwip/src/core/memp.o
CC build/lwip/lwip/src/core/init.o
CC build/lwip/lwip/src/core/inet_chksum.o
CC build/lwip/lwip/src/core/mem.o
CC build/lwip/lwip/src/core/ipv4/icmp.o
CC build/lwip/lwip/src/core/ipv4/autoip.o
CC build/lwip/lwip/src/core/ipv4/ip4.o
CC build/lwip/lwip/src/core/ipv4/igmp.o
CC build/lwip/lwip/src/core/ipv4/ip4_addr.o
CC build/lwip/lwip/src/core/ipv4/etharp.o
CC build/lwip/lwip/src/core/ipv4/dhcp.o
CC build/lwip/lwip/src/core/ipv4/ip4_frag.o
CC build/lwip/lwip/src/core/ipv6/icmp6.o
CC build/lwip/lwip/src/core/ipv6/ethip6.o
CC build/lwip/lwip/src/core/ipv6/mld6.o
CC build/lwip/lwip/src/core/ipv6/nd6.o
CC build/lwip/lwip/src/core/ipv6/ip6.o
CC build/lwip/lwip/src/core/ipv6/ip6_addr.o
CC build/lwip/lwip/src/core/ipv6/inet6.o
CC build/lwip/lwip/src/core/ipv6/dhcp6.o
CC build/lwip/lwip/src/core/ipv6/ip6_frag.o
CC build/lwip/lwip/src/netif/ethernetif.o
CC build/lwip/lwip/src/netif/lowpan6.o
CC build/lwip/lwip/src/netif/ethernet.o
CC build/lwip/lwip/src/netif/slipif.o
CC build/lwip/port/esp32/vfs_lwip.o
CC build/lwip/port/esp32/freertos/sys_arch.o
CC build/lwip/port/esp32/netif/ethernetif.o
CC build/lwip/port/esp32/netif/dhcp_state.o
CC build/lwip/port/esp32/netif/wlanif.o
CC build/lwip/port/esp32/debug/lwip_debug.o
AR build/lwip/liblwip.a
CC build/main/main.o
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/main/main.c: In function 'initialize_sntp':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/main/main.c:90:25: warning: passing argument 2 of 'sntp_setservername' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
sntp_setservername(0, "pool.ntp.org");
^
In file included from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/main/main.c:14:0:
C:/msys32/home/nDesign/esp/esp-idf/components/lwip/lwip/src/include/lwip/apps/sntp.h:62:6: note: expected 'char *' but argument is of type 'const char *'
void sntp_setservername(u8_t idx, char *server);
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/main/main.c: In function 'task_gcp':
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/main/main.c:100:15: warning: unused variable 'err' [-Wunused-variable]
esp_err_t err;
^
C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/examples/google_storage/main/main.c: At top level:
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
AR build/main/libmain.a
CC build/mbedtls/mbedtls/library/poly1305.o
CC build/mbedtls/mbedtls/library/platform_util.o
CC build/mbedtls/mbedtls/library/havege.o
CC build/mbedtls/mbedtls/library/ssl_cookie.o
CC build/mbedtls/mbedtls/library/md5.o
CC build/mbedtls/mbedtls/library/certs.o
CC build/mbedtls/mbedtls/library/ssl_ciphersuites.o
CC build/mbedtls/mbedtls/library/camellia.o
CC build/mbedtls/mbedtls/library/x509_crl.o
CC build/mbedtls/mbedtls/library/threading.o
CC build/mbedtls/mbedtls/library/aesni.o
CC build/mbedtls/mbedtls/library/bignum.o
CC build/mbedtls/mbedtls/library/arc4.o
CC build/mbedtls/mbedtls/library/cipher_wrap.o
CC build/mbedtls/mbedtls/library/rsa_internal.o
CC build/mbedtls/mbedtls/library/aes.o
CC build/mbedtls/mbedtls/library/xtea.o
CC build/mbedtls/mbedtls/library/base64.o
CC build/mbedtls/mbedtls/library/sha512.o
CC build/mbedtls/mbedtls/library/pkcs11.o
CC build/mbedtls/mbedtls/library/ecdsa.o
CC build/mbedtls/mbedtls/library/asn1write.o
CC build/mbedtls/mbedtls/library/oid.o
CC build/mbedtls/mbedtls/library/ecjpake.o
CC build/mbedtls/mbedtls/library/ssl_tls.o
CC build/mbedtls/mbedtls/library/debug.o
CC build/mbedtls/mbedtls/library/aria.o
CC build/mbedtls/mbedtls/library/ecdh.o
CC build/mbedtls/mbedtls/library/x509_crt.o
CC build/mbedtls/mbedtls/library/ssl_srv.o
CC build/mbedtls/mbedtls/library/sha1.o
CC build/mbedtls/mbedtls/library/chacha20.o
CC build/mbedtls/mbedtls/library/md2.o
CC build/mbedtls/mbedtls/library/x509_create.o
CC build/mbedtls/mbedtls/library/cmac.o
CC build/mbedtls/mbedtls/library/gcm.o
CC build/mbedtls/mbedtls/library/version.o
CC build/mbedtls/mbedtls/library/pem.o
CC build/mbedtls/mbedtls/library/padlock.o
CC build/mbedtls/mbedtls/library/asn1parse.o
CC build/mbedtls/mbedtls/library/timing.o
CC build/mbedtls/mbedtls/library/ssl_cli.o
CC build/mbedtls/mbedtls/library/pkwrite.o
CC build/mbedtls/mbedtls/library/ssl_cache.o
CC build/mbedtls/mbedtls/library/sha256.o
CC build/mbedtls/mbedtls/library/md_wrap.o
CC build/mbedtls/mbedtls/library/entropy.o
CC build/mbedtls/mbedtls/library/hkdf.o
CC build/mbedtls/mbedtls/library/rsa.o
CC build/mbedtls/mbedtls/library/ripemd160.o
CC build/mbedtls/mbedtls/library/nist_kw.o
CC build/mbedtls/mbedtls/library/pkcs5.o
CC build/mbedtls/mbedtls/library/version_features.o
CC build/mbedtls/mbedtls/library/cipher.o
CC build/mbedtls/mbedtls/library/entropy_poll.o
CC build/mbedtls/mbedtls/library/dhm.o
CC build/mbedtls/mbedtls/library/error.o
CC build/mbedtls/mbedtls/library/ssl_ticket.o
CC build/mbedtls/mbedtls/library/x509.o
CC build/mbedtls/mbedtls/library/blowfish.o
CC build/mbedtls/mbedtls/library/chachapoly.o
CC build/mbedtls/mbedtls/library/ecp.o
CC build/mbedtls/mbedtls/library/md4.o
CC build/mbedtls/mbedtls/library/x509_csr.o
CC build/mbedtls/mbedtls/library/pkparse.o
CC build/mbedtls/mbedtls/library/md.o
CC build/mbedtls/mbedtls/library/ccm.o
CC build/mbedtls/mbedtls/library/pkcs12.o
CC build/mbedtls/mbedtls/library/ecp_curves.o
CC build/mbedtls/mbedtls/library/pk_wrap.o
CC build/mbedtls/mbedtls/library/x509write_crt.o
CC build/mbedtls/mbedtls/library/ctr_drbg.o
CC build/mbedtls/mbedtls/library/platform.o
CC build/mbedtls/mbedtls/library/pk.o
CC build/mbedtls/mbedtls/library/x509write_csr.o
CC build/mbedtls/mbedtls/library/des.o
CC build/mbedtls/mbedtls/library/hmac_drbg.o
CC build/mbedtls/mbedtls/library/memory_buffer_alloc.o
CC build/mbedtls/port/esp_sha512.o
CC build/mbedtls/port/esp_mem.o
CC build/mbedtls/port/esp_hardware.o
CC build/mbedtls/port/net_sockets.o
CC build/mbedtls/port/esp_bignum.o
CC build/mbedtls/port/esp_sha256.o
CC build/mbedtls/port/esp_sha1.o
CC build/mbedtls/port/mbedtls_debug.o
CC build/mbedtls/port/esp32/aes.o
CC build/mbedtls/port/esp32/sha.o
AR build/mbedtls/libmbedtls.a
CC build/mdns/mdns.o
CC build/mdns/mdns_networking.o
CC build/mdns/mdns_console.o
AR build/mdns/libmdns.a
CC build/mqtt/esp-mqtt/mqtt_client.o
CC build/mqtt/esp-mqtt/lib/platform_esp32_idf.o
CC build/mqtt/esp-mqtt/lib/mqtt_msg.o
CC build/mqtt/esp-mqtt/lib/mqtt_outbox.o
AR build/mqtt/libmqtt.a
CC build/newlib/select.o
CC build/newlib/pthread.o
CC build/newlib/random.o
CC build/newlib/locks.o
CC build/newlib/utime.o
CC build/newlib/poll.o
CC build/newlib/syscall_table.o
CC build/newlib/termios.o
CC build/newlib/reent_init.o
CC build/newlib/time.o
AR build/newlib/libnewlib.a
CC build/nghttp/nghttp2/lib/nghttp2_queue.o
CC build/nghttp/nghttp2/lib/nghttp2_pq.o
CC build/nghttp/nghttp2/lib/nghttp2_submit.o
CC build/nghttp/nghttp2/lib/nghttp2_frame.o
CC build/nghttp/nghttp2/lib/nghttp2_helper.o
CC build/nghttp/nghttp2/lib/nghttp2_hd.o
CC build/nghttp/nghttp2/lib/nghttp2_stream.o
CC build/nghttp/nghttp2/lib/nghttp2_session.o
CC build/nghttp/nghttp2/lib/nghttp2_rcbuf.o
CC build/nghttp/nghttp2/lib/nghttp2_hd_huffman.o
CC build/nghttp/nghttp2/lib/nghttp2_outbound_item.o
CC build/nghttp/nghttp2/lib/nghttp2_http.o
CC build/nghttp/port/http_parser.o
AR build/nghttp/libnghttp.a
CXX build/nvs_flash/src/nvs_api.o
CXX build/nvs_flash/src/nvs_storage.o
CXX build/nvs_flash/src/nvs_encr.o
CXX build/nvs_flash/src/nvs_item_hash_list.o
CXX build/nvs_flash/src/nvs_page.o
CXX build/nvs_flash/src/nvs_ops.o
AR build/nvs_flash/libnvs_flash.a
CC build/openssl/library/ssl_stack.o
CC build/openssl/library/ssl_lib.o
CC build/openssl/library/ssl_x509.o
CC build/openssl/library/ssl_pkey.o
CC build/openssl/library/ssl_methods.o
CC build/openssl/library/ssl_cert.o
CC build/openssl/platform/ssl_port.o
CC build/openssl/platform/ssl_pm.o
AR build/openssl/libopenssl.a
CC build/ov2640/conversions/yuv.o
CC build/ov2640/conversions/to_bmp.o
In file included from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/conversions/to_bmp.c:17:0:
C:/msys32/home/nDesign/esp/esp-idf/components/esp32/include/esp_spiram.h:1:2: warning: #warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead [-Wcpp]
#warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead
^
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/ov2640/conversions/esp_jpg_decode.o
In file included from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/conversions/esp_jpg_decode.c:15:0:
C:/msys32/home/nDesign/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
#warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
^
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/ov2640/camera/sccb.o
CC build/ov2640/camera/xclk.o
In file included from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/camera/private_include/camera_common.h:6:0,
from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/camera/private_include/xclk.h:3,
from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/camera/xclk.c:5:
C:/msys32/home/nDesign/esp/esp-idf/components/esp32/include/rom/lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/ov2640/camera/camera.o
In file included from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/camera/camera.c:22:0:
C:/msys32/home/nDesign/esp/esp-idf/components/esp32/include/rom/lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^
In file included from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/camera/private_include/camera_common.h:6:0,
from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/camera/camera.c:35:
C:/msys32/home/nDesign/esp/esp-idf/components/esp32/include/rom/lldesc.h:1:2: warning: #warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead [-Wcpp]
#warning rom/lldesc.h is deprecated, please use esp32/rom/lldesc.h instead
^
cc1.exe: warning: unrecognized command line option '-Wno-frame-address'
CC build/ov2640/camera/twi.o
CC build/ov2640/sensors/ov2640.o
CXX build/ov2640/conversions/to_jpg.o
In file included from C:/msys32/home/nDesign/esp/esp-idf/examples/google_esp_cam/esp32-cam-ai-thinker/components/ov2640/conversions/to_jpg.cpp:16:0:
C:/msys32/home/nDesign/esp/esp-idf/components/esp32/include/esp_spiram.h:1:2: warning: #warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead [-Wcpp]
#warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead
^
cc1plus.exe: warning: unrecognized command line option '-Wno-frame-address'
AR build/ov2640/libov2640.a
CC build/protobuf-c/protobuf-c/protobuf-c/protobuf-c.o
AR build/protobuf-c/libprotobuf-c.a
CC build/protocomm/src/common/protocomm.o
CC build/protocomm/src/security/security1.o
CC build/protocomm/src/security/security0.o
CC build/protocomm/proto-c/sec0.pb-c.o
CC build/protocomm/proto-c/constants.pb-c.o
CC build/protocomm/proto-c/session.pb-c.o
CC build/protocomm/proto-c/sec1.pb-c.o
CC build/protocomm/src/transports/protocomm_httpd.o
CC build/protocomm/src/transports/protocomm_console.o
AR build/protocomm/libprotocomm.a
CC build/pthread/pthread.o
CC build/pthread/pthread_cond_var.o
CC build/pthread/pthread_local_storage.o
AR build/pthread/libpthread.a
CC build/sdmmc/sdmmc_sd.o
CC build/sdmmc/sdmmc_cmd.o
CC build/sdmmc/sdmmc_mmc.o
CC build/sdmmc/sdmmc_common.o
CC build/sdmmc/sdmmc_io.o
CC build/sdmmc/sdmmc_init.o
AR build/sdmmc/libsdmmc.a
CC build/smartconfig_ack/smartconfig_ack.o
AR build/smartconfig_ack/libsmartconfig_ack.a
CC build/soc/esp32/rtc_clk.o
CC build/soc/esp32/rtc_time.o
CC build/soc/esp32/rtc_sleep.o
CC build/soc/esp32/gpio_periph.o
CC build/soc/esp32/rtc_clk_init.o
CC build/soc/esp32/spi_periph.o
CC build/soc/esp32/rtc_init.o
CC build/soc/esp32/sdio_slave_periph.o
CC build/soc/esp32/rtc_wdt.o
CC build/soc/esp32/sdmmc_periph.o
CC build/soc/esp32/cpu_util.o
CC build/soc/esp32/rtc_periph.o
CC build/soc/esp32/rtc_pm.o
CC build/soc/esp32/soc_memory_layout.o
CC build/soc/src//soc_include_legacy_warn.o
CC build/soc/src//memory_layout_utils.o
CC build/soc/src/hal/spi_hal.o
CC build/soc/src/hal/spi_hal_iram.o
AR build/soc/libsoc.a
CC build/spi_flash/flash_ops.o
CC build/spi_flash/cache_utils.o
CC build/spi_flash/spi_flash_rom_patch.o
CC build/spi_flash/partition.o
CC build/spi_flash/flash_mmap.o
AR build/spi_flash/libspi_flash.a
CC build/spiffs/esp_spiffs.o
CC build/spiffs/spiffs_api.o
CC build/spiffs/spiffs/src/spiffs_hydrogen.o
CC build/spiffs/spiffs/src/spiffs_check.o
CC build/spiffs/spiffs/src/spiffs_nucleus.o
CC build/spiffs/spiffs/src/spiffs_gc.o
CC build/spiffs/spiffs/src/spiffs_cache.o
AR build/spiffs/libspiffs.a
CC build/tcp_transport/transport_tcp.o
CC build/tcp_transport/transport.o
CC build/tcp_transport/transport_ssl.o
CC build/tcp_transport/transport_utils.o
CC build/tcp_transport/transport_ws.o
AR build/tcp_transport/libtcp_transport.a
CC build/tcpip_adapter/event_handlers.o
CC build/tcpip_adapter/tcpip_adapter_lwip.o
AR build/tcpip_adapter/libtcpip_adapter.a
CC build/ulp/ulp_macro.o
CC build/ulp/ulp.o
AR build/ulp/libulp.a
CC build/unity/unity/src/unity.o
CC build/unity/unity_port_esp32.o
CC build/unity/unity_runner.o
AR build/unity/libunity.a
CC build/vfs/vfs.o
CC build/vfs/vfs_semihost.o
CC build/vfs/vfs_uart.o
AR build/vfs/libvfs.a
CXX build/wear_levelling/WL_Ext_Perf.o
CXX build/wear_levelling/Partition.o
CXX build/wear_levelling/SPI_Flash.o
CXX build/wear_levelling/WL_Ext_Safe.o
CXX build/wear_levelling/WL_Flash.o
CXX build/wear_levelling/wear_levelling.o
AR build/wear_levelling/libwear_levelling.a
CC build/wifi_provisioning/src/wifi_config.o
CC build/wifi_provisioning/proto-c/wifi_config.pb-c.o
CC build/wifi_provisioning/proto-c/wifi_constants.pb-c.o
AR build/wifi_provisioning/libwifi_provisioning.a
CC build/wpa_supplicant/src/crypto/ms_funcs.o
CC build/wpa_supplicant/src/crypto/crypto_internal-cipher.o
CC build/wpa_supplicant/src/crypto/crypto_internal-modexp.o
CC build/wpa_supplicant/src/crypto/bignum.o
CC build/wpa_supplicant/src/crypto/sha1-pbkdf2.o
CC build/wpa_supplicant/src/crypto/aes-cbc.o
CC build/wpa_supplicant/src/crypto/md5.o
CC build/wpa_supplicant/src/crypto/rc4.o
CC build/wpa_supplicant/src/crypto/sha256.o
CC build/wpa_supplicant/src/crypto/dh_groups.o
CC build/wpa_supplicant/src/crypto/md4-internal.o
CC build/wpa_supplicant/src/crypto/sha1-internal.o
CC build/wpa_supplicant/src/crypto/aes-wrap.o
CC build/wpa_supplicant/src/crypto/crypto_mbedtls.o
CC build/wpa_supplicant/src/crypto/crypto_internal.o
CC build/wpa_supplicant/src/crypto/dh_group5.o
CC build/wpa_supplicant/src/crypto/des-internal.o
CC build/wpa_supplicant/src/crypto/crypto_internal-rsa.o
CC build/wpa_supplicant/src/crypto/aes-unwrap.o
CC build/wpa_supplicant/src/crypto/aes-internal-dec.o
CC build/wpa_supplicant/src/crypto/sha1.o
CC build/wpa_supplicant/src/crypto/aes-internal.o
CC build/wpa_supplicant/src/crypto/md5-internal.o
CC build/wpa_supplicant/src/crypto/sha256-internal.o
CC build/wpa_supplicant/src/crypto/aes-internal-enc.o
CC build/wpa_supplicant/port/os_xtensa.o
CC build/wpa_supplicant/src/fast_crypto/fast_crypto_internal-cipher.o
CC build/wpa_supplicant/src/fast_crypto/fast_crypto_internal-modexp.o
CC build/wpa_supplicant/src/fast_crypto/fast_aes-unwrap.o
CC build/wpa_supplicant/src/fast_crypto/fast_sha256.o
CC build/wpa_supplicant/src/fast_crypto/fast_crypto_internal.o
CC build/wpa_supplicant/src/fast_crypto/fast_aes-cbc.o
CC build/wpa_supplicant/src/fast_crypto/fast_sha256-internal.o
CC build/wpa_supplicant/src/fast_crypto/fast_aes-wrap.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap_peap_common.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap_mschapv2.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap_peap.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap_ttls.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap_tls_common.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap_tls.o
CC build/wpa_supplicant/src/wpa2/eap_peer/mschapv2.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap_common.o
CC build/wpa_supplicant/src/wpa2/eap_peer/eap.o
CC build/wpa_supplicant/src/wpa2/tls/tls_internal.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_common.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_server_write.o
CC build/wpa_supplicant/src/wpa2/tls/bignum.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_record.o
CC build/wpa_supplicant/src/wpa2/tls/pkcs5.o
CC build/wpa_supplicant/src/wpa2/tls/pkcs1.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_client_write.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_server_read.o
CC build/wpa_supplicant/src/wpa2/tls/asn1.o
CC build/wpa_supplicant/src/wpa2/tls/pkcs8.o
CC build/wpa_supplicant/src/wpa2/tls/rsa.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_client.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_client_read.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_cred.o
CC build/wpa_supplicant/src/wpa2/tls/x509v3.o
CC build/wpa_supplicant/src/wpa2/tls/tlsv1_server.o
CC build/wpa_supplicant/src/wpa2/utils/ext_password.o
CC build/wpa_supplicant/src/wpa2/utils/base64.o
CC build/wpa_supplicant/src/wps/wps_enrollee.o
CC build/wpa_supplicant/src/wps/uuid.o
CC build/wpa_supplicant/src/wps/wps_attr_build.o
CC build/wpa_supplicant/src/wps/wps_registrar.o
CC build/wpa_supplicant/src/wps/wps_common.o
CC build/wpa_supplicant/src/wps/wps.o
CC build/wpa_supplicant/src/wps/wps_dev_attr.o
CC build/wpa_supplicant/src/wps/wps_attr_parse.o
CC build/wpa_supplicant/src/wps/wps_validate.o
CC build/wpa_supplicant/src/wps/wps_attr_process.o
CC build/wpa_supplicant/src/wps/eap_common.o
AR build/wpa_supplicant/libwpa_supplicant.a
CC build/xtensa/trax.o
AR build/xtensa/libxtensa.a
Generating libapp_trace.a.sections_info
Generating libapp_update.a.sections_info
Generating libasio.a.sections_info
Generating libbootloader_support.a.sections_info
Generating libbt.a.sections_info
Generating libcoap.a.sections_info
Generating libconsole.a.sections_info
Generating libcxx.a.sections_info
Generating libdriver.a.sections_info
Generating libefuse.a.sections_info
Generating libesp-tls.a.sections_info
Generating libesp32.a.sections_info
Generating libesp_adc_cal.a.sections_info
Generating libesp_common.a.sections_info
Generating libesp_event.a.sections_info
Generating libesp_http_client.a.sections_info
Generating libesp_http_server.a.sections_info
Generating libesp_https_ota.a.sections_info
Generating libesp_https_server.a.sections_info
Generating libesp_ringbuf.a.sections_info
Generating libesp_wifi.a.sections_info
Generating libespcoredump.a.sections_info
Generating libethernet.a.sections_info
Generating libexpat.a.sections_info
Generating libfatfs.a.sections_info
Generating libfreemodbus.a.sections_info
Generating libfreertos.a.sections_info
Generating libgoogle_api.a.sections_info
Generating libheap.a.sections_info
Generating liblibsodium.a.sections_info
Generating liblog.a.sections_info
Generating liblwip.a.sections_info
Generating libmain.a.sections_info
Generating libmbedtls.a.sections_info
Generating libmdns.a.sections_info
Generating libmqtt.a.sections_info
Generating libnewlib.a.sections_info
Generating libnghttp.a.sections_info
Generating libnvs_flash.a.sections_info
Generating libopenssl.a.sections_info
Generating libov2640.a.sections_info
Generating libprotobuf-c.a.sections_info
Generating libprotocomm.a.sections_info
Generating libpthread.a.sections_info
Generating libsdmmc.a.sections_info
Generating libsmartconfig_ack.a.sections_info
Generating libsoc.a.sections_info
Generating libspi_flash.a.sections_info
Generating libspiffs.a.sections_info
Generating libtcp_transport.a.sections_info
Generating libtcpip_adapter.a.sections_info
Generating libulp.a.sections_info
Generating libunity.a.sections_info
Generating libvfs.a.sections_info
Generating libwear_levelling.a.sections_info
Generating libwifi_provisioning.a.sections_info
Generating libwpa_supplicant.a.sections_info
Generating libxtensa.a.sections_info
Generating esp32.project.ld
LD build/esp32_cam_google_storage.elf
esptool.py v2.7-dev
Flashing binaries to serial port COM9 (app at offset 0x10000)...
esptool.py v2.7-dev
Serial port COM9
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 3c:71:bf:59:c4:fc
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 24480 bytes to 14625...
Wrote 24480 bytes (14625 compressed) at 0x00001000 in 1.3 seconds (effective 150.2 kbit/s)...
Hash of data verified.
Compressed 1015520 bytes to 568329...
Wrote 1015520 bytes (568329 compressed) at 0x00010000 in 50.5 seconds (effective 160.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 4616.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

and After Resetting the pin

I am getting

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:6368
ho 0 tail 12 room 4
load:0x40078000,len:11308
load:0x40080400,len:6700
entry 0x40080764
I (31) boot: ESP-IDF v4.0-dev-402-ga20d02b7f 2nd stage bootloader
I (31) boot: compile time 08:51:59
I (31) boot: Enabling RNG early entropy source...
I (37) boot: SPI Speed : 40MHz
I (41) boot: SPI Mode : DIO
I (45) boot: SPI Flash Size : 4MB
I (49) boot: Partition Table:
I (53) boot: ## Label Usage Type ST Offset Length
I (60) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (67) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (75) boot: 2 factory factory app 00 00 00010000 00100000
I (82) boot: End of partition table
I (87) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2a9ac (174508) map
I (157) esp_image: segment 1: paddr=0x0003a9d4 vaddr=0x3ffb0000 size=0x033a0 ( 13216) load
I (162) esp_image: segment 2: paddr=0x0003dd7c vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at C:/msys32/home/nDesign/esp/esp-idf/components/freertos/xtensa_vectors.S:1779

I (164) esp_image: segment 3: paddr=0x0003e184 vaddr=0x40080400 size=0x01e8c ( 7820) load
I (176) esp_image: segment 4: paddr=0x00040018 vaddr=0x400d0018 size=0xaffb0 (720816) map
0x400d0018: _stext at ??:?

I (434) esp_image: segment 5: paddr=0x000effd0 vaddr=0x4008228c size=0x17ee4 ( 98020) load
0x4008228c: esp_spiram_writeback_cache at C:/msys32/home/nDesign/esp/esp-idf/components/esp32/spiram.c:284

I (489) boot: Loaded app from partition at offset 0x10000
I (489) boot: Disabling RNG early entropy source...
I (492) spiram: Found 64MBit SPI RAM device
I (495) spiram: SPI RAM mode: flash 40m sram 40m
I (500) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (507) cpu_start: Pro cpu up.
I (511) cpu_start: Application information:
I (516) cpu_start: Project name: esp32_cam_google_storage
I (522) cpu_start: App version: 0c5146e-dirty
I (528) cpu_start: Compile time: May 5 2019 08:52:18
I (534) cpu_start: ELF file SHA256: 49a44e9256e55947...
I (540) cpu_start: ESP-IDF: v4.0-dev-402-ga20d02b7f
I (546) cpu_start: Starting app cpu, entry point is 0x40081468
0x40081468: call_start_cpu1 at C:/msys32/home/nDesign/esp/esp-idf/components/esp32/cpu_start.c:267

I (537) cpu_start: App cpu up.
I (1438) spiram: SPI SRAM memory test OK
I (1439) heap_init: Initializing. RAM available for dynamic allocation:
I (1439) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1445) heap_init: At 3FFB9610 len 000269F0 (154 KiB): DRAM
I (1451) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1458) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1464) heap_init: At 4009A170 len 00005E90 (23 KiB): IRAM
I (1470) cpu_start: Pro cpu start user code
I (1475) spiram: Adding pool of 4096K of external SPI memory to heap allocator

Stack smashing protect failure!

abort() was called at PC 0x400d62f9 on core 0

and in my make monitor it is showing nothing
can anybody help me
make monitor
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/nDesign/esp/esp-idf/requirements.txt are satisfied.
MONITOR
--- idf_monitor on COM9 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

my kconfig.projbuild is like this
menu "Example configuration"

menu "Wifi Configuration"
config WIFI_SSID
string "Ashish Bharadwaj"
config WIFI_PASSWORD
string "8109612733"
endmenu

menu "Google Cloud Configuration"
config GCP_CLIENT_ID
string "apps.googleusercontent.com"
config GCP_CLIENT_SECRET
string ""
config GCP_REFRESH_TOKEN
string ""
config GCP_DEVICE_CODE
string ""
config GCP_BUCKET
string ""
config GCP_PROJECT
string ""
endmenu

menu "Camera configuration"

config XCLK_FREQ
  int "XCLK Frequency"
  default "20000000"
  help
      The XCLK Frequency in Herz.

menu "Pin Configuration"
  config D0
    int "D0"
    default "5"
  config D1
    int "D1"
    default "18"
  config D2
    int "D2"
    default "19"
  config D3
    int "D3"
    default "21"
  config D4
    int "D4"
    default "36"
  config D5
    int "D5"
    default "39"
  config D6
    int "D6"
    default "34"
  config D7
    int "D7"
    default "35"
  config XCLK
    int "XCLK"
    default "0"
  config PCLK
    int "PCLK"
    default "22"
  config VSYNC
    int "VSYNC"
    default "25"
  config HREF
    int "HREF"
    default "23"
  config SDA
    int "SDA"
    default "26"
  config SCL
    int "SCL"
    default "27"
  config RESET
    int "RESET"
    default "32"
endmenu

endmenu

endmenu

Please help me in this issue

Corrupt heap when refreshing

Hi there. I'm still trying to adapt your nice example code to the M5Cam (same as the AI-Thinker with 4Mb PSRAM).

So far I managed to configure the camera and the wifi as per your code, but I'm running into a corrupt heap error I'm not sure how to solve. Any ideas?

`Heap summary for capabilities 0x00000400:
At 0x3f800000 len 4194303 free 4134260 allocated 60000 min_free 4134260
largest_free_block 4134260 alloc_blocks 1 free_blocks 1 total_blocks 2
Totals:
free 4134260 allocated 60000 min_free 4134260 largest_free_block 4134260
I (34193) example_google_storage: Refresh auth token...
CORRUPT HEAP: multi_heap.c:432 detected at 0x3ffdfce4
abort() was called at PC 0x40092063 on core 0
0x40092063: multi_heap_assert at /home/marta/esp/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /home/marta/esp/esp-idf/components/heap/multi_heap.c:432

ELF file SHA256: 7e43a72216d6cac656d0d47c5c923215e7844358fb9d0760420e21332c5f36e8

Backtrace: 0x40089d90:0x3ffdeef0 0x40089fd9:0x3ffdef10 0x40092063:0x3ffdef30 0x40084d55:0x3ffdef50 0x40084d98:0x3ffdef70 0x400946ea:0x3ffdef90 0x40094708:0x3ffdefb0 0x401491eb:0x3ffdefd0 0x4012893f:0x3ffdeff0 0x400d654b:0x3ffdf060 0x4008f0e1:0x3ffdf0d0
0x40089d90: invoke_abort at /home/marta/esp/esp-idf/components/esp32/panic.c:716

0x40089fd9: abort at /home/marta/esp/esp-idf/components/esp32/panic.c:716

0x40092063: multi_heap_assert at /home/marta/esp/esp-idf/components/heap/multi_heap.c:380
(inlined by) multi_heap_malloc_impl at /home/marta/esp/esp-idf/components/heap/multi_heap.c:432

0x40084d55: heap_caps_malloc at /home/marta/esp/esp-idf/components/heap/heap_caps.c:354

0x40084d98: heap_caps_malloc_default at /home/marta/esp/esp-idf/components/heap/heap_caps.c:354

0x400946ea: _calloc_r at /home/marta/esp/esp-idf/components/newlib/heap.c:73

0x40094708: calloc at /home/marta/esp/esp-idf/components/newlib/heap.c:37

0x401491eb: esp_http_client_init at /home/marta/esp/esp-idf/components/esp_http_client/esp_http_client.c:1189

0x4012893f: gcp_auth_refresh_token at /home/marta/esp/pest-detection/components/google_api/gcp_auth_refresh_token.c:47

0x400d654b: task_gcp at /home/marta/esp/pest-detection/main/main.c:204

0x4008f0e1: vPortTaskWrapper at /home/marta/esp/esp-idf/components/freertos/port.c:435

`

ai thinker board - status

Hi, thanks a lot for assembling all the info about the ai thinker board in this repo.

Do you by any chance know the hardware status of the ai thinker board?
I checked on seeedstudio and they don't sell it any more. It is still available on Aliexpress, but I was wondering if you know if there might be a second version of the board under development?

I think the form factor is really great, but the pins used on the breakout could be improved a bit, e.g:

  • not exposing the io4 flash pin
  • not exposing the gpio16 which is connected to the psram
  • not exposing gpio2, 14, 15 which use the sd card
  • only using 2 instead of 3 gnd pins
  • not exposing gpio12 as it is also the mtdi pin which can cause trouble during boots
  • instead expose other gpio that are not used by any other service on the board (Andreas Spiess has a great google sheet of esp32 "safe" pins)

I think everybody that tried to use the camere, use the sd, have one extra UART and one extra I2C connected to the board knows the frustration with the breakout pins they chose.

Not sure if this is the best place to ask, but maybe somebody can point me in the right direction.

P.S. Is the pcb layout file of the ai thinker available online? I could not find it in your repo, so I guess not.

I have developed a pcb component for the board to be able to easily build other pcbs around the camera and uploaded it to snapeda. It is here https://www.snapeda.com/parts/ESP32-CAM/AI-Thinker/view-part/ (there still seems to be a bug as the tkeepout our tplace layer is rotated in the snapeda layer, but it shows ok with my pcb program).

GPIO 16, PSRAM and Available IO Pin

Hi, I'm looking for a free GPIO pin on ESP-CAM to attach a button or PIR, etc.

I'm using the SD card so all the HS2 pins are busy.

I see some people using GPIO 16 (U2RXD ?) , but it appears to be the chip select for the PSRAM chip. It is pulled up to 3.3v, and I think the high memory software must pull it down to enable the PSRAM chip when using the high memory. It reads 2.9v, and I don't have an oscilloscope, so I think it is being used.

So I wondering if you know if 16 is being used?

My other idea is to re-use the U0RXD? Not sure how hard that is.

mbedtls_ssl_handshake returned -0x4d80

When I am uploading many Images then I am getting following error,
E (271678) esp-tls: mbedtls_ssl_handshake returned -0x4d80
E (271678) esp-tls: Failed to open new connection
E (271678) TRANS_SSL: Failed to open a new connection
E (271678) HTTP_CLIENT: Connection failed, sock < 0

Regards,
Kiran

Flashing led when using sdcard?

Hi, thanks for the example of writing jpg to the sd card, I couldn't find another example of this for the ESP32-cam anywhere.

I have it working, but I have a question: does the flash led on your ESP32-cam also light up when using the sd slot? It seems GPIO4 is both connected to the flash led and to data1 of the sd slot. (Gives new meaning to the term 'flashing from SD'). But I thought maybe I'm missing something?

(Of course not an issue with your fine example, but with the ESP32-cam hardware design)

CONFIG_RESET was not declared ?

I tried running the main file and this was what i got , im guessing im missing some files but I can't seem to locate which one . Please kindly help thanks

Stack smashing protection mode

Hi Raphael,

This is so very helpful, thank you!

I hit a potential bug in examples/sd_jpg for which I think I found a partial fix. The default configuration for the ESP-IDF has stack smashing protection mode set to "Overall" which the example fails repeatedly (triggering restarts). Setting this to "Normal" in make menuconfig seems to fix the problem.

I'll try to learn more and hopefully find a fix that passes the more stringent protection mode.

Thanks again!

Boot error: SOC_RESERVE_MEMORY_REGION region range

Binary built with last esp-idf. When trying to run its throws error and reboots

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:7228
load:0x40078000,len:15568
load:0x40080400,len:4772
entry 0x400806f0
I (74) boot: Chip Revision: 1
I (75) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (39) boot: ESP-IDF v4.1-dev-997-gd57890cdf 2nd stage bootloader
I (39) boot: compile time 00:42:06
I (40) boot: Enabling RNG early entropy source...
I (46) boot: SPI Speed      : 40MHz
I (50) boot: SPI Mode       : DIO
I (54) boot: SPI Flash Size : 4MB
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (91) boot: End of partition table
I (95) boot_comm: chip revision: 1, min. application chip revision: 0
I (103) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x23538 (144696) map
I (164) esp_image: segment 1: paddr=0x00033560 vaddr=0x3ffb0000 size=0x0361c ( 13852) load
I (170) esp_image: segment 2: paddr=0x00036b84 vaddr=0x40080000 size=0x00400 (  1024) load
I (171) esp_image: segment 3: paddr=0x00036f8c vaddr=0x40080400 size=0x0908c ( 37004) load
I (195) esp_image: segment 4: paddr=0x00040020 vaddr=0x400d0020 size=0x93584 (603524) map
I (414) esp_image: segment 5: paddr=0x000d35ac vaddr=0x4008948c size=0x11070 ( 69744) load
I (460) boot: Loaded app from partition at offset 0x10000
I (460) boot: Disabling RNG early entropy source...
I (460) psram: This chip is ESP32-D0WD
I (466) spiram: Found 64MBit SPI RAM device
I (469) spiram: SPI RAM mode: flash 40m sram 40m
I (475) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (482) cpu_start: Pro cpu up.
I (486) cpu_start: Application information:
I (490) cpu_start: Project name:     esp32_cam_http_jpg
I (496) cpu_start: App version:      88a99fb
I (501) cpu_start: Compile time:     Nov 17 2019 00:41:54
I (507) cpu_start: ELF file SHA256:  b5d9ea31f9c8df36...
I (513) cpu_start: ESP-IDF:          v4.1-dev-997-gd57890cdf
I (520) cpu_start: Starting app cpu, entry point is 0x400815bc
I (507) cpu_start: App cpu up.
I (1415) spiram: SPI SRAM memory test OK
D (1416) memory_layout: Checking 8 reserved memory ranges:
D (1416) memory_layout: Reserved memory range 0x3f800000 - 0x40000000
E (1421) memory_layout: SOC_RESERVE_MEMORY_REGION region range 0x3f800000 - 0x40000000 overlaps with 0x3ffae000 - 0x3ffae6e0
abort() was called at PC 0x400eab1b on core 0

ELF file SHA256: b5d9ea31f9c8df3659652b4b99ec3a8664b7e056aae8481852fa4b9fdf9235a9
                                                                                                             
Backtrace: 0x40090879:0x3ffe3450 0x40090cec:0x3ffe3480 0x400eab1b:0x3ffe34b0 0x400eabc8:0x3ffe34f0 0x400d6b5a:0x3ffe3840 0x40081821:0x3ffe3bf0 0x400796a3:0x3ffe3c30 |<-CORRUPTED

SD stored pictures get by browser

Hi Dears;
I would like stored sd card jpg files get by browser. capture triger with GPIO similar digital camera. one push button capture image1.jpg second push capture image2.jpg .
after stored SD card i would like access with browser, get files by link
for example : http://ipaddress/jpeg/image1.jpg enter browser and ge file from sd card.

how can I do it_?

thanks. Best Regards

Adaptando para motion detect

Ola pessoal...
atualmente eu estou utilizando esse código pra envio de foto capturada pelo telegram...ele tira uma foto baseado em um intervalo de tempo...porem queria adaptar pra tirar uma foto via detecção.

/*
ESP32-CAM save a captured photo to Telegram
Author : ChungYi Fu (Kaohsiung, Taiwan) 2020-1-18 19:00
https://www.facebook.com/francefu
*/

// Enter your WiFi ssid and password
const char* ssid = "XXXXX"; //your network SSID
const char* password = "XXXXXX"; //your network password

String token = "XXXXXXXXXXXXXXX"; // Create your bot and get the token -> https://telegram.me/fatherbot
String chat_id = "XXXXXXX"; // Get chat_id -> https://telegram.me/userinfobot

#include <WiFi.h>
#include <WiFiClientSecure.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"

#include "esp_camera.h"

// WARNING!!! Make sure that you have either selected ESP32 Wrover Module,
// or another board which has PSRAM enabled

//CAMERA_MODEL_AI_THINKER
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27

#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22

void setup()
{
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);

Serial.begin(115200);
delay(10);

WiFi.mode(WIFI_STA);

Serial.println("");
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);

long int StartTime=millis();
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
if ((StartTime+10000) < millis()) break;
}

Serial.println("");
Serial.println("STAIP address: ");
Serial.println(WiFi.localIP());

Serial.println("");

if (WiFi.status() != WL_CONNECTED) {
Serial.println("Reset");

ledcAttachPin(4, 3);
ledcSetup(3, 5000, 8);
ledcWrite(3,10);
delay(200);
ledcWrite(3,0);
delay(200);    
ledcDetachPin(3);
    
delay(1000);
ESP.restart();

}
else {
ledcAttachPin(4, 3);
ledcSetup(3, 5000, 8);
for (int i=0;i<5;i++) {
ledcWrite(3,10);
delay(200);
ledcWrite(3,0);
delay(200);
}
ledcDetachPin(3);
}

camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sscb_sda = SIOD_GPIO_NUM;
config.pin_sscb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
//init with high specs to pre-allocate larger buffers
if(psramFound()){
config.frame_size = FRAMESIZE_UXGA;
config.jpeg_quality = 10; //0-63 lower number means higher quality
config.fb_count = 2;
} else {
config.frame_size = FRAMESIZE_SVGA;
config.jpeg_quality = 12; //0-63 lower number means higher quality
config.fb_count = 1;
}

// camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
delay(1000);
ESP.restart();
}

//drop down frame size for higher initial frame rate
sensor_t * s = esp_camera_sensor_get();
s->set_framesize(s, FRAMESIZE_CIF); // UXGA|SXGA|XGA|SVGA|VGA|CIF|QVGA|HQVGA|QQVGA
}

void loop()
{
sendCapturedImage2Telegram(token, chat_id);
delay(72000);
}

String sendCapturedImage2Telegram(String token, String chat_id) {
const char* myDomain = "149.154.167.220";
String getAll="", getBody = "";

camera_fb_t * fb = NULL;
fb = esp_camera_fb_get();
if(!fb) {
Serial.println("Camera capture failed");
delay(1000);
ESP.restart();
return "Camera capture failed";
}

Serial.println("Connect to " + String(myDomain));
WiFiClientSecure client_tcp;

if (client_tcp.connect(myDomain, 443)) {
Serial.println("Connection successful");

String head = "--Taiwan\r\nContent-Disposition: form-data; name=\"chat_id\"; \r\n\r\n" + chat_id + "\r\n--Taiwan\r\nContent-Disposition: form-data; name=\"photo\"; filename=\"esp32-cam.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n";
String tail = "\r\n--Taiwan--\r\n";

uint16_t imageLen = fb->len;
uint16_t extraLen = head.length() + tail.length();
uint16_t totalLen = imageLen + extraLen;

client_tcp.println("POST /bot"+token+"/sendPhoto HTTP/1.1");
client_tcp.println("Host: " + String(myDomain));
client_tcp.println("Content-Length: " + String(totalLen));
client_tcp.println("Content-Type: multipart/form-data; boundary=Taiwan");
client_tcp.println();
client_tcp.print(head);

uint8_t *fbBuf = fb->buf;
size_t fbLen = fb->len;
for (size_t n=0;n<fbLen;n=n+1024) {
  if (n+1024<fbLen) {
    client_tcp.write(fbBuf, 1024);
    fbBuf += 1024;
  }
  else if (fbLen%1024>0) {
    size_t remainder = fbLen%1024;
    client_tcp.write(fbBuf, remainder);
  }
}  

client_tcp.print(tail);

esp_camera_fb_return(fb);

int waitTime = 10000;   // timeout 10 seconds
long startTime = millis();
boolean state = false;

while ((startTime + waitTime) > millis())
{
  Serial.print(".");
  delay(100);      
  while (client_tcp.available()) 
  {
      char c = client_tcp.read();
      if (c == '\n') 
      {
        if (getAll.length()==0) state=true; 
        getAll = "";
      } 
      else if (c != '\r')
        getAll += String(c);
      if (state==true) getBody += String(c);
      startTime = millis();
   }
   if (getBody.length()>0) break;
}
client_tcp.stop();
Serial.println(getBody);

}
else {
getBody="Connected to api.telegram.org failed.";
Serial.println("Connected to api.telegram.org failed.");
}

return getBody;
}

Error in Http Client

Hi Raphaelbs,

I am your great fan from India.

Raphaelbs, You have done a mind-blowing job.

Please help me on this issue.

I (266759) example_google_storage: Taking picture...
I (267049) example_google_storage: Picture 2019-05-06_09-38-17.jpg taken.
I (267049) example_google_storage: Uploading 2019-05-06_09-38-17.jpg...
I (267059) example_google_storage: Insert object [2019-05-06_09-38-17.jpg] in bucket [ageyebucket]...
E (270619) HTTP_CLIENT: This authentication method is not supported: Bearer realm="https://accounts.google.com/", error=invalid_token
I (270619) example_google_storage: Image uploaded!
I (270619) example_google_storage: Status = 401
Heap summary for capabilities 0x00000004:
At 0x3ffbcf8c len 32767 free 20268 allocated 12452 min_free 0
largest_free_block 20268 alloc_blocks 2 free_blocks 1 total_blocks 3
At 0x3f800000 len 4194303 free 3950772 allocated 243440 min_free 3932676
largest_free_block 3945676 alloc_blocks 10 free_blocks 4 total_blocks 14
At 0x3ffae6e0 len 6432 free 0 allocated 6292 min_free 0
largest_free_block 0 alloc_blocks 27 free_blocks 0 total_blocks 27
At 0x3ffb9610 len 158192 free 2772 allocated 154596 min_free 0
largest_free_block 668 alloc_blocks 185 free_blocks 13 total_blocks 198
At 0x3ffe0440 len 15072 free 16 allocated 14948 min_free 0
largest_free_block 16 alloc_blocks 18 free_blocks 1 total_blocks 19
At 0x3ffe4350 len 113840 free 102100 allocated 10360 min_free 70912
largest_free_block 75776 alloc_blocks 300 free_blocks 37 total_blocks 337
Totals:
free 4076056 allocated 441968 min_free 4003588 largest_free_block 3945676

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.