[HELP] Mac Issue: No such file or directory: '/dev/ttyUSB1'

nathanw
Posts: 2
Joined: Sat Jan 23, 2021 10:25 am

[HELP] Mac Issue: No such file or directory: '/dev/ttyUSB1'

Postby nathanw » Sat Jan 23, 2021 12:53 pm

Hi there. Please help.

Setup:

1. Mac Catelina
2. ESP-IDF 4.0 (and I've tried 4.1)
3. Python 3.9
4. VSCode

When flashing my ESP-32 I receive the following FLASH error related to '/dev/ttyUSB1' (which is a linux port and I'm on mac):

Code: Select all

$ /Users/nathan/.espressif/python_env/idf4.0.2_py3.9_env/bin/python
esptool.py v2.8
Serial port /dev/ttyUSB1
Traceback (most recent call last):
  File "/Users/nathan/.espressif/python_env/idf4.0.2_py3.9_env/lib/python3.9/site-packages/serial/serialposix.py", line 322, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/nathan/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 3201, in <module>
    _main()
  File "/Users/nathan/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 3194, in _main
    main()
  File "/Users/nathan/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2883, in main
    esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace)
  File "/Users/nathan/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 273, in detect_chip
    detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
  File "/Users/nathan/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 237, in __init__
    self._port = serial.serial_for_url(port)
  File "/Users/nathan/.espressif/python_env/idf4.0.2_py3.9_env/lib/python3.9/site-packages/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/Users/nathan/.espressif/python_env/idf4.0.2_py3.9_env/lib/python3.9/site-packages/serial/serialposix.py", line 325, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1'
The terminal process failed to launch (exit code: 1).

Terminal will be reused by tasks, press any key to close it.
I've installed everything from scratch numerous times now with no success.

- BUILDING works, just FLASH fails.
- Installed drivers (https://ftdichip.com/drivers/vcp-drivers/)
- And these drivers too (https://www.silabs.com/developers/usb-t ... cp-drivers)
- I can connect to the device (https://docs.espressif.com/projects/esp ... requisites) via:

Code: Select all

ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port	/dev/cu.NathansAirPodRacers-Wir	/dev/cu.SLAB_USBtoUART		/dev/cu.SRS-XB10-CSRGAIA	/dev/cu.usbserial-0001

then run...

screen /dev/cu.SLAB_USBtoUART 115200

... (output from the esp32)
I've been trying to fix this one four almost an entire day and I'm losing my mind. Any help would be appreciated.

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: [HELP] Mac Issue: No such file or directory: '/dev/ttyUSB1'

Postby ESP_bignacio » Thu Jan 28, 2021 7:15 am

What is the command you are using to flash your program ?

If you are using the ESP-IDF extension for Visual Studio Code, make sure to use the ESP-IDF: Select port to use to choose the serial port before you flash as shown in the How to use

Otherwise if you are using the command line, You need to specify the port for example with idf.py flash -p port to make sure the port being used is the right one.

WilliamR
Posts: 6
Joined: Wed Jan 13, 2021 1:03 am

Re: [HELP] Mac Issue: No such file or directory: '/dev/ttyUSB1'

Postby WilliamR » Thu Jan 28, 2021 8:18 am

Dumb question, have you tried using ls /dev/tty* to see if linux has connected your drive as ttyUSB1?

mkumar2789
Posts: 4
Joined: Fri Dec 17, 2021 7:21 am

Re: [HELP] Mac Issue: No such file or directory: '/dev/ttyUSB1'

Postby mkumar2789 » Fri May 13, 2022 11:26 am

Go through below link for better understanding:
https://docs.espressif.com/projects/esp ... index.html

And be specific like:
espefuse.py --port /dev/cu.usbserial-0001 summary

Not like
espefuse.py summary

Who is online

Users browsing this forum: No registered users and 11 guests