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