[ Back to Kevin's Homepage | Technical Computer Stuff ]

Bluetooth pairing with my Treo650

Before you can pair with your Treo 650, first make sure your dongle works and can see the Treo 650 with 'Discoverable' turned on. Details in an earlier post

First, find the hardware mac address of your Treo with hcitool:

$ hcitool scan
Scanning ...
        00:07:E0:63:2C:78       Kevin Wang
Where the name of the Treo will be your name that you gave your Treo the first time you sync'ed it.

Second, initiate a connection:

$ sudo hcitool cc 00:07:E0:63:2C:78
Treo will pop up a window reading "Connection in progress...". While that window is up, verify that the connection is up and exists (the window won't go away):
$ hcitool con
Connections:
        < ACL 00:07:E0:63:2C:78 handle 1 state 1 lm MASTER

Third, request authentication:

$ sudo hcitool auth 00:07:E0:63:2C:78
After 5-6 long seconds, the KDE desktop (kbluetoothd) will pop up an authentication window asking for the pin to pair your computer with the Treo. Type in any PIN. The Treo will then pop up window titled "Bluetooth Security" with the text field "Enter passkey for $HOSTNAME-0:". Type in the same pin, check the "Add to trusted device list" box, tap on OK. You may need to repeat this a few times because if you don't do it quickly enough, the laptop will time out and close the connection.

I don't know how Gnome would handle this, neither do I know how to pair without it, such as on a headless server system. Sorry!

Once you've found the mac id of your device, you can turn off Discoverable. I personally don't bother until I'm sure that everything is paired up and working.

Lastly, verify that the pairing is permanent:

$ sudo hcitool dc 00:07:E0:63:2C:78
$ hcitool con
Connections:
(((blank = no connections present)))
$ sudo hcitool cc 00:07:E0:63:2C:78
$ sudo hcitool auth 00:07:E0:63:2C:78
$ hcitool con
Connections:
        < ACL 00:07:E0:63:2C:78 handle 1 state 1 lm MASTER AUTH
The hcitool auth command should return right away and not ask you for a pin. Note that the last hcitool con now says AUTH.

Under the hood

Here's a short list of little tidbits that can be useful:

Further topics

Continue with Connecting via Bluetooth through my Treo 650 to the Internet


KJW - kjw@rightsock.com