ESP32-CAM & ESP32-CAM-MB serial issues

Hello everyone

I wanted to share what I’ve found while working with an ESP32-CAM with an ESP32-CAM-MB board. I posted(Edge-impulse-deamon timeout (ESP32-CAM, Raspberrypi)) two weeks about about timeout issues I experienced with edge-impulse-daemon and my ESP32. Since then I’ve gone deep into a rabbit hole and this is what I’ve found.

The TLDR version is that the ESP32-CAM-MB board uses DTR and RTS to reboot the ESP and control which mode it boots into. If DTR is on and RTS is toggled on then off, it boots into ‘code upload’ mode. If DTR is off and RTS is toggled on then off, the ESP boots into normal mode. If RTS is on, no output from the serial port is seen.

You can see this by using GTKTerm on a Raspberry Pi - it allows direct control of DTR/RTS. I was also able to replicate these results by using a short Python program:

#!/usr/bin/env python3
import serial
if __name__ == '__main__':
    ser = serial.Serial('/dev/ttyUSB0', 115200, timeout=1, rtscts=False)
    ser.reset_input_buffer()
    ser.setDTR(True)
    ser.setRTS(True)
    ser.setRTS(False)
    while True:
        if ser.in_waiting > 0:
            line = ser.readline().decode('utf-8').rstrip()
            print(line)

DTR = True - upload mode
DTR = True - normal boot mode

Could edge-impulse-daemon and edge-impulse-uploader be updated to include a flag that would result in DTR/RTS being manipulated in this fashion? That would be a huge assist for those working with the ESP32 and these boards.
thx

1 Like

I am using the ESP32-EYE and the edge-impulse-daemon works perfectly with it. I do not have to manually toggle the boot/reset buttons to work.

Also, you can modify the edge-impulse firmware code to make any additional changes or add sensors, etc. GitHub - edgeimpulse/firmware-espressif-esp32: Edge Impulse firmware for the Espressif ESP-EYE(ESP32) Development board

1 Like

Hi apineda
I’m using the AI-Thinker ESP32-CAM. The edge-impulse-daemon did not find the board - it doesn’t return anything on the serial port as long as RTS is held high.

Sorry, I didn’t pay attention to your ESP32 model very closely.
I tried to manually toggle the buttons on a plain ESP32 while the daemon was trying to connect. I did not have any luck in getting it to work.