I am trying to connect to an ESP32C3 to start programing. I get an error message that devttyACM1(or 0) does not exist. The environment I am in is an hp laptop running Linux mint21. Using the system utilities I can see the ESP32C3 modules and even read their addresses, but the IDE (both 1.8 and 2.x) deny the existence of the ports. Any suggestions will be welcome. I have tried disconnecting and reconnecting the devices, restarting the IDE and rebooting the computer. Cables seem to be OK as the OS can read the device serial number.
Thanks for any assistance.
Jim
on my Mint i must installing CH340 driver and something with access rights to port
What do you mean by addresses?
If @kolaha's link does not help
Please post the out put of lsusb before and after connecting the board.
Please run dmesg -w before connecting the board; the application will not close. Connect the board and observe the changes; anything standing out (e.g. BRLTTY)?
I've moved your topic to a section of the forum that is more tailored towards board detection and upload problems.
Does Mint not provide that driver by default?
And if the board is indeed providing /dev/ttyACM*, the board does not use a FTDI or CH340 chip to my knowledge; those should be /dev/ttyUSBx as far as I know.
no. i must do sudo apt-get update/upgrade
first, then boards can be recognized. atmega32u4 driver was out the box.
My ESP32-C3 has native USB (no CH340, no driver).
You must set "USB CDC On Boot" (tools menu) to "enabled" before uploading, as well as the right port and C3 board.
Close the serial monitor, and set the module in boot mode by pressing the boot button and press/releasing the reset button. Let go of the boot button last.
Don't open the serial monitor until after the upload and after pressing the reset button.
Leo..
Thanks for the reply. I Should have said MAC ID instead of addresses. Here is what I get when I run lsusb:
Print out of lsusb before connecting:
jim@jim-HP-Pavilion-g6-Notebook-PC:~$ lsusb
Bus 002 Device 002: ID 04f2:b249 Chicony Electronics Co., Ltd HP Integrated Webcam
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Print out of lsusb after devices are connected:
jim@jim-HP-Pavilion-g6-Notebook-PC:~$ lsusb
Bus 002 Device 002: ID 04f2:b249 Chicony Electronics Co., Ltd HP Integrated Webcam
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 012: ID 303a:1001 Espressif USB JTAG/serial debug unit
Bus 001 Device 011: ID 303a:1001 Espressif USB JTAG/serial debug unit
Bus 001 Device 010: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
jim@jim-HP-Pavilion-g6-Notebook-PC:~$
Here is a print out of the latest error message:
/tmp/arduino_build_888156/sketch_jun26a.ino.bin
esptool.py v4.6
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 54:32:04:86:25:90
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
A fatal error occurred: No serial data received.
A fatal error occurred: No serial data received.
Does any of this help.
Jim
The above error output does not reflect what you stated in the opening post.
I unfortunately can't help you further with ESP32 specifics.
Hi @azjim.
In order for the Arduino development software to upload to the Arduino board, your Linux user account must have write permission for that device.
Standard user accounts don't have this permission by default.
One of the potential causes of an upload to an ESP32-C3 board failing with an error like "A fatal error occurred: Could not open /dev/ttyACM0, the port doesn't exist
" could be caused by not having write permissions to the device. This also matches with your descriptions of being able to perform read operations on the device.
If this is the cause, it can be solved by configuring your system to allow the upload. This is done by creating a special file.
I'll provide instructions you can follow to create that udev rules file:
- Hover the mouse pointer over the code block below. You will see an icon that looks like two pieces of paper appear at the top right corner of the code block. Click that icon to copy the contents of the code block to the clipboard.
printf \ 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="0660", TAG+="uaccess" ' | \ sudo \ tee \ "/etc/udev/rules.d/60-ESP32.rules" \ && \ sudo \ udevadm \ control \ --reload-rules \ && \ sudo \ udevadm \ trigger
- Open a command line terminal.
- Press the Ctrl+Shift+V keyboard shortcut.
This will paste the text command you copied in the previous step to the terminal. - Press the Enter key to run the pasted command.
- If prompted for it, enter your Linux account password and press the Enter key.
The command should complete successfully. Now try uploading again. Hopefully the error will no longer occur.
I did an experiment of trying to upload to my ESP32-C3 based board on a Linux machine without write permissions for the device. The upload failed with an "A fatal error occurred: Could not open /dev/ttyACM0, the port doesn't exist
" error message instead of this "No serial data received.
" message. So it might be that the error is caused by something other than insufficient permissions.
However, we can see that esptool is able to read data from the ESP32-C3 device, but then the progress halts at the step where it is supposed to configure the baud rate (we would expect to see a "Changed.
" message on the next line if that step was successful). So this behavior does match reasonably well with my hypothesis about the read permissions even if it doesn't match with the results of my experiment.
@ptillish,
thanks for the reply. I tried to copy the text into a terminal interface but I did not get the hover text as you indicated. When I mouse over the block of text, I get no reaction to the mouse. can you resend as a plain text?
Jim
It is plain text You can just select it using the mouse, copy and paste.
The right edge is cutoff so I don't think I am getting it all.
Jim
I just tried and it seems complete.
With the risk that I missed an escape (compare the \)
printf \
'SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="0660", TAG+="uaccess"
' | \
sudo \
tee \
"/etc/udev/rules.d/60-ESP32.rules" \
&& \
sudo \
udevadm \
control \
--reload-rules \
&& \
sudo \
udevadm \
trigger
Hi,
I was able to copy from the last email and I now have the blink sketch running on my esp32C3.
No need to add a file. I appreciate the help very much. I will now try and set up the wifi on my esp.
Jim
You are welcome. I'm glad it is working now.
Maybe you were looking at my message in an email notification from Arduino Forum?
Using emails as notifications of new activity on the topics you are watching is great, but you should always open Arduino Forum in your web browser to read or write posts. That is the only way to be sure the content will be correctly formatted.
It is quite unfortunate that the forum software allows replying via email. I have see this "feature" cause many problems.
Hi,
Back again. I got the blink sketch to run on one of my esp32, but when I tried the other, I get the same error. I am going to try the wifi sketch on the one that did work, maybe I have a hardware error in the other. I will get back to you.
Jim
@azjim you are still replying via email. As I already requested, please open Arduino Forum in your web browser and use the forum's web interface to read and reply:
https://forum.arduino.cc/t/linux-mint21-and-esp32-issues/1276508
Hi, Sorry about the responses in email. I have opened the browser on the forum. I have been doing some experimenting and have found that one of my esp32c3's is working on different sketches and am trying to get it to work on a wifi sketch. Current problem is with the sketch. I need to fix some errors. It has occurred to me that maybe I need to reboot the other esp or possible download and reinstall the bootloader. Probably will not get much done after today as back to work. Thanks for the help, will get back to you when I can.
You are welcome. Let us know if you aren't able to solve the problem. We'll be happy to take a look if you provide more details about it.