New 'AI-On-The-Edge-Cam: Esp32-S3' Board Unable To Flash MicroPython? COM port drops out?

New Board Unable To Flash MicroPython? Trying to use Thonny to flash MicroPython on to board…

Downloading from https://micropython.org/resources/firmware/ESP32_GENERIC_S3-20250911-v1.26.1.bin
Writing to C:\Users\jibun\AppData\Local\Temp\tmpe7892y8o\ESP32_GENERIC_S3-20250911-v1.26.1.bin
100%"C:\Program Files (x86)\Thonny\python.exe" -u -m esptool --port COM3 --chip esp32s3 --baud 115200 write_flash --flash_mode keep --flash_size keep --erase-all 0x0 C:\Users\jibun\AppData\Local\Temp\tmpe7892y8o\ESP32_GENERIC_S3-20250911-v1.26.1.bin
esptool.py v4.8.1
Serial port COM3
Connecting...

A serial exception error occurred: Cannot configure port, something went wrong. Original message: OSError(22, 'A device which does not exist was specified.', None, 433)
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

Command returned with error code 1

The board disconnects from USB/COM Port 3 after failure.

Going to try Arduino IDE next…

Sketch uses 363111 bytes (25%) of program storage space. Maximum is 1441792 bytes.
Global variables use 40008 bytes (12%) of dynamic memory, leaving 287672 bytes for local variables. Maximum is 327680 bytes.

A fatal error occurred: Could not open COM3, the port is busy or doesn't exist.
(could not open port 'COM3': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2))

Hint: Check if the port is correct and ESP connected

esptool v5.0.0
Serial port COM3:
Failed uploading: uploading error: exit status 2

Something odd with its USB/COM port? Trying a different USB cable… Same result. Any suggestions?

I tested my setup… using one the ESP32 Stick boards, no errors communicated fine.

"C:\Program Files (x86)\Thonny\python.exe" -u -m esptool --port COM6 flash_id
esptool.py v4.8.1
Serial port COM6
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: dc:da:0c:19:6b:28
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4018
Detected flash size: 16MB
Flash type set in eFuse: quad (4 data lines)
Flash voltage set by eFuse to 3.3V
Hard resetting via RTS pin...
Done!

So something about this new board does not like my setup or the board has a fault maybe? When I plug the board in, it is visible on COM3, but any time I try to communicate with it in any way…it drops off COM3 (via USB of course).

Tried to load circuit python… source directory is empty?

https://adafruit-circuit-python.s3.amazonaws.com / bin / ai_on_the_edge_cam /

(files listed in newest first order, but in 1000-entry chunks: look below if needed)
Last Modified                   Size           Key 
---------------------------------------------------------------------------------------------
                                               ../

Now this is interesting… Just watching the console…

16:59:55.447 -> go
16:59:55.447 -> 

16:59:57.587 -> CAMERA OK
16:59:57.769 -> SD card initialized successfully.
16:59:57.769 -> SD Card initialized successfully!
16:59:57.769 -> Card type: SDHC
16:59:57.769 -> SD Card Size: 15193MB
16:59:57.769 -> 
16:59:57.769 -> ETH Started
16:59:57.862 -> Ethernet started, waiting for connection
16:59:59.806 -> ETH Connected
17:00:00.794 -> ETH MAC: 12:20:BA:77:EE:DD, IPv4: 192.168.1.214
17:00:00.794 -> FULL_DUPLEX, 100Mbps

So the test program is executing, but I cannot connect to the IP address, so guess there is now ‘web page’ being served? But I can ping the ip address…

PS C:\Users\jibun> ping 192.168.1.214

Pinging 192.168.1.214 with 32 bytes of data:
Reply from 192.168.1.214: bytes=32 time=1ms TTL=255
Reply from 192.168.1.214: bytes=32 time=1ms TTL=255
Reply from 192.168.1.214: bytes=32 time=1ms TTL=255
Reply from 192.168.1.214: bytes=32 time=2ms TTL=255

Ping statistics for 192.168.1.214:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 2ms, Average = 1ms

So the issue appears to be none of the editors/flashers I am trying to use, can take control? So I cannot reflash the board? I tried holding the boot button, thinking maybe it would be the board in ‘download’ mode?

Since I installed a camera and and microSD card, all the LEDs are green, versus blue if camera is missing and red if the microSD card is missing?

