我正在尝试在 Windows 8 上通过 CMD(管理员模式)通过 USB 刷新 ESP32 上的 Micropython 固件。这是我得到的结果:
C:\Users\Administrator\Downloads>esptool.py --port COM3 --baud 460800 write_flash --flash_size=detect 0 esp32-20190207-v1.10-54-g43a894fb4.bin
esptool.py v2.6
Serial port COM3
Traceback (most recent call last):
File "C:\Program Files\Python36\Scripts\esptool.py-script.py", line 11, in <module>
load_entry_point('esptool==2.6', 'console_scripts', 'esptool.py')()
File "c:\program files\python36\lib\site-packages\esptool.py", line 2952, in _main
main()
File "c:\program files\python36\lib\site-packages\esptool.py", line 2646, in main
esp = ESPLoader.detect_chip(each_port, initial_baud, args.before, args.trace)
File "c:\program files\python36\lib\site-packages\esptool.py", line 258, in detect_chip
detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
File "c:\program files\python36\lib\site-packages\esptool.py", line 222, in __init__
self._port = serial.serial_for_url(port)
File "c:\program files\python36\lib\site-packages\serial\__init__.py", line 88, in serial_for_url
instance.open()
File "c:\program files\python36\lib\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 'COM3': PermissionError(13, 'Zugriff verweigert*', None, 5)
- Zugriff verweigert == 权限被拒绝
我在这里能做什么?我不确定这是操作系统方面的错误还是脚本方面的错误 - 我不知道当我使用管理员 CMD 时什么可能会拒绝我的权限?
- 我读过这个:https://stackoverflow.com/questions/6105182/error-while-opening-port-in-python 但关闭和打开 COM 端口没有帮助。