I am trying to connect my Lenovo S10E to a Nintendo Wiimote via bluetooth. I am using a simple Python script reproduced below. I call it from the Linux Mint command line (version 16, "Peter") usingpython3 find_wii.py
Script:
import bluetooth
target_name = "Nintendo RVL-CNT-01"
target_address = "00:1C:BE:29:75:7F"
nearby_devices = bluetooth.discover_devices()
for bdaddr in nearby_devices:
if target_name == bluetooth.lookup_name( bdaddr ):
target_address = bdaddr
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")
I get an error
Traceback (most recent call last):
File "find_wii.py", line 1, in <module>
import bluetooth
ImportError: No module named 'bluetooth'
I installed bluez and python ( sudo aptitude install python-bluez) shells for it . I updated my system ( sudo apt-get update, sudo apt-get upgrade). I consulted with Google, and the only official errors I could find were here and here , and none of the answers worked for me.
How can I make the bluetooth module work?
Qu0rk