mirror of
https://github.com/espressif/esptool.git
synced 2025-10-19 11:43:48 +08:00
docs(troubleshooting): Mention needed permissions to the serial port on Linux
Closes https://github.com/espressif/esptool/pull/984
This commit is contained in:
@@ -197,15 +197,7 @@ A serial exception error occurred
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
``esptool.py`` uses the `pySerial <https://pyserial.readthedocs.io/en/latest/>`_ Python module for accessing the serial port.
|
``esptool.py`` uses the `pySerial <https://pyserial.readthedocs.io/en/latest/>`_ Python module for accessing the serial port.
|
||||||
If pySerial cannot operate normally, it raises an error and terminates. Some of the most common pySerial error causes are:
|
If pySerial cannot operate normally, it raises an error and terminates.
|
||||||
|
|
||||||
.. list::
|
|
||||||
|
|
||||||
* You don't have permission to access the port.
|
|
||||||
* The port is being already used by other software.
|
|
||||||
* The port doesn't exist.
|
|
||||||
* The device gets unexpectedly disconnected.
|
|
||||||
* The necessary serial port drivers are not installed or are faulty.
|
|
||||||
|
|
||||||
An example of a pySerial error:
|
An example of a pySerial error:
|
||||||
|
|
||||||
@@ -214,3 +206,15 @@ An example of a pySerial error:
|
|||||||
A serial exception error occurred: read failed: [Errno 6] Device not configured
|
A serial exception error occurred: read failed: [Errno 6] Device not configured
|
||||||
|
|
||||||
Errors originating from pySerial are, therefore, not a problem with ``esptool.py``, but are usually caused by a problem with hardware or drivers.
|
Errors originating from pySerial are, therefore, not a problem with ``esptool.py``, but are usually caused by a problem with hardware or drivers.
|
||||||
|
|
||||||
|
Some of the most common pySerial error causes are:
|
||||||
|
|
||||||
|
.. list::
|
||||||
|
|
||||||
|
* The port is being already used by other software.
|
||||||
|
* The port doesn't exist.
|
||||||
|
* The device gets unexpectedly disconnected.
|
||||||
|
* The necessary serial port drivers are not installed or are faulty.
|
||||||
|
* You don't have permission to access the port.
|
||||||
|
|
||||||
|
On Linux, read and write access the serial port over USB is necessary. You can add your user to the ``dialout`` or ``uucp`` group to grant access to the serial port. See `Adding user to dialout or uucp on Linux <https://docs.espressif.com/projects/esp-idf/en/stable/get-started/establish-serial-connection.html#adding-user-to-dialout-or-uucp-on-linux>`_.
|
||||||
|
@@ -351,10 +351,7 @@ class ESPLoader(object):
|
|||||||
port_issues.append(
|
port_issues.append(
|
||||||
[ # permission denied error
|
[ # permission denied error
|
||||||
re.compile(r"Permission denied", re.IGNORECASE),
|
re.compile(r"Permission denied", re.IGNORECASE),
|
||||||
(
|
("Try to add user into dialout or uucp group."),
|
||||||
"Try to add user into dialout group: "
|
|
||||||
"sudo usermod -a -G dialout $USER"
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user