-->
Page 1 of 1

No /dev/ttyUSB0

PostPosted: Sat Jun 16, 2018 1:18 pm
by Bill Bauer
I am setting up a ESP_IDF environment on Windows 10 and have a problem. I don't seem to have the required /dev/ttyUSB0 . For example, in hello_world project:
$ make flash
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.3.1
Traceback (most recent call last):
File "C:/msys32/home/Bill/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2637, in <module>
_main()
......
File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 62, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'C:/msys32/dev/ttyUSB0': WindowsError(2, 'The system cannot find the file specified.')

I have tried two boards, a ESP32-DEVKITC and a Sparkfun ESP Thing, two USB cables and two USB ports on my laptop, a LENOVO ideapad 110. In all cases the Windows Device Manager can see the serial port COM4, in the ESP32-DEVKITC a Silicon Labs part and in the ESP32 Thing another part.

File Explorer and mingw32 ls can't see this /dev/ttyUSB0 either. Actually File Explorer and ls from mingw don't show the same files! In Device Manager I see a COM4 and connecting with putty to COM4 I see something that includes the following, so I think serial comm is working.
* hello espressif ESP32! *
* 2nd boot is running! *
* version (V0.1) *

In the esp32_win32_msys2_environment_and_toolchain-20180110.zip file (which I extracted to C:/msys32) I don't see dev/ttyUSB0 either, so I assume it gets created somehow when the cable is plugged in.

I've re-installed minGW system as per http://esp-idf.readthedocs.io/en/latest ... ratch.html. No improvement.

I do see /dev/ttyS3 (crw-rw-rw- 1 Bill None 117, 3 Jun 16 10:48 /dev/ttyS3). Is this the same as ttyUSB0? I tried ln -s ttyS3 ttyUSB0 and now I get a different error. I can see the symbolic link both in mingw and File Explorer.

Any ideas what's happening? It's probably more related to minwg then the IDF. The most puzzling part is that minwg ls and File Explorer don't show the same thing.

Bill Bauer (bauer.bill@gmail.com,bbauer@ieee.org)

Re: No /dev/ttyUSB0

PostPosted: Fri Jun 22, 2018 7:58 pm
by Bill Bauer
I was making things much too complicated, I should have read the right documentation!
In Windows the device is /COM3 or where ever the USB serial port shows up in Device Manger. The /dev/TTYUSB0 is for Linux.