ESP32-CAM-MB + Development Board CH340G

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
1vf
Posts: 4
Joined: Sat Mar 27, 2021 12:46 pm

Re: ESP32-CAM-MB + Development Board CH340G

Post by 1vf » Wed Apr 07, 2021 5:44 pm

Hello,

Both IO0 and "GND/R" (reset I guess?) labeled pins are at 3.3V.

Also tried --flash_mode qout and --flash_mode dout, but it didn't help unfortunately.

As for espefuse.py, not completely sure, what to do and how to modify the power supply options. Here is the summary output:

Connecting....
Detecting chip type... ESP32
espefuse.py v3.0
EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value)
----------------------------------------------------------------------------------------
Calibration fuses:
BLK3_PART_RESERVE (BLOCK0): BLOCK3 partially served for ADC calibration data = False R/W (0b0)
ADC_VREF (BLOCK0): Voltage reference calibration = 1114 R/W (0b00010)

Config fuses:
XPD_SDIO_FORCE (BLOCK0): Ignore MTDI pin (GPIO12) for VDD_SDIO on reset = False R/W (0b0)
XPD_SDIO_REG (BLOCK0): If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset = False R/W (0b0)
XPD_SDIO_TIEH (BLOCK0): If XPD_SDIO_FORCE & XPD_SDIO_REG = 1.8V R/W (0b0)
CLK8M_FREQ (BLOCK0): 8MHz clock freq override = 55 R/W (0x37)
SPI_PAD_CONFIG_CLK (BLOCK0): Override SD_CLK pad (GPIO6/SPICLK) = 0 R/W (0b00000)
SPI_PAD_CONFIG_Q (BLOCK0): Override SD_DATA_0 pad (GPIO7/SPIQ) = 0 R/W (0b00000)
SPI_PAD_CONFIG_D (BLOCK0): Override SD_DATA_1 pad (GPIO8/SPID) = 0 R/W (0b00000)
SPI_PAD_CONFIG_HD (BLOCK0): Override SD_DATA_2 pad (GPIO9/SPIHD) = 0 R/W (0b00000)
SPI_PAD_CONFIG_CS0 (BLOCK0): Override SD_CMD pad (GPIO11/SPICS0) = 0 R/W (0b00000)
DISABLE_SDIO_HOST (BLOCK0): Disable SDIO host = False R/W (0b0)

Efuse fuses:
WR_DIS (BLOCK0): Efuse write disable mask = 0 R/W (0x0000)
RD_DIS (BLOCK0): Efuse read disable mask = 0 R/W (0x0)
CODING_SCHEME (BLOCK0): Efuse variable block length scheme
= NONE (BLK1-3 len=256 bits) R/W (0b00)
KEY_STATUS (BLOCK0): Usage of efuse block 3 (reserved) = False R/W (0b0)

Identity fuses:
MAC (BLOCK0): Factory MAC Address
= 9c:9c:1f:c8:13:f4 (CRC 0x22 OK) R/W
MAC_CRC (BLOCK0): CRC8 for factory MAC address = 34 R/W (0x22)
CHIP_VER_REV1 (BLOCK0): Silicon Revision 1 = True R/W (0b1)
CHIP_VER_REV2 (BLOCK0): Silicon Revision 2 = False R/W (0b0)
CHIP_VERSION (BLOCK0): Reserved for future chip versions = 2 R/W (0b10)
CHIP_PACKAGE (BLOCK0): Chip package identifier = 0 R/W (0b000)
MAC_VERSION (BLOCK3): Version of the MAC field = 0 R/W (0x00)

