Skip to content

Commit 7821d0f

Browse files
committedJun 23, 2015
manual: explain how to list attached serial devices on windows/linux
1 parent 5b3eac1 commit 7821d0f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

Diff for: ‎doc/manual/faq.rst

+16
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,19 @@ sub-experiments difficult and fragile. You can however always use the
7474
scheduler API to achieve the same (``scheduler.yield(duration=0)``)
7575
or wrap your own generators/coroutines/tasks in regular functions that
7676
you then expose as part of the API.
77+
78+
list the serial devices attached to my Linux/Windows system?
79+
------------------------------------------------------------
80+
81+
You can do it by running::
82+
83+
$ python3 -m serial.tools.list_ports -v
84+
85+
It will give you the ``/dev/ttyUSBxx`` (or the ``COMxx`` for Windows) device
86+
names.
87+
The ``hwid:`` field gives you the string you can pass via the ``hwgrep://``
88+
feature of pyserial
89+
`serial_for_url() <http://pyserial.sourceforge.net/pyserial_api.html#serial.serial_for_url>`_
90+
in order to open a serial device.
91+
92+
See the :ref:`TDC001 documentation <tdc001-controller-usage-example>` for an example of ``hwgrep://`` usage.

2 commit comments

Comments
 (2)

sbourdeauducq commented on Jun 23, 2015

@sbourdeauducq
Member

You should be more explicit that people should use serial numbers and not /dev/ttyUSBX or COM ports.

fallen commented on Jun 23, 2015

@fallen
ContributorAuthor

Ack, fixed in f0dddd9

Please sign in to comment.