I am trying to connect my Lenovo S10E to a Nintendo Wiimote via bluetooth. I am using a simple Python script, reproduced below. I am calling it from the Linux Mint (version 16, "Petra") command line using
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
if target_address is not None:
print("found target bluetooth device with address "), target_address
print("could not find target bluetooth device nearby")
Traceback (most recent call last):
File "find_wii.py", line 1, in <module>
ImportError: No module named 'bluetooth'
sudo aptitude install python-bluez
sudo apt-get update
sudo apt-get upgrade
You've installed the Python 2 version of bluez bindings. Either run the script using
python2 bluez or install the Python 3 bindings. Since they aren't packaged, you would need to install them using e.g. pip:
python3 -m pip install bluez