Bluetooth mouse
Vladimir Grebenschikov
vova at fbsd.ru
Mon Jan 17 01:11:56 PST 2005
В ср, 12/01/2005 в 12:34 -0800, Maksim Yevmenkin пишет:
> Vladimir and Guys,
>
> please take a look at FreeBSD PR misc/76107. it includes the patch that
> fixes PSM problem. prize goes to Hiroyuki Aizu and the pointy hat goes
> to me :) i've committed the fix into -current and will MFC it to
> RELENG_5 in 1 day.
Something still wrong here (latest cvsupped code):
But it works:
/usr/src/usr.sbin/bluetooth# make clean
...
/usr/src/usr.sbin/bluetooth# fgrep interrupt_psm bthidd/parser.y
| interrupt_psm
interrupt_psm: T_INTERRUPT_PSM T_HEXBYTE
hid_device->interrupt_psm = $2;
" interrupt_psm 0x%x;\n" \
hid_device->control_psm, hid_device->interrupt_psm,
if (hid_device->interrupt_psm == 0) {
/usr/src/usr.sbin/bluetooth# make
...
/usr/src/usr.sbin/bluetooth# make install
...
/usr/src/usr.sbin/bluetooth# bthidcontrol -a mouse query
device {
bdaddr 00:07:61:17:9b:27;
control_psm 0x11;
interrupt_psm 0x19;
reconnect_initiate true;
battery_power true;
normally_connectable false;
hid_descriptor {
0x05 0x01 0x09 0x02 0xa1 0x01 0x85 0x02
0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01
0x29 0x08 0x15 0x00 0x25 0x01 0x95 0x08
0x75 0x01 0x81 0x02 0x05 0x01 0x09 0x30
0x09 0x31 0x16 0x01 0xf8 0x26 0xff 0x07
0x75 0x0c 0x95 0x02 0x81 0x06 0x09 0x38
0x15 0x81 0x25 0x7f 0x75 0x08 0x95 0x01
0x81 0x06 0xc0 0xc0 0x06 0x00 0xff 0x09
0x01 0xa1 0x01 0x85 0x10 0x75 0x08 0x95
0x06 0x15 0x00 0x26 0xff 0x00 0x09 0x01
0x81 0x00 0x09 0x01 0x91 0x00 0xc0
};
}
It is still 0x19 instead of 0x13.
/usr/src/usr.sbin/bluetooth# bthidcontrol -a mouse query > /etc/bluetooth/bthidd.conf
/usr/src/usr.sbin/bluetooth# /usr/sbin/bthidd
/usr/src/usr.sbin/bluetooth#
But, it works, after usual timeout mouse was found and added to /var/db/bthidd.hids
Jan 17 12:08:01 vbook bthidd[31162]: Opening outbound session for 00:07:61:17:9b:27 (new_device=1, reconnect_initiate=1)
Jan 17 12:08:06 vbook bthidd[31162]: Could not connect to 00:07:61:17:9b:27. Host is down (64)
Jan 17 12:08:06 vbook bthidd[31162]: Accepted control connection from 00:07:61:17:9b:27
Jan 17 12:08:07 vbook bthidd[31162]: Accepted interrupt connection from 00:07:61:17:9b:27
> thanks,
> max
>
> >> Hi Guys,
> >>
> >> sorry for the delay :)
> >>
> >> i've trying to troubleshoot the problem with Logitech MX900
> >> bluetooth mouse (invalid psm for hid-interrupt channel) and have
> >> been looking at all dumps you guys sent to me.
> >>
> >> here is what i found so far.
> >>
> >> 1) according to the dumps the mouse advertises correct psm, i.e.
> >> 0x13
> >>
> >> 2) bthidcontrol(8) _should_ work just fine, but it _does_not_. for
> >> whatever reason it gets wrong psm (0x25).
> >>
> >> let me just ask one more question: did you guys set any gcc
> >> optimization flags? anything that is *not* default?
> >
> >
> > no, nothing in make.conf,
> >
> > /usr/src/usr.sbin/bluetooth/bthidd$ make -V CFLAGS -O2
> > -fno-strict-aliasing -pipe -I/usr/src/usr.sbin/bluetooth/bthidd -g
> > -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized
> > /usr/src/usr.sbin/bluetooth/bthidd$
> >
> >
> >> bottom line: the problem can be either in bthidcontrol(8) or sdp(3)
> >> library. i can not reproduce the problem here, so would anyone
> >> consider giving me remote access to your box and mouse for a few
> >> hours/days?
> >
> >
> > Unfortunately it is my work notebook, and usually it connected behind
> > some firewall and there is no good way to enter from Internet here.
> >
> > Let I try to debug this problem. As I understand bthidcontrol Dump
> > should show valid psm (0x13).
> >
> >
> >> thanks, max
> >
> >
>
--
Vladimir B. Grebenchikov
vova at fbsd.ru
More information about the freebsd-bluetooth
mailing list