skip to Main Content

I am trying to get esp-idf working with ubuntu. I see the usb tty port in /dev, as /dev/ttyUSB0.
Compilation of my blink program happened without any issues, in ubuntu, but when I tried to flash the image to esp32, I get the following error;

A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist

CMake Error at run_serial_tool.cmake:55 (message):

/home/lenovo/.espressif/python_env/idf5.1_py3.8_env/bin/python;;/home/lenovo/esp/esp-idf/components/esptool_py/esptool/esptool.py;–chip;esp32
failed

FAILED: CMakeFiles/flash

I am using ESP-Wroom32 development board. I flashed the same board from windows both through eclipse ide, and powershell. So, I kind of know the board is not the problem. Could anyone provide any lead?

2

Answers


  1. Chosen as BEST ANSWER

    Found the issue to be related to permission. But it exposed only when I ran idf.py monitor on the port. Running chmod 0777 /dev/ttyUSB0 solved it. The error reported "port doesn't exist" is very different from actual error which is "Permission denied".


  2. Unfortunately I can’t leave you a comment but, thank you, your solution helped me as well.

    And just as a side note: I’ve done some further experiments and the 0666 is sufficient to perform the flash, at least on my configuration. Probably the problem is that esptool.py performs some action as a different user than the one which run the script itself

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search