Sunday, December 31, 2006

BlueTooth under Linux on a Sony Vaio VGN-S5VP/B

I finally took some time and tested bluetooth under GNU/Linux (Debian Testing) on my Sony Vaio VGN-S5VP/B. I had to say that everything went quite smooth, and everything seems to work fine (although I only tested file sending).

This post should be considered complementary to this page, where I described the installation of Debian GNU/Linux on this laptop.

First of all I installed all the necessary software:

apt-get install bluez-utils libbluetooth1 bluez-hcidump bluez-pin

and then I configured and recompiled the kernel (in this case a 2.6.18 installed from the Debian repository, i.e., it's not a vanilla kernel): under Networking enable Bluetooth Subsystem Support, and then, from there enable the options:

and then enable all the options in the bluetooth device drivers.

Once you boot with the new kernel you can check from dmesg the Bluetooth information:
dmesg | grep Bl
Bluetooth: Core ver 2.10
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: HCI USB driver ver 2.9
Bluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8
Bluetooth: BNEP (Ethernet Emulation) ver 1.2
Bluetooth: BNEP filters: protocol multicast
and you should see the above information.

Now you can use the command hciconfig (which is basically the command that corresponds to ifconfig, but for bluetooth), and you should see something like:
hci0:   Type: USB
BD Address: mac address ACL MTU: 384:8 SCO MTU: 64:8
RX bytes:602 acl:0 sco:0 events:60 errors:0
TX bytes:486 acl:0 sco:0 commands:40 errors:0
where mac address should report the mac address of your bluetooth device.

Moreover, you can scan for bluetooth devices with the following command:
hcitool scan
for instance, you should see your mobile phone mac address (if bluetooth is enabled on the mobile phone).

Now you can go on using your own software for accessing your bluetooth devices (probably described on a next post :-)

1 comment:

Anonymous said...