Bluetooth/Discovery

From OLPC
< Bluetooth
Revision as of 07:45, 3 July 2014 by Quozl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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)