Anyway, if you ever tried using hcitool you may think it barely works. For example:
# hcitool cc <bdaddr>
# hcitool lq <bdaddr>
Not connected.
Ok, so here's the matter. First of all, hcitool accesses hci device directly, and that requires root access. Secondly, it works on low protocol level (ACL), so connection established by "cc" is of course not pairing or service-level connection. It's low level connection, which persist only while data is transferred and shutdown quickly to preserve the power. Yep, it shuts down while you type or even re-run next command. That's how it should be done:
# hcitool cc <bdaddr>; hcitool lq <bdaddr>
Link quality: 255
More fun:
# hcitool cc $BDADDR; hcitool auth $BDADDR; hcitool enc $BDADDR; hcitool key $BDADDR; hcitool con
Connections:
< ACL 7D:75:75:xx:xx:xx handle 12 state 1 lm MASTER AUTH ENCRYPT SECURE
Great post buddy
ReplyDelete