Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Mar 2003 17:57:46 -0600 (CST)
From:      Dustin Boontheekul <dboonthe@math.okstate.edu>
To:        Maksim Yevmenkin <Maksim.Yevmenkin@cw.com>
Cc:        freebsd-current@freebsd.org
Subject:   RE: FreeBSD Bluetooth stuff
Message-ID:  <Pine.BSO.4.53.0303021727210.19641@mail.math.okstate.edu>
In-Reply-To: <45258A4365C6B24A9832BFE224837D552B1295@sjdcex01.int.exodus.net>
References:  <45258A4365C6B24A9832BFE224837D552B1295@sjdcex01.int.exodus.net>

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

> 1) compile and install hcidump from the snapshot's ports/ directory

Recompiled and reinstalled.  All went fine.

> 2) make sure you have clean setup, i.e.
>    - run # rc.bluetooth stop <device>
>    - disconnect the device from the PC
>    - reset mouse
>    - connect device back to PC
>    - run # rc.bluetooth start <device>
>    - in separate window run # hcidump -x
>    - run # hccontrol -n <device>hci inquiry
>    - run # sdptool browse <BD_ADDR_of_your_mouse>

I followed this sequence.  One thing to note is that the mouse tries it's
best to conserve power, so it only responds to any initial queries for a
few seconds after pressing the reset button.  I don't know exactly how
long, but it's pretty short.  Klausler makes a note of this on his site,
so it must have caused him a hiccup or two.

> please send me the output of hcidump.

Okay, here it is.  Turns out I think my batteries ran out of juice, which
was causing some of the problems.  I wasn't getting any response at all
after all sorts of resets so I tried seeing if I could find the keyboard
and it 'just worked'.  I replaced the batteries and got a response from
hccontrol inquiry.  Just in case replacing the batteries turned out to
reset it more than pressing the button I put the old batteries back in and
still got nothing.  When the batteries 'die' the mouse still lights up
(it's optical), and apparently the radio connection goes first.  Anyway,
without further adue here is the hcidump output:
# hcidump -x
HCIDump - HCI packet analyzer ver 1.4
device: any snap_len: 65535 filter: 0xffffffff
< HCI Command: Inquiry(0x01|0x0001) plen 5
  33 8B 9E 05 08
> HCI Event: Command Status(0x0f) plen 4
  00 01 01 04
> HCI Event: Inquiry Complete(0x01) plen 1
  00
< HCI Command: Inquiry(0x01|0x0001) plen 5
  33 8B 9E 05 08
> HCI Event: Command Status(0x0f) plen 4
  00 01 01 04
> HCI Event: Inquiry Complete(0x01) plen 1
  00
< HCI Command: Inquiry(0x01|0x0001) plen 5
  33 8B 9E 05 08
> HCI Event: Command Status(0x0f) plen 4
  00 01 01 04
> HCI Event: Inquiry Result(0x02) plen 15
  01 A8 D6 7E F2 50 00 02 00 00 80 25 00 C3 4B
> HCI Event: Inquiry Complete(0x01) plen 1
  00
< HCI Command: Create Connection(0x01|0x0005) plen 13
  A8 D6 7E F2 50 00 18 CC 02 00 C3 4B 01
> HCI Event: Command Status(0x0f) plen 4
  00 01 05 04
> HCI Event: Connect Complete(0x03) plen 11
  00 29 00 A8 D6 7E F2 50 00 01 00
< HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
  29 00 0F 00
< ACL data: handle 0x0029 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
> HCI Event: Number of Completed Packets(0x13) plen 5
  01 29 00 01 00
> HCI Event: Command Complete(0x0e) plen 6
  01 0D 08 00 29 00
> ACL data: handle 0x0029 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 2
> ACL data: handle 0x0029 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
< ACL data: handle 0x0029 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 0
> HCI Event: Number of Completed Packets(0x13) plen 5
  01 29 00 01 00
> ACL data: handle 0x0029 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 0
> ACL data: handle 0x0029 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 4
    MTU 48
> HCI Event: QoS Setup Complete(0x0d) plen 21
  00 29 00 00 01 00 00 00 00 00 00 00 00 F2 2B 00 00 FF FF FF
  FF
< ACL data: handle 0x0029 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 0
< ACL data: handle 0x0029 flags 0x02 dlen 24
    L2CAP(d): cid 0x40 len 20 [psm 1]
        SDP SSA Req: tid 0x0 len 0xf
          pat uuid-16 0x1002 (PubBrwsGrp)
          max 0xffff
          aid(s) 0x0000 - 0xffff
          cont 00
> HCI Event: Number of Completed Packets(0x13) plen 5
  01 29 00 01 00
> HCI Event: Number of Completed Packets(0x13) plen 5
  01 29 00 01 00
> ACL data: handle 0x0029 flags 0x02 dlen 14
    L2CAP(d): cid 0x40 len 10 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x5
          cnt 0x2
 len 0x2 frm->len 0x1 n 0x0
          cont 00
< ACL data: handle 0x0029 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets(0x13) plen 5
  01 29 00 01 00
> ACL data: handle 0x0029 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
^C

> do you have an open baseband connection? inquiry on the local deivce
> will not show remote devices that already connected to the local device.
> try to run
>
> # hccontrol -n <device>hci read_connection_list
>

Yes, this shows I have a connection to my mouse.

> you can disconnect baseband connection by hand by typing
>
> # hccontol -n <device>hci disconnect <connection_handle>
>
> BTW you can do
>
> # hccontrol help
>
> and
>
> # hccontrol help <command>
>
> for more information
>

These give a lot more help than the man page.

I managed to get 'remote_name_request' to return 'Microsoft Mouse'
(yippee!), but I just arbitrarily chose <ps_rep_mode> and <ps_mode> as 0.
I used 'read_clock_offset' to get the clock offset.  What are these 2
options and how would I properly find them?

> > I'm sorry if all my questions are way too basic, but what I've been
> > reading is all about bluez and, well, even documentation for that isn't
> > very complete.  I'm still looking for more sources.
>
> that is ok. BTW you might want to CC to one of the FreeBSD mailing lists.
> freebsd-mobile, freebsd-net and freebsd-current seems appropriate to me.
> this way all my answers will go into archive and other people will have
> something to start with.

I'll start CC'ing this to freebsd-current starting with this message.

Thanks,

Dustin

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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