Bluetooth/Discovery

From OLPC
Jump to: navigation, search

Using an XO laptop for Bluetooth device discovery.

On 13.2.1 on an XO-4 with built-in adapter:

sudo yum install -y python-pip bluez-libs-devel python-devel gcc
sudo pip install pybluez
sudo hciconfig hci0 up

On 12.1.0 on an XO-1.75 with a USB Bluetooth adapter:

sudo yum install -y python-pip bluez bluez-libs-devel python-devel gcc
sudo pip install pybluez
sudo hciconfig hci0 up

Scan and print addresses of nearby devices:

$ python
>>> import bluetooth
>>> print bluetooth.discover_devices(lookup_names=True)