Tried multiple USB cables, multiple Windows based systems, the same results, I cannot re-flash the board. The instance that any flasher attempts to communicate with the board, i.e. write to memory, the COM port disconnects and get a communication error. Tried Ardunio IDE, Thonny IDE.

I have a Linux system, so going to load the esptools and try to flash the board directly, see if that works. Really odd the ESP32 Stick POE P CAM boards were painless to reflash, I reflashed two of the 4 I have, with the same Windows machines, no problems, so it really does seem to be something with this board.

The board fails to go into programming mode maybe? What did you use to flash the test code to the board?

I setup esptool in Linux, and was unable to run chip_id and read-mac successfully.
Connect board to Linux system…

# dmesg
[30432.044721] usb 1-3.1: new full-speed USB device number 10 using xhci_hcd
[30432.217993] usb 1-3.1: New USB device found, idVendor=239a, idProduct=811b, bcdDevice= 1.00
[30432.218016] usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[30432.218026] usb 1-3.1: Product: Feather ESP32-S3
[30432.218035] usb 1-3.1: Manufacturer: Adafruit
[30432.218043] usb 1-3.1: SerialNumber: 10:20:ba:77:ee:dc
[30432.282185] cdc_acm 1-3.1:1.0: ttyACM0: USB ACM device

Attempt to run chip_id

# esptool --port /dev/ttyACM0 chip_id
Warning: Deprecated: Command 'chip_id' is deprecated. Use 'chip-id' instead.
esptool v5.1.0
Serial port /dev/ttyACM0:
Connecting.............
A serial exception error occurred: Could not configure port: (5, 'Input/output error')
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

Attempt to run read-mac…

# esptool --port /dev/ttyACM0 read-mac
esptool v5.1.0
Serial port /dev/ttyACM0:
Connecting.............

A serial exception error occurred: Could not configure port: (5, 'Input/output error')
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

So similar to the issues encountered with the Windows 11 based systems.

So I need an example of how to flash the board correctly, I am not very familiar with direct esptool use, so maybe post an example of how to correctly flash something to the board using explicitly the esptool?

Is the following even remotely correct for this ‘ai’ board?

# esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 115200 write_flash -z 0x0 bootloader.bin 0x8000 partition_table.bin 0x10000 firmware.bin

Assuming the ‘firmware.bin’ is whatever desired to load? MicroPython, etc.

If I connect one of my ESP32 Stick POE P CAM boards… the above commands work just fine…

# demesg
[30576.154436] cdc_acm 1-3.1:1.0: ttyACM0: USB ACM device
[30594.029953] usb 1-3.1: USB disconnect, device number 11
[30664.048616] usb 1-3.1: new full-speed USB device number 12 using xhci_hcd
[30664.204012] usb 1-3.1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[30664.204034] usb 1-3.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[30664.204044] usb 1-3.1: Product: USB Serial
[30664.269536] ch341 1-3.1:1.0: ch341-uart converter detected
[30664.283547] usb 1-3.1: ch341-uart converter now attached to ttyUSB0

Query chip_id…

# esptool --port /dev/ttyUSB0 chip_id
Warning: Deprecated: Command 'chip_id' is deprecated. Use 'chip-id' instead.
esptool v5.1.0
Connected to ESP32-S3 on /dev/ttyUSB0:
Chip type:          ESP32-S3 (QFN56) (revision v0.2)
Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
Crystal frequency:  40MHz
MAC:                dc:da:0c:15:8b:d0

Stub flasher running.

Warning: ESP32-S3 has no chip ID. Reading MAC address instead.
MAC:                dc:da:0c:15:8b:d0

Hard resetting via RTS pin...

Query read-mac…

# esptool --port /dev/ttyUSB0 read-mac
esptool v5.1.0
Connected to ESP32-S3 on /dev/ttyUSB0:
Chip type:          ESP32-S3 (QFN56) (revision v0.2)
Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
Crystal frequency:  40MHz
MAC:                dc:da:0c:15:8b:d0

Stub flasher running.

MAC:                dc:da:0c:15:8b:d0

Hard resetting via RTS pin...

Oh Nuts! Just realized why this is all failing… the new board requires holding BOOT button while connecting USB cable to force board into download mode.

Now able to flash board with MicroPython…

Performing initial setup
MicroPython v1.26.1 on 2025-09-11; Generic ESP32S3 module with ESP32S3
Type "help()" for more information.
>>> 
MicroPython v1.26.1 on 2025-09-11; Generic ESP32S3 module with ESP32S3

