diff --git a/docs/en/troubleshooting.rst b/docs/en/troubleshooting.rst index 7db2337bc..ae5d2dec9 100644 --- a/docs/en/troubleshooting.rst +++ b/docs/en/troubleshooting.rst @@ -197,15 +197,7 @@ A serial exception error occurred ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``esptool.py`` uses the `pySerial `_ 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: - -.. 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. +If pySerial cannot operate normally, it raises an error and terminates. 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 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 `_. diff --git a/esptool/loader.py b/esptool/loader.py index bb9ddcb60..8e033b08b 100644 --- a/esptool/loader.py +++ b/esptool/loader.py @@ -351,10 +351,7 @@ def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False): port_issues.append( [ # permission denied error re.compile(r"Permission denied", re.IGNORECASE), - ( - "Try to add user into dialout group: " - "sudo usermod -a -G dialout $USER" - ), + ("Try to add user into dialout or uucp group."), ], )