Broadcom 35xx bluetooth dongle.

Maksim Yevmenkin maksim.yevmenkin at savvis.net
Tue Apr 5 10:44:25 PDT 2005


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


More information about the freebsd-bluetooth mailing list