Type "help()" for more information.

>>> import esp
>>> esp.flash_size()
16777216
>>> 

Oh, happy to hear you got it working! I also noticed it happened once or twice on some boards. I’m not sure about the reason since the reset circuit is the same.

Yeah… it is a bit odd. Could there be some type of odd power variance? Timing issue? Capacitance issue? Maybe the ESP32S3 has some type of qualify/consistency issue? Sounds like you may want to document the issue and publish it to newer owners? Or raise the issue with manufacturer of the ESP32S3?

Just for anyone that might want to flash MicroPython on this board, be sure to hold the boot button, if or when you get an issue with the serial port not communicating, easiest way to do this is to hold the boot button as you insert the USB cable. This board ‘should’ not require this procedure, but a few of these boards seem to have this quirk.

Below is the chip_id results when holding the boot button, or having hold the boot button as the USB cable is inserted. The following example was done via Thonny IDE 4.1.7, but other IDEs or using the esptool direct method, should be similar.

Disconnecting from REPL..."C:\Program Files (x86)\Thonny\python.exe" -u -m esptool --port COM17 --chip esp32s3 --baud 115200 write_flash --flash_mode keep --flash_size keep --erase-all 0x0 C:\Users\jibun\AppData\Local\Temp\tmpct_t6xif\firmware.bin
esptool.py v4.8.1
Serial port COM17
Connecting...
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: 10:20:ba:77:ee:dc
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.8s
Compressed 1922016 bytes to 1223609...
Writing at 0x00000000... (1 %)
Writing at 0x00012161... (2 %)
[Redacted]
Writing at 0x001cabb7... (98 %)
Writing at 0x001d0ccd... (100 %)
Wrote 1922016 bytes (1223609 compressed) at 0x00000000 in 10.7 seconds (effective 1441.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done!

As for flashing, I would suggest using the MicroPython Camera API firmware images that can be found on github…

https://github.com/cnadler86/micropython-camera-API

The firmware image for ‘mpy_cam-v1.26.1-ESP32_GENERIC_S3-SPIRAM_OCT’ should work fine, download and explicitly select this firmware image via the Thonny IDE flashing process…

"C:\Program Files (x86)\Thonny\python.exe" -u -m esptool --port COM17 --chip esp32s3 --baud 115200 write_flash --flash_mode keep --flash_size keep --erase-all 0x0 C:\Users\jibun\AppData\Local\Temp\tmpb_j1wwww\firmware.bin
esptool.py v4.8.1
Serial port COM17
Connecting...
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: 10:20:ba:77:ee:dc
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.8s
Compressed 1918560 bytes to 1221457...
Writing at 0x00000000... (1 %)
[Redacted]
Writing at 0x001d0e9f... (100 %)
Wrote 1918560 bytes (1221457 compressed) at 0x00000000 in 10.6 seconds (effective 1452.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done!

Disconnect and reconnect the board, select the correct COM port, and the REPL in the Thonny IDE should report the following…

MPY: soft reboot
MicroPython v1.26.1-dirty on 2025-09-16; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3

Type "help()" for more information.
>>> 

Validate camera module is available…

>>> import camera
>>> dir(camera)
['__class__', '__name__', 'Camera', 'FrameSize', 'GainCeiling', 'GrabMode', 'PixelFormat', 'Version', '__dict__']

Validate that the PSRAM is available…

>>> import esp32
>>> esp.ULP()
<ULP>

Validate file system…

>>> import os
>>> fs_stats = os.statvfs("/")
>>> fs_stats
(4096, 4096, 3584, 3581, 3581, 0, 0, 0, 0, 255)

I am still working on support for the microSD card slot. Is the following correct for microSD card (SPI) pin assignments?

Well, I cannot seem to get the 4 on board NeoPixels to work? GPIO12 right?

>>> from machine import Pin
>>> import neopixel
>>> thePin = Pin(12, Pin.OUT)
>>> thePixels = neopixel.NeoPixel(thePin, 1)
>>> thePixels.fill((255,255,255))
>>> thePixels.write()

So I soldered in a header on the board, with 5v, GND, GPIO12 and 1 NeoPixel, and still nothing. As either the MicroPython NeoPixel library does not work with this board or I have have something wrong? The installed test code that came on the board did light up the NeoPixels.

Since I cannot find any CircuitPython firmware image (see my other post) and I cannot find any Arduino IDE examples? Broken link (see my other post).

Kinda stuck.