sdpcontrol issues (LONG)

Tuc at Beach House tuc at tucs-beachin-obx-house.com
Sat Dec 4 09:06:24 PST 2004


Hi,

	Brand new Bluetooth user. I'm running :

FreeBSD himinbjorg.tucs-beachin-obx-house.com 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #7: Tue Oct 12 15:07:09 EDT 2004     root at himinbjorg.tucs-beachin-obx-house.com:/usr/obj/usr/src/sys/HIMINBJORG  i386

	with a new D-Link BT-120.B4 . I'm trying to follow all the examples
according to:
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bluetooth.html

	I do the kldload, and I get:

ubt0: vendor 0x0a12 product 0x0001, rev 1.10/5.25, addr 2
ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, buffer size=294

	And the rc.bluetooth:

BD_ADDR: 00:11:95:00:39:15
Features: 0xff 0xff 0xf 00 00 00 00 00 
<3-Slot> <5-Slot> <Encryption> <Slot offset>
<Timing accuracy> <Switch> <Hold mode> <Sniff mode>
<Park mode> <RSSI> <Channel quality> <SCO link>
<HV2 packets> <HV3 packets> <u-law log> <A-law log> <CVSD>
<Paging scheme> <Power control> <Transparent SCO data> 
Max. ACL packet size: 192 bytes
Number of ACL packets: 8
Max. SCO packet size: 64 bytes
Number of SCO packets: 8

	So far, I think I'm doing well. So I turn on my Palm Treo 650 and
make it discoverable. I've already put in /etc/bluetooth/hosts :

00:07:e0:02:16:16	TucTreo650.tucs-beachin-obx-house.com

	So I do the hccontrol -n ubt0hci inquiry


Inquiry result, num_responses=1
Inquiry result #0
        BD_ADDR: TucTreo650.tucs-beachin-obx-house.com
        Page Scan Rep. Mode: 0x1
        Page Scan Period Mode: 00
        Page Scan Mode: 00
        Class: 50:02:0c
        Clock offset: 0x1ac
Inquiry complete. Status: No error [00]


	So far so good. And the hccontrol -n ubt0hci remote_name_request TucTreo650.tucs-beachin-obx-house.com 
returned :

BD_ADDR: TucTreo650.tucs-beachin-obx-house.com
Name: palmOne Device

	So I went on to hccontrol -n ubt0hci read_connection_list , which
came up empty. I'm not sure that this should really show anything.

	So I skipped down to the l2ping -a TucTreo650.tucs-beachin-obx-house.com
and all of a sudden on the Treo I get some tones and it tells me a connection
is in progress. The results of the ping are :

20 bytes from 00:07:e0:02:16:16 seq_no=0 time=2081.812 ms result=0 
20 bytes from 00:07:e0:02:16:16 seq_no=1 time=31.914 ms result=0 
20 bytes from 00:07:e0:02:16:16 seq_no=2 time=45.864 ms result=0 
20 bytes from 00:07:e0:02:16:16 seq_no=3 time=27.612 ms result=0 
20 bytes from 00:07:e0:02:16:16 seq_no=4 time=30.311 ms result=0 
20 bytes from 00:07:e0:02:16:16 seq_no=5 time=33.280 ms result=0


	(The treo had timed out so the first one I had to turn it back on.)
Just for giggles, I went back to the hccontrol -n ubt0hci read_connection_list
and saw :

Remote BD_ADDR    Handle Type Mode Role Encrypt Pending Queue State
TucTreo650.tucs-b     41  ACL    0 MAST    NONE       0     0 OPEN

	So it looks pretty good.

	I try the l2control -a himinbjorg.tucs-beachin-obx-house.com read_channel_list
(I already put my BD_ADDR in the /etc/bluetooth/hosts as :
00:11:95:00:39:15       himinbjorg.tucs-beachin-obx-house.com
)

	And it comes up empty. So does the read_connection_list, unless I
do the l2ping and quickly go back. Then I get :

L2CAP connections:
Remote BD_ADDR    Handle Flags Pending State
TucTreo650.tucs-b     42 O D         0 OPEN

	I go on to a btsockstat, and get :

Active raw HCI sockets
Socket   PCB      Flags  Recv-Q Send-Q Local address   
c891c960 c7f01280 000002      0      0 * 


	So now I skip down to section 24.4.6 . 

	My first question is how should I be starting hcsecd on a regular
basis? I don't see anything in the /etc/rc.bluetooth to do it.
So in the /etc/bluetooth/hcsecd.conf I put :

device {
        bdaddr  00:07:e0:02:16:16;
        name    "palmOne Device";
        key     nokey;
        pin     "1234";
}

	and after realizing the default file has some sort of error on line
44, I have to comment it out :

#device {
#       bdaddr  00:1:2:3:4:5;
#       name    "Dummy";
#       key     nokey;
#       pin     "0000";
#}

	I run it, and tell the Palm to trust my laptop. The debug is :

hcsecd[12989]: Got PIN_Code_Request event from 'ubt0hci', remote bdaddr 00:07:e0:02:16:16
hcsecd[12989]: Found matching entry, remote bdaddr 00:07:e0:02:16:16, name 'palmOne Device', PIN code exists
hcsecd[12989]: Sending PIN_Code_Reply to 'ubt0hci' for remote bdaddr 00:07:e0:02:16:16
hcsecd[12989]: Got Link_Key_Notification event from 'ubt0hci', remote bdaddr 00:07:e0:02:16:16

	So that looks good too. I tell it to background so it'll continue to
run.

	I move on to the next section, and this is where things start to go
bad.

	I do a sdpcontrol -a TucTreo650.tucs-beachin-obx-house.com browse  
and I get:

Could not execute command "browse". Input/output error

	I did a search of all the options, each come up as Input/output error.

	I then try to start sdpd, and it doesn't exist.

	I drop down to sdpcontrol -l browse and I get it as an illegal 
option. 




	So, I'm a tad stuck, don't want to go much farther.....

			Thanks, Tuc


More information about the freebsd-bluetooth mailing list