Bluetooth/Discovery: Difference between revisions

From OLPC
Jump to navigation Jump to search
(Created page with 'Using an XO laptop for Bluetooth device discovery. On 13.2.1 on an XO-4 sudo yum install -y python-pip bluez-libs-devel python-devel gcc sudo pip install pybluez sudo hc…')
 
No edit summary
 
Line 1: Line 1:
Using an XO laptop for Bluetooth device discovery.
Using an XO laptop for Bluetooth device discovery.


On [[13.2.1]] on an XO-4
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 yum install -y python-pip bluez-libs-devel python-devel gcc
Line 7: Line 7:
sudo hciconfig hci0 up
sudo hciconfig hci0 up


On [[12.1.0]] on an XO-1.75
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
sudo yum install -y python-pip bluez bluez-libs-devel python-devel gcc
sudo pip install pybluez
sudo pip install pybluez
sudo hciconfig hci0 up
sudo hciconfig hci0 up


Scan and print addresses of nearby devices:
#!/usr/bin/python
$ python
import bluetooth
>>> import bluetooth
print bluetooth.discover_devices(lookup_names=True)
>>> print bluetooth.discover_devices(lookup_names=True)

Latest revision as of 07:45, 3 July 2014

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)