diff --git a/obd_utils.py b/obd_utils.py index 6452c7e7..272f72fa 100644 --- a/obd_utils.py +++ b/obd_utils.py @@ -32,7 +32,13 @@ def scanSerial(): s.close() # explicit close 'cause of delayed GC in java except serial.SerialException: pass - + for i in range(256): + try: #scan Bluetooth rfcomm bindings + s = serial.Serial("/dev/rfcomm"+str(i)) + available.append(s.portstr) + s.close() # explicit close 'cause of delayed GC in java + except serial.SerialException: + pass # ELM-USB shows up as /dev/tty.usbmodemXXXX, where XXXX is a changing hex string # on connection; so we have to search through all 64K options if len(platform.mac_ver()[0])!=0: #search only on MAC