User Tools

Site Tools


raspberrypi:bluetooth

Installing Bluetooth

I've followed this fantastic manual:

http://www.diverteka.com/?p=1880

But I've ommited the apt-get install blueman because it seems to be a gui application: it installed too much packages and I've ommited this step.

And I've installed the following:

apt-get install python-gobject

Emparejando ION iCade

Ejecutamos:

root@raspberry:~# hcitool scan

y a la vez pulsaremos en el iCade las teclas 6,8,0,E2,E1. Al cabo de un rato aparecerá el identificador del dispositivo icade que nos informara de que el emparejamiento ha ido bien:

root@raspberry:~# hcitool scan
Scanning ...
	XX:XX:XX:4B:8C	ION iCade

Para emparejarlo, vamos a usar como pin “5555”, que en el icade se mete pulsando cuatro la tecla cinco y luego la tecla E2 para finalizar.

root@raspberry:~# bluez-simple-agent hci0 00:12:A1:XXXXXX
RequestPinCode (/org/bluez/11402/hci0/dev_00_12_A1_XXXXX)
Enter PIN Code: 5555
Release
New device (/org/bluez/11402/hci0/dev_00_12_A1_XXXX)

Ahora declaramos el dispositivo como confiable:

root@raspberry:~# bluez-test-device trusted 00:12:A1:XXXXXX yes

Luego identificamos al dispositivo como dispositivo de entrada:

root@raspberry:~#  bluez-test-input connect 00:12:A1:6F:4B:8C

Puede que salga un mensaje de que se ha parado el servicio bluetooth, pero lo que se registra en el log es que el dispositivo se ha habilitado:

Feb  9 18:45:09 raspberry bluetoothd[11721]: Adapter /org/bluez/11721/hci0 has been enabled
raspberrypi/bluetooth.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1