Skip to content

Commit

Permalink
manual: explain how to list attached serial devices on windows/linux
Browse files Browse the repository at this point in the history
fallen committed Jun 23, 2015

Unverified

This user has not yet uploaded their public signing key.
1 parent 5b3eac1 commit 7821d0f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/manual/faq.rst
Original file line number Diff line number Diff line change
@@ -74,3 +74,19 @@ sub-experiments difficult and fragile. You can however always use the
scheduler API to achieve the same (``scheduler.yield(duration=0)``)
or wrap your own generators/coroutines/tasks in regular functions that
you then expose as part of the API.

list the serial devices attached to my Linux/Windows system?
------------------------------------------------------------

You can do it by running::

$ python3 -m serial.tools.list_ports -v

It will give you the ``/dev/ttyUSBxx`` (or the ``COMxx`` for Windows) device
names.
The ``hwid:`` field gives you the string you can pass via the ``hwgrep://``
feature of pyserial
`serial_for_url() <http://pyserial.sourceforge.net/pyserial_api.html#serial.serial_for_url>`_
in order to open a serial device.

See the :ref:`TDC001 documentation <tdc001-controller-usage-example>` for an example of ``hwgrep://`` usage.

2 comments on commit 7821d0f

@sbourdeauducq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@fallen
Copy link
Contributor Author

@fallen fallen commented on 7821d0f Jun 23, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, fixed in f0dddd9

Please sign in to comment.