[Bug 336012] Re: bluetooth network PAN fails to connect to mobile phone

Håkon Enger hakon.enger at umb.no
Thu May 7 08:25:03 BST 2009


I have a workaround to the bug that makes the PAN connection disconnect
immediately after connecting. Run the attached script in a shell like
'sudo sh connect_to_phone.sh ##:##:##:##:##:##' where you replace the #s
with your phone's bluetooth address. This works for me, at least. If you
haven't already, you need to install the bluez-compat package where the
pand command is. If you don't know the address of your phone you can
discover it by turning on bluetooth visibility on the phone and running
the command 'hcitool scan' in the shell.

The reasoning behind the script is that a look at the code indicates
(disclaimer: I know nothing about bluetooth networking, so this may be
utterly wrong) that both the 'information response' and the 'encryption
change' events trigger the bluetooth stack to send a connection request
(while in the BT_CONNECT state). The hcidump output I attached before
confirms this. Since my phone apparently requires encryption before
creating a PAN connection, the encryption change event happens after the
first request but before the connection is established, and results in
another identical request being sent, which is rejected. The script
enables encryption on the connection before pand attempts to connect to
the PAN service.

Oh, and ignore my previous comment about dropping the (baseband)
connection created by 'hcitool cc' after 1-2 seconds, this is apparently
intended (when no other connection is created over the baseband). That
the PAN connection is dropped, though, is (still) a bug.

** Attachment added: "Script to connect to PAN service using pand from bluez-compat"
   http://launchpadlibrarian.net/26424303/connect_to_phone.sh

-- 
bluetooth network PAN fails to connect to mobile phone
https://bugs.launchpad.net/bugs/336012
You received this bug notification because you are a member of
Bluetooth, which is subscribed to bluez in ubuntu.



More information about the Ubuntu-bluetooth mailing list