+class GoodFETbtser:
+ """py-bluez class for emulating py-serial."""
+ def __init__(self,watchaddr):
+ import bluetooth;
+ while watchaddr==None or watchaddr=="none":
+ print "performing inquiry..."
+ nearby_devices = bluetooth.discover_devices(lookup_names = True)
+ print "found %d devices" % len(nearby_devices)
+ for addr, name in nearby_devices:
+ print " %s - '%s'" % (addr, name)
+ if name=='FireFly-A6BD':
+ watchaddr=addr;
+ print "Identified GoodFET at %s" % watchaddr;