Hi all,
I'm stuck with getting the Arduino IDE on my Ubuntu laptop to detect my ESP32-CAM, and I hope you can help me.
It's the ESP32-CAM with USB "motherboard", I have it plugged into my laptop's USB port. When I try to compile a sketch and upload it I get an error saying
"A fatal error occurred: Could not open /dev/ttyACM0, the port doesn't exist
Failed uploading: uploading error: exit status 2"
My troubleshooting so far:
- I know the USB cable is working, because it works with an Arduino Nano Every I have
- I know it's the correct device (ttyACM0), because that's the device that my Nano Every shows up on when I connect it to that USB port.
- I know the ESP32-CAM "motherboard" is detected, because lsusb gives me "Bus 001 Device 010: ID 1a86:7523 QinHeng Electronics CH340 serial converter" when I connect it.
- The ttyACM0 device only exists when I connect my Nano Every - it vanishes when I disconnect the Every and doesn't appear when I connect the ESP32-CAM
What can I try in order to make the Arduino IDE talk to my ESP32-CAM?
@mbogelund I assume you are holding the BOOT button down when you are uploading the sketch.
If you have a magnifying glass check the USB chip, it may be a CP2102 rather than a CH340. If so install that driver. I have at least a dozen of the esp32cam and MB boards, some require the boot button to be pressed during upload some do not. I think it's a function of what chip you have.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Yes, I've uploaded both with the button pressed and without pressing it.
I don't know how to install that particular driver on Linux.
@zander I've looked at the chip, and as far as I can see, it says CH340.
@zander Yes, I've uploaded both with the button pressed and without pressing it.
I don't know how to install that particular driver on Linux.
Either do I , just google it.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@mbogelund Make sure the serial port is closed. Can you show me the IDE output just before the error message, just copy the last dozen lines or so.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
I resolved it. the solution was quite simple, I'll put it here for reference.
Basically, I just had to remove support for Braille displays, as stated by this Ask Ubuntu Stack Exchange post:
https://askubuntu.com/questions/1403705/dev-ttyusb0-not-present-in-ubuntu-22-04
I simply had to do
sudo apt remove brltty
and now it works.
Thanks @zander for your suggestions.
@mbogelund I wonder how it got there in the first place.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander IIRC, it's enabled by default on a standard installation.
Which makes sense.
Turning on Braille for a blind person must be way harder than turning it off for a seeing person.
@mbogelund I read a little deeper into the thread, and I THINK the problem is a bug in the device ids. I am not that strong in Linux to fully understand it, but that rings true, I doubt the 'designers' meant for you to choose between a Braille service and a USB driver. There are several ways to 'fix' the problem, but I don't think I saw one that allows both at the same time.
Also, you may have to do that for each update, not sure but won't be surprised. Maybe create a startup .sh file to do it every time?
In your earlier post you found the following
Bus 001 Device 010: ID 1a86:7523 QinHeng Electronics
it turns out that ID of 1a86 is also used by the Braille device.
EDIT
I don't know for sure, but what chip did the original ESP32-CAM use before the arrival of the MB variant? I will make a small wager it was the other chip that would not conflict with the Braille device maybe.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.