Skip to content

Commit 8e39ef6

Browse files
committed
docs(troubleshooting): Mention needed permissions to the serial port on Linux
Closes espressif#984
1 parent 5dd3dcc commit 8e39ef6

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

docs/en/troubleshooting.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,7 @@ A serial exception error occurred
197197
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198198

199199
``esptool.py`` uses the `pySerial <https://pyserial.readthedocs.io/en/latest/>`_ Python module for accessing the serial port.
200-
If pySerial cannot operate normally, it raises an error and terminates. Some of the most common pySerial error causes are:
201-
202-
.. list::
203-
204-
* You don't have permission to access the port.
205-
* The port is being already used by other software.
206-
* The port doesn't exist.
207-
* The device gets unexpectedly disconnected.
208-
* The necessary serial port drivers are not installed or are faulty.
200+
If pySerial cannot operate normally, it raises an error and terminates.
209201

210202
An example of a pySerial error:
211203

@@ -214,3 +206,15 @@ An example of a pySerial error:
214206
A serial exception error occurred: read failed: [Errno 6] Device not configured
215207
216208
Errors originating from pySerial are, therefore, not a problem with ``esptool.py``, but are usually caused by a problem with hardware or drivers.
209+
210+
Some of the most common pySerial error causes are:
211+
212+
.. list::
213+
214+
* The port is being already used by other software.
215+
* The port doesn't exist.
216+
* The device gets unexpectedly disconnected.
217+
* The necessary serial port drivers are not installed or are faulty.
218+
* You don't have permission to access the port.
219+
220+
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>`_.

esptool/loader.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,7 @@ def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, trace_enabled=False):
351351
port_issues.append(
352352
[ # permission denied error
353353
re.compile(r"Permission denied", re.IGNORECASE),
354-
(
355-
"Try to add user into dialout group: "
356-
"sudo usermod -a -G dialout $USER"
357-
),
354+
("Try to add user into dialout or uucp group."),
358355
],
359356
)
360357

0 commit comments

Comments
 (0)