ESP32-CAM Sampling failed Timeout when waiting for OK (timeout: 1000) AT+SNAPSHOT=96,96,y

Whenever I would like to sample my data in esp32, I get this error: “ESP32-CAM Sampling failed Timeout when waiting for OK (timeout: 1000) AT+SNAPSHOT=96,96,y”

This is the full log:
"
[SER] Serial is connected, trying to read config…
[SER] Retrieved configuration
[SER] Device is running AT command version 1.7.0

[SER] Device is not connected to remote management API, will use daemon
[WS ] Connecting to wss://remote-mgmt.edgeimpulse.com
[WS ] Connected to wss://remote-mgmt.edgeimpulse.com
[SER] Entering snapshot stream mode…
[WS ] Device “esp32-cam2” is now connected to project “esp32-cam-tinyml”
[WS ] Go to Login - Edge Impulse to build your machine learning model!
[WS ] Not received pong from server within six seconds, re-connecting
[WS ] Trying to connect in 1 second…
[SER] Device is not connected to remote management API, will use daemon
[WS ] Connecting to wss://remote-mgmt.edgeimpulse.com
[WS ] Connected to wss://remote-mgmt.edgeimpulse.com
[SER] Entering snapshot stream mode…
[WS ] Device “esp32-cam2” is now connected to project “esp32-cam-tinyml”
[WS ] Go to Login - Edge Impulse to build your machine learning model!
[WS ] Incoming sampling request {
path: ‘/api/training/data’,
label: ‘owner’,
length: 60000,
interval: 0,
hmacKey: ‘d76489cd1d41bde879cdb008fb541bfc’,
sensor: ‘Camera (96x96)’
}
[SER] Taking snapshot…
[WS ] Failed to sample data Timeout when waiting for
OK (timeout: 1000) AT+SNAPSHOT=96,96,y
"

My ESP32-CAM flash details:
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: ec:62:60:93:00:d4
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
Flash will be erased from 0x00000000 to 0x000bdfff…
Compressed 776240 bytes to 405359…
Wrote 776240 bytes (405359 compressed) at 0x00000000 in 10.9 seconds (effective 568.5 kbit/s)…
Hash of data verified.

I’ve tried two ESP32 so I don’t think my device is broken.
What should I do to make a successful sampling of data through my device?

Hello, check the power of your board, try connecting from another USB port, try using the 64x64 size, it happens that cheap boards do not have enough power

you are using ESP32 CAM AI-thinker?

I’ve tried connecting from other USB port and also used 64x64 size and still receiving the same error.

Sampling failed

Timeout when waiting for OK (timeout: 1000) AT+SNAPSHOT=96,96,y

Sampling failed

Timeout when waiting for OK (timeout: 1000) AT+SNAPSHOT=64,64,y

Yes, I am using AI Thinker

Hello @vbcalinao,

In order to use the ESP32 CAM AI Thinker with the Edge Impulse firmware, you need to recompile it and change a few parameters: Espressif ESP-EYE (ESP32) - Edge Impulse Documentation.

The default firmware works with the ESP-EYE only.

Best,

Louis

1 Like

Hello, the pins of the camera are different, the document explains how to change if it doesn’t work after that, try connecting via usb ttl converter
Thanks Norik

1 Like

@louis what parameters do you change and how do you change it. I’m facing same problem and I’m not able to solve it.

Hello @Yamm,

The pins used for camera connection on different development boards are not the same, therefore you will need to change the #define here to fit your development board, compile and flash the firmware. Specifically for AI-Thinker ESP-CAM, since this board needs an external USB to TTL Serial Cable to upload the code/communicate with the board, the data transfer baud rate must be changed to 115200 here.

Best,

Louis