重新安装MDF不能打开/dev/ttyUSB0

Willen
Posts: 4
Joined: Mon May 25, 2020 3:17 am

重新安装MDF不能打开/dev/ttyUSB0

Postby Willen » Fri Jun 05, 2020 3:11 am

发了两个问题,一直都没有看到厂家的技术支持有回复,只好把原来的MDF都删除,然后git了一个最新的esp-mdf,demo总算编译通过了,但是有出现了make flash的问题,我已经根据https://docs.espressif.com/projects/esp-idf/en/stable/get-started/linux-setup.html#additional-tips把python改成3.6了,sudo chmod 777 /dev/ttyUSB0也试过了,在python 控制台状态下能open这个USB转串口(CP系列),并且能接受到串口数据,但make flash后就出现以下错误:

App "eth2ap" version: 1
Flashing binaries to serial port '/dev/ttyUSB0' (app at offset 0x10000)...
esptool.py v3.0-dev
Serial port "/dev/ttyUSB0"
Traceback (most recent call last):
File "/home/willen/.local/lib/python3.6/site-packages/serial/serialposix.py", line 291, 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/ttyUSB0"'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/willen/esp/esp-mdf/esp-idf/components/esptool_py/esptool/esptool.py", line 3430, in <module>
_main()
File "/home/willen/esp/esp-mdf/esp-idf/components/esptool_py/esptool/esptool.py", line 3423, in _main
main()
File "/home/willen/esp/esp-mdf/esp-idf/components/esptool_py/esptool/esptool.py", line 3087, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "/home/willen/esp/esp-mdf/esp-idf/components/esptool_py/esptool/esptool.py", line 261, in __init__
self._port = serial.serial_for_url(port)
File "/home/willen/.local/lib/python3.6/site-packages/serial/__init__.py", line 85, in serial_for_url
instance.open()
File "/home/willen/.local/lib/python3.6/site-packages/serial/serialposix.py", line 294, in open
raise SerialException(msg.errno, "could not open port %s: %s" % (self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port "/dev/ttyUSB0": [Errno 2] No such file or directory: '"/dev/ttyUSB0"'
/home/willen/esp/esp-mdf/esp-idf/components/esptool_py/Makefile.projbuild:104: recipe for target 'flash' failed

marshal
Posts: 4
Joined: Thu Jul 02, 2020 1:01 am

Re: 重新安装MDF不能打开/dev/ttyUSB0

Postby marshal » Mon Jul 06, 2020 10:16 am

我也遇到这种情况,我的系统是Ubuntu16, 解决的方法是多拔插几下

Who is online

Users browsing this forum: No registered users and 9 guests