Dear all
I test the first python program to discover devices by bluetooth.
The code is
from bluetooth import *
target_name = "My Phone"
target_address = None
nearby_devices = discover_devices( )
for address in nearby_devices :
if target_name == lookup_name( address ) :
target_address = address
break
if target_address is not None :
print "found target bluetooth device with address" , target_address
else :
print "could not find target bluetooth device nearby"
when I run the program I face this error:
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
nearby_devices = discover_devices( )
File "C:\Python25\Lib\site-packages\bluetooth\msbt.py", line 7, in discover_devices
return bt.discover_devices (flush_cache, lookup_names)
IOError: No Bluetooth adapter detected
I need your help as soon as possible.
thanks

Reply With Quote