Security fuses:
FLASH_CRYPT_CNT (BLOCK0): Flash encryption mode counter = 0 R/W (0b0000000)
UART_DOWNLOAD_DIS (BLOCK0): Disable UART download mode (ESP32 rev3 only) = False R/W (0b0)
FLASH_CRYPT_CONFIG (BLOCK0): Flash encryption config (key tweak bits) = 0 R/W (0x0)
CONSOLE_DEBUG_DISABLE (BLOCK0): Disable ROM BASIC interpreter fallback = True R/W (0b1)
ABS_DONE_0 (BLOCK0): Secure boot V1 is enabled for bootloader image = False R/W (0b0)
ABS_DONE_1 (BLOCK0): Secure boot V2 is enabled for bootloader image = False R/W (0b0)
JTAG_DISABLE (BLOCK0): Disable JTAG = False R/W (0b0)
DISABLE_DL_ENCRYPT (BLOCK0): Disable flash encryption in UART bootloader = False R/W (0b0)
DISABLE_DL_DECRYPT (BLOCK0): Disable flash decryption in UART bootloader = False R/W (0b0)
DISABLE_DL_CACHE (BLOCK0): Disable flash cache in UART bootloader = False R/W (0b0)
BLOCK1 (BLOCK1): Flash encryption key
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK2 (BLOCK2): Secure boot key
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK3 (BLOCK3): Variable Block 3
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W

Flash voltage (VDD_SDIO) determined by GPIO12 on reset (High for 1.8V, Low/NC for 3.3V).

Regards,
Vedran

wangshujun@tom.com
Posts: 61
Joined: Fri Feb 15, 2019 9:22 am

Re: ESP32-CAM-MB + Development Board CH340G

Post by wangshujun@tom.com » Thu Apr 08, 2021 2:35 pm

Can connect smoothly espefuse.py This shows that the operation of en and IO0 is not a problem. The focus is on the flash mode when burning and writing and the hardware connection of io12
If io12 has a pull-up on the hardware, you can use the espefuse.py Configured to a fixed voltage of 3.3V

lorenz
Posts: 8
Joined: Sat Dec 12, 2020 8:11 pm

Re: ESP32-CAM-MB + Development Board CH340G

Post by lorenz » Sat Apr 10, 2021 10:14 am

Hi,

I have bought a few of the esp-cam-mb boards from aliexpress and for me they are working with micropython.

I am using a mac to flash the micropython firmware.
I have observed that the the RST button on the esp-cam-mb board did not work, so I had to press the reset button on the esp-32 ai thinker board.

Code: Select all

# press and hold io0 button and press the rst button on ai thinker board
esptool.py erase_flash
# once you see in the log output that it is erasing you can release the io0 button

# press and hold io0 button and press the rst button on ai thinker board
esptool.py write_flash 0x1000 firmware/micropython-latest.bin
# once you see in the log output that it is erasing you can release the io0 button

# press the reset button once more and then use miniterm or any other serial program to connect. You should then see the micropython repl
Hope that helps a bit.

Lorenz

1vf
Posts: 4
Joined: Sat Mar 27, 2021 12:46 pm

Re: ESP32-CAM-MB + Development Board CH340G

Post by 1vf » Tue Apr 13, 2021 7:19 pm

Hello,

Unfortunately it didn't help. I'm not entirely sure what do you mean by "I had to press the reset button on the esp-32 ai thinker board", aside from "ESP32-CAM-MB", there's only Development Board CH340G with the USB/power and IO0 and RST buttons. I tried holding RST buttons ESP32-CAM-MB and on Development Board CH340G in any combination without success.

@wangshujun: do you suggest I run: espefuse.py set_flash_voltage 3.3V ?

I do see that it helped in some cases:
viewtopic.php?t=4387
https://forum.makerforums.info/t/solved ... s/62851/12
but I'm not sure if it's applicable here.

Souperman2
Posts: 1
Joined: Mon Apr 26, 2021 12:30 am

Re: ESP32-CAM-MB + Development Board CH340G

Post by Souperman2 » Mon Apr 26, 2021 12:57 am

I have problems with using the MB serial board. I have tried Putty & Tera term without success - Arduino Serial Monitor works so after I erase and load the ESP32-CAM firmware I do the following:
1) Start Arduino Serial Monitor then press the ESP32-CAM reset button - After getting the >>> prompt enter in the input block:
import webrepl_setup Then Enable and define the webrepl password
2) Still using the Arduino Serial Monitor, set up your network ie:)
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(<your WIFI SSID>, <your WIFI password>)
wlan.ifconfig()

write down the ip address
3) Do not restart the esp32 but start the webrepl page (search for webrepl on internet) using the ip address above, Using the webrepl download your boot.py and any other files needed to connect to your network and start your micropython application. If problems occur, reboot the esp32 and follow Steps starting at 1

I know that accessing the ESP32 using this method is not optimal but is a work around until the serial access using a windows terminal application can be resolved.

uncoded0123
Posts: 6
Joined: Wed Aug 12, 2020 11:09 am

Re: ESP32-CAM-MB + Development Board CH340G

Post by uncoded0123 » Thu Jun 03, 2021 6:07 am

Hi,

Has anyone resolved the issue of ESP32-CAM-MB not working with MicroPython?
It works with Arduino, but not with MicroPython.

I've used Thonny to upload MicroPython firmware. It says success.
But it won't go to REPL mode, and says this:

"Device is busy or does not respond. Your options:

- wait until it completes current work;
- use Ctrl+C to interrupt current work;
- use Stop/Restart to interrupt more and enter REPL."

Any ideas how to fix it?

Thanks,
uncoded0123

clueless
Posts: 2
Joined: Mon Aug 16, 2021 2:16 am

Re: ESP32-CAM-MB + Development Board CH340G

Post by clueless » Sun Sep 12, 2021 1:12 am

I've had similar experiences to what's been reported here. FWIW I find the BOOT button is really difficult to hold down and I have to prop the board hard against a surface to be sure my finger is holding the button down. I've found the BOOT button only works when connecting the USB, pressing BOOT+RESET while connected doesn't work. I'm not sure if it's relevant but I also hold the RESET button down while inserting the USB just to get a good grip if nothing else. Also I've found the USB has to be disconnected to take the ESP32-Cam out of flash mode and make it available for normal connection to REPL etc.
In summary:
1. use the BOOT button when connecting USB to enter flash mode
2. after flashing disconnect the USB to exit flash mode

uraich
Posts: 56
Joined: Tue Mar 26, 2019 12:24 pm

Re: ESP32-CAM-MB + Development Board CH340G

Post by uraich » Sat Sep 18, 2021 7:57 pm

I have a similar problem. It seems that the Linux serial driver sets RTS and DTR such that you are always in programming mode. I tried to run gtkterm on which you can individually reset DTR and RTS and if I do this, then I see REPL as expected.
It is therefore a problem of the serial driver and not a micropython problem.
Unfortunately, ampy and thonny use the normal serial driver and I can therefore not use these, which means that I cannot upload uP code.
It seems that the serial monitor in the Arduino IDE does not set DTR and RTS and this is the reason why things work ok for the Arduino.

bjames28
Posts: 14
Joined: Fri May 17, 2019 12:55 pm

Re: ESP32-CAM-MB + Development Board CH340G

Post by bjames28 » Sun Sep 26, 2021 12:24 pm

I had the same issue, but found this solution (which is rather a workaround):

Open the Thonny configuration.ini file (Tools -> Open Thonny Data folder) and in [ESP32] section you need to add:

dtr = False
rts = False

Worked for me!

The longer story is here: https://github.com/thonny/thonny/issues/1462

uraich
Posts: 56
Joined: Tue Mar 26, 2019 12:24 pm

Re: ESP32-CAM-MB + Development Board CH340G

Post by uraich » Mon Sep 27, 2021 8:19 pm

Many thanks for this workaround.
It did not work on my default thonny version, installed with apt on Ubuntu 20.04, but it did work when I installed the newest thonny version from github.
Excellent! Now I can play with the ESP32.
Did you get the camera driver to work? and if yes, how did you do it?

Post Reply