This is a known bug, at least to the extent it's in the bug database (http://code.google.com/p/pybluez/issues/detail?id=25
). There's also a workaround suggested there, which I've used with some success (though I've also been crashing Python a lot, but I can't tell if it's this code or something else). Here's the code I use:
class MyDiscoverer (bluetooth.DeviceDiscoverer) :
"""Kludge to work around bluetooth.discover_devices not working on GuruPlug"""
def pre_inquiry (self) :
self.done = False
def device_discovered(self, address, device_class, name):
# print "%s - %s" % (address , name)
if address not in self.discovered_list:
def inquiry_complete(self) :
self.done = True
self.discovered_list = 
self.find_devices(lookup_names = False)
while True :
can_read, can_write, has_exc = select.select ([self ], [ ], [ ])
if self in can_read :
if self.done :
Then instead of calling bluetooth.discover_devices, I do MyDiscoverer().discover_my_devices().
Of course, if you need names and not just addresses, you can change the lookup_names value.