Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Apr 2005 10:44:07 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Broadcom 35xx bluetooth dongle.
Message-ID:  <4252CE67.90007@savvis.net>
In-Reply-To: <425239DA.1020606@elischer.org>
References:  <41D0AF12.5000902@elischer.org> <41D0C192.4010002@savvis.net> <41D0C87E.2090201@elischer.org> <41D0CBAE.4090608@savvis.net> <41D13D7A.2030908@elischer.org> <41D1BE99.20500@savvis.net> <41D1C56F.7040504@elischer.org> <41D1CC19.8070308@savvis.net> <41D22495.5060304@elischer.org> <41D2EB4F.6050600@savvis.net> <41D318BA.3020508@elischer.org> <41D31A8B.7020906@savvis.net> <41D31E4F.2030805@elischer.org> <41D328EA.50001@savvis.net> <41D369FE.6090005@elischer.org> <41D3711A.1020501@savvis.net> <41D375A8.3070704@savvis.net> <41D375E7.9060602@savvis.net> <41D379FC.1020308@savvis.net> <41D38E5E.2040202@elischer.org> <41D3919D.3020508@savvis.net> <41D3BF3A.4020008@elischer.org> <41D42FDC.1010908@savvis.net> <425239DA.1020606@elischer.org>

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

> ok so it isn;t working any more...
> What have I done wrong?
> jules# kldload ng_ubt
> jules# sh /etc/rc.bluetooth start ubt0

looks fine

> jules# hcsecd -d
> hcsecd[1152]: Restored link key for the entry, remote bdaddr 
> 00:0a:28:72:c8:4d, name 'JulianE-cell'

looks fine

> (back on original window;)
> jules# hccontrol -n ubt0hci inquiry
> Inquiry result, num_responses=1

looks fine too

> jules# hccontrol -n ubt0hci remote_name_request cell
> BD_ADDR: JulianE-cell
> Name: JulianE-cell
> jules# l2ping -a cell -c 3
> 44 bytes from JulianE-cell seq_no=0 time=1571.147 ms result=0
> 44 bytes from JulianE-cell seq_no=1 time=20.375 ms result=0
> 44 bytes from JulianE-cell seq_no=2 time=18.803 ms result=0

looks fine

> jules# hccontrol -n ubt0hci read_connection_list
> Remote BD_ADDR    Handle Type Mode Role Encrypt Pending Queue State

that might be ok. locally originated baseband connection will be 
disconnected automatically after 5 sec (configurable) of inactivity. if 
it has been 5 sec (or more) since you have terminated l2ping then 
baseband connection will go down.

> jules# hccontrol -n ubt0hci write_authentication_enable 1
> jules# hccontrol -n ubt0hci read_authentication_enable
> Authentication Enable: Enabled [1]

that's fine. what it means is that local host will authenticate 
*incoming* connections.

> jules# l2control -a cell read_channel_list
> l2control: Could not bind socket, bdaddr=00:0a:28:72:c8:4d: Network is down

ok, this is wrong. l2control(8) is used to get information about *local* 
devices. that is you should use "l2control -a BD_ADDR_of_bt_dongle." 
this is kinda hccontrol(8), but in hccontrol(8) we use name of the local 
device and in l2control(8) bd_addr of the local device. because you do 
not have local device with bd_addr 00:0a:28:72:c8:4d attached to the 
system you get this error message.

> jules# sdpcontrol -a cell browse
> Could not execute command "browse". Permission denied
> jules# hccontrol -n ubt0hci write_authentication_enable 0
> jules# sdpcontrol -a cell browse

[...]

wow. that weird. did you try to wait a few sec. after first failure and 
then try again (without changing write_authentication_enable back to 0).

i just tried this with my nokia 6820 and it works.

beetle# hccontrol -n ubt0hci write_authentication_enable 1
beetle# sdpcontrol -a nokia.phone browse

[...]

[hcsecd output]

hcsecd[4217]: Got Link_Key_Request event from 'ubt0hci', remote bdaddr 
00:02:ee:df:f7:19
hcsecd[4217]: Found matching entry, remote bdaddr 00:02:ee:df:f7:19, 
name 'Nokia 6820 phone', link key exists
hcsecd[4217]: Sending Link_Key_Reply to 'ubt0hci' for remote bdaddr 
00:02:ee:df:f7:19

[hcidump output]

< HCI Command: Create Connection(0x01|0x0005) plen 13
   19 F7 DF EE 02 00 18 CC 00 00 00 00 01
 > HCI Event: Command Status(0x0f) plen 4
   00 01 05 04
 > HCI Event: Link Key Request(0x17) plen 6
   19 F7 DF EE 02 00
< HCI Command: Link Key Request Reply(0x01|0x000b) plen 22


i'd like you to try the following:

1) hcsecd -d

2) hcidump -w dump

3) hccontrol -n ubt0hci write_authentication_enable 1

4) sdpcontrol -a cell browse

if (4) fails wait a few sec and try (4) again.

5) kill hcidump and send me the dump file.

> jules# obexapp -f -a cell -C FTRN
> jules# < nothing happens. hcsecd on other windo however prints:
> 
> hcsecd[1152]: Got Link_Key_Request event from 'ubt0hci', remote bdaddr 
> 00:0a:28:72:c8:4d
> hcsecd[1152]: Found matching entry, remote bdaddr 00:0a:28:72:c8:4d, 
> name 'JulianE-cell', link key exists
> hcsecd[1152]: Sending Link_Key_Reply to 'ubt0hci' for remote bdaddr 
> 00:0a:28:72:c8:4d
> 
> (I have not changed the key as far as I know)

hmmm... strange... binary hcidump please?

> jules# l2control -a cell read_channel_list
> l2control: Could not bind socket, bdaddr=00:0a:28:72:c8:4d: Network is down

again that would not work

> jules#
> (deleted laptop from phone.. recreated with pin in hcsecd.conf)
> 
> jules# obexapp -a cell -f -C 9
> Could not connect to the remote OBEX server. Response: Bad Request 
> (0x40). Service: File Browsing
> jules#

how about the following:

1) on your phone delete all 'paired devices'

2) delete  /var/db/hcsecd.keys file (or at least delete the key for your 
cell phone)

3) 'pair' phone and computer

> oh oh.. this looks familiar..
> did you check in the changes that got me going last time?
> maybe I accidentally refreshed the port...

there was no changes to the port for at least two months. i also did not 
make any changes to the stack itself.

thanks,
max



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