Friday, December 30, 2011

Pairing Bluetooth devices from command line

Following appear to be commands required to trigger pairing process from the command line:

hcitool cc <bdaddr>; hcitool auth <bdaddr>

Commands must be on the same line, separated by the semicolon, as described in previous post.

At this point, Bluez auth agent should kick in, asking for a code, if you have GUI one.

I found a page which suggests that only "hcitool cc" was enough for the author to trigger pairing, this could be explained by the fact that prior to 2.1, Bluetooth supported security modes which could protect either entire device access or just some of its profiles.

1 comment:

Ajay Kumar said...

Simply super! awesome! it works like charm!!!