diff options
author | Chris Liechti <cliechti@gmx.net> | 2015-08-05 15:06:35 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2015-08-05 15:06:35 +0200 |
commit | e2a64dac33f7e53c292bfb597a9f1caabf201347 (patch) | |
tree | 95689f251df1a7390552a177270d2f7622198c46 | |
parent | 8f9b44459a8517534afa324d1108be89124677c2 (diff) | |
download | pyserial-git-e2a64dac33f7e53c292bfb597a9f1caabf201347.tar.gz |
[Feature pyserial:39] Support BlueTooth serial port discovery on Linux
-rw-r--r-- | CHANGES.rst | 1 | ||||
-rw-r--r-- | serial/tools/list_ports_linux.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 367ccc6..7f8f0c5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -517,6 +517,7 @@ Version 3.x 2015-xx-xx - finish update to BSD license - update links to point to github - [Patch pyserial:34] Improvements to port_publisher.py example +- [Feature pyserial:39] Support BlueTooth serial port discovery on Linux Bugfixes: diff --git a/serial/tools/list_ports_linux.py b/serial/tools/list_ports_linux.py index 87a74e8..8ca1565 100644 --- a/serial/tools/list_ports_linux.py +++ b/serial/tools/list_ports_linux.py @@ -142,7 +142,10 @@ def hwinfo(device): return 'n/a' # XXX directly remove these from the list?
def comports():
- devices = glob.glob('/dev/ttyS*') + glob.glob('/dev/ttyUSB*') + glob.glob('/dev/ttyACM*')
+ devices = glob.glob('/dev/ttyS*') # built-in serial ports
+ devices.extend(glob.glob('/dev/ttyUSB*')) # usb-serial with own driver
+ devices.extend(glob.glob('/dev/ttyACM*')) # usb-serial with CDC-ACM profile
+ devices.extend(glob.glob('/dev/rfcomm*')) # BT serial devices
return [(d, describe(d), hwinfo(d)) for d in devices]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|