Bluetooth mouse

Vladimir Grebenschikov vova at fbsd.ru
Tue Dec 21 01:58:10 PST 2004


В пн, 20/12/2004 в 11:40 -0800, Maksim Yevmenkin пишет:
> Vladimir,
>  
> > looks like it does not require key or pin, also winXP connects only
> > without pin.
> 
> how can you tell? the pin code may be hardwired somewhere in the windows 
> registry. did windows software prompt you for anything during install? 
> can you check all the documentation that came with the mouse to see if 
> there is a pin code?

I have not installed any drivers shipped with this mouse, only native
winxp driver. WinXP bluetooth explorer found mouse and ask me Do I want
to provide pin or do not. I select do not provide and this works.

> Arne: could you please tell us what did you do to make your mouse work?
> 
> >> 7) start bthidd(8)
> >> 
> >> if you did everything right the mouse should work.
> > 
> > Still no luck, but this time there is attempt to connect from host to
> > mouse on bthidd start:
> > 
> > # bthidd -d bthidd[1398]: Opening outbound session for
> > 00:07:61:17:9b:27 (new_device=1, reconnect_initiate=1) bthidd[1398]:
> > Could not connect to 00:07:61:17:9b:27. Socket is not connected (57)
> 
> that the way it should work.
> 
> > There hcidump output while bthidd connection attempt # hcidump -r
> > mouse.dump HCIDump - HCI packet analyzer ver 1.5
> 
> [...]
> 
> 1103525841.696334 < ACL data: handle 0x002a flags 0x02 dlen 12
>      L2CAP(s): Connect req: psm 17 scid 0x0060
> 
> here host is trying to open hid-control channel (psm 17 (0x11))
> 
> 1103525841.738294 > ACL data: handle 0x002a flags 0x02 dlen 16
>      L2CAP(s): Connect rsp: dcid 0x005c scid 0x0060 result 1 status 2
> 
> 1103525841.772308 > ACL data: handle 0x002a flags 0x02 dlen 16
>      L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0060 result 2 status 0
> 
> and these are mouse responses. the first response returns with result 
> code 1 (Connection Pending) and status code 2 (Authorization Pending).
> 
> the second response is with result code 2 (PSM Not Supported) and status 
> code 0 (No Information).
> 
> note timestamps - responses are only 34 msec apart - not much time. so 
> it looks like the mouse does not like the host.
> 
> are you using different bluetooth adapters on your freebsd and winxp 
> boxes? if so, can you try and use winxp adapter on your freebsd box? 
> also did you check the manual to find out what is the correct reset 
> procedure for the mouse?

The same adapter was used, my notebooks's on-board bt

> > bthidd[1610]: Opening outbound session for 00:07:61:17:9b:27 
> > (new_device=1, reconnect_initiate=1) bthidd[1610]: Could not connect
> > to 00:07:61:17:9b:27. Socket is not connected (57)
> > 
> > hcidump while this is:
> 
>      < ACL data: handle 0x0029 flags 0x02 dlen 12
>          L2CAP(s): Connect req: psm 17 scid 0x006d
> 
> again host is trying to open hid-control channel
> 
>     > ACL data: handle 0x0029 flags 0x02 dlen 16
>          L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 1 status 2
> 
>      > ACL data: handle 0x0029 flags 0x02 dlen 16
>          L2CAP(s): Connect rsp: dcid 0x0042 scid 0x006d result 0 status 0
> 
> whoa! this time it has opened hid-control channel. lets see what happens 
> next...
>
>      < ACL data: handle 0x0029 flags 0x02 dlen 12
>          L2CAP(s): Config req: dcid 0x0042 flags 0x0000 clen 0
> 
>      > ACL data: handle 0x0029 flags 0x02 dlen 14
>          L2CAP(s): Config rsp: scid 0x006d flags 0x0000 result 0 clen 0
> 
> here host configures its side of the l2cap channel (hid control) and 
> mouse accepts it.
> 
>      > ACL data: handle 0x0029 flags 0x01 dlen 13
>          L2CAP(s): Config req: dcid 0x006d flags 0x0000 clen 28
>          MTU 48 Unknown (type 03, len 22)
> 
>      < ACL data: handle 0x0029 flags 0x02 dlen 14
>          L2CAP(s): Config rsp: scid 0x0042 flags 0x0000 result 0 clen 0
> 
> here mouse configures its side of the l2cap channel (hid control), sets 
> mtu and qos. (ignore Unknown - hcidump does not know how to parse qos 
> option). host accepts it.
> 
> so far everything looks fine to me. after this point hid control channel 
>   should be opened and configured. the next step is to open hid 
> interrupt channel.
> 
>      < ACL data: handle 0x0029 flags 0x02 dlen 12
>          L2CAP(s): Connect req: psm 25 scid 0x006e
> 
>      > ACL data: handle 0x0029 flags 0x02 dlen 16
>          L2CAP(s): Connect rsp: dcid 0x0000 scid 0x006e result 2 status 0
> 
> ok, this does not make any sense. psm 25 ?! why the hell it tries to 
> connect to psm 25? of course mouse tells host to get lost, because it 
> does not want to talk on psm 25.
> 
> wait, i know why. i just checked your older email and find out that you have
> 
> "interrupt_psm 0x19;"
> 
> line in your /etc/bluetooth/bthidd.conf file (mouse section). could you 
> please try to change it to
> 
> "interrupt_psm 0x13;"
> 
> then do the following:
> 
> 0) run 'hcidump -w mouse.dump' as root
> 
> 1) remove mouse bd_addr from /var/db/bthidd.hids file
> 
> 2) disconnect and reconnect batteries on your mouse
> 
> 3) press 'connect' button on your mouse
> 
> 4) restart bthidd(8)
> 
> > It happens when I disconnect/connect batteries and then press connect
> >  button.
> > 
> > Even after that mouse does not moved. if I restart bthidd - it does
> > not connects and mouse does not send any traffic.
> 
> it will not move - you do not have hid session, that is you need to open 
> both hid control and hid interrupt channels.
> 
> if the above works then there is a problem with


Yes, it works ! (dump in attachment)

> 1) bthidcontrol(8) - because it has incorrectly parsed sdp response and 
> showed wrong psm for the hid interrupt channel. that is what you put 
> into the /etc/bluetooth/bthidd.conf file (unless of course you 
> hand-edited it as well)

No, I do not edit this manually.

> or
> 
> 2) mouse itself. it advertises wrong psm for the hid interrupt channel.

Why it works with winXP in this case ?

How to find what happens ? 

> thanks,
> max
-- 
Vladimir B. Grebenchikov
vova at fbsd.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mouse3.dump
Type: application/octet-stream
Size: 10696 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-bluetooth/attachments/20041221/269f0c3b/mouse3.obj


More information about the freebsd-bluetooth mailing list