Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2005 11:41:28 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Aniruddha Bohra <bohra@cs.rutgers.edu>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Cannot pair with Audiovox SMT5600 Bluetooth
Message-ID:  <437CDCE8.4060605@savvis.net>
In-Reply-To: <web-35232286@dragon.rutgers.edu>
References:  <web-35211501@dragon.rutgers.edu> <437CC18A.5040804@savvis.net> <web-35232286@dragon.rutgers.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Aniruddha,

>> well, from what i can see everything is working as expected. your 
>> phone requests pin code and we send it back. the next event shows 
>> that link key is generated and stored. so, "pairing" procedure is 
>> completed.
>> 
>>> BTW, I tried with both : hccontrol -n ubt0hci
>>> write_node_role_switch 0 and without it with the same result.
>> 
>> no, that is not your problem. most likely the phone is trying to do
>> something else after it has opened baseband connection.
>> 
>> please install hcidump port from comms/hcidump and run as root
>> 
>> # hcidump -w dump.file
> 
> The file is attached. Actually the problem is only with pairing I
> feel. The GPRS connection (through DUN) goes through, even if the
> phone says there was an error.

nope. the "paring" works as expected. the "pairing" is a authentication 
procedure, during which, both devices agree on "link key". "link key" 
can be programmed directly or auto generated from the "pin code". next 
time the devices talk to each other they will use the same link key. if 
any of the devices lost the "link key" or "link keys" do not match the 
connection is rejected.

the fact that "dun/gprs" works means that your phone is accepting the 
connection from freebsd. by default most phones will try to authenticate 
this type of connection (with link key), so you need "pairing" done.

in your particular scenario both freebsd and your phone are agreed on 
the link key and baseband connection was established. you get the error 
on the phone because phone is trying to query services available on 
freebsd. it is a mastery to me why some manufacturers assume that remote 
device will always answer service discovery query. if you only plan to 
use freebsd as a bluetooth client you never should be required to answer 
service discovery queries. in fact to do the pairing you only have

anyway, to get rig of the error all you need to do is to run sdpd(8) 
daemon. just have it running all the time (similar to hcsecd(8)). you 
only need to kldload bg_btsocket(4) (from loader.conf) before you can 
start sdpd(8). there is no need to restart both hcsecd(8) and sdpd(8) 
even if you detach/re-attach the device.

thanks,
max




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?437CDCE8.4060605>