Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 2004 11:21:36 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Guido van Rooij <guido@gvr.org>, freebsd-bluetooth@freebsd.org
Subject:   Re: problem pairing with a Sony-Ericsson T610
Message-ID:  <bb4a86c7040701112152b40f@mail.gmail.com>
In-Reply-To: <40E451EE.7090601@cw.com>
References:  <40E451EE.7090601@cw.com>

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

> I have the following in hcsecd.conf:
> device {
>         bdaddr  00:0e:07:46:b5:c4;
>         name    "Gonz";
>         key     nokey;
>         pin     "5449";
> }

looks fine

> with hcccpontrol I see:
> beck# hccontrol -n ubt0hci inquiry
> Inquiry result, num_responses=1
> Inquiry result #0
>         BD_ADDR: 00:0e:07:46:b5:c4
>         Page Scan Rep. Mode: 0x1
>         Page Scan Period Mode: 00
>         Page Scan Mode: 00
>         Class: 52:02:04
>         Clock offset: 0x1013
> Inquiry complete. Status: No error [00]

looks fine too

> I can create connections with hccontrol:
> beck# hccontrol -n ubt0hci Create_Connection 00:0e:07:46:b5:c4
> BD_ADDR: 00:0e:07:46:b5:c4
> Connection handle: 41
> Encryption mode: Disabled [0]
> beck# hccontrol -n ubt0hci read_connection_list
> Remote BD_ADDR    Handle Type Mode Role Encrypt Pending Queue State
> 00:0e:07:46:b5:c4     41  ACL    0 MAST    NONE       0     0 OPEN
> beck# hccontrol -n ubt0hci disconnect 41
> Connection handle: 41
> Reason: Connection terminated by local host [0x16]

you do not have to do it but it looks fine anyway :)

> When I try to pair with hcsecd running (with -d, and a small patch that
> shows if it receives anything at all in the recvfrom() call), I don't
> see anything at all.

you won't see anything unless there is link key/pin code request

> During the pairing attempt, hcidump shows:
> > HCI Event: Connect Request(0x04) plen 10
> < HCI Command: Accept Connection Request(0x01|0x0009) plen 7
> > HCI Event: Command Status(0x0f) plen 4
> > HCI Event: Connect Complete(0x03) plen 11

hcidump -x would be more useful :) but it looks like you are trying to
initiate connection from
the phone, right? by default freebsd will accept any connection
without authentication. if you
really want to make freebsd authenticate incoming connections then you need to 

# hccontrol -n ubt0hci write_authentication_enable 1

on the other hand you might pair devices by initiating connection to
the phone, i.e. for example try to use obexapp(1) to get phone book.
the very first time phone asks if you want to add device to the
trusted list. that is how i do it on my t68i. and if i need to push
data from my phone to pc i just push it. i do not need to pair devices
because freebsd does not ask for it.

> and then the mobile phone says that the connection failed.

well, it is hard to say its really "failed" because i can not tell
what status was returned in "Connect Complete" event. next time please
use 'hcidump -x'.

you also might need to 

# hccontrol -n ubt0hci write_node_role_switch 0

if your phone does not support role switch, see "troubleshooting" section at

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bluetooth.html

thanks,
max



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