From owner-freebsd-bluetooth@FreeBSD.ORG Mon Jan 17 09:11:56 2005 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EA2516A4CE for ; Mon, 17 Jan 2005 09:11:56 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id CACCD43D45 for ; Mon, 17 Jan 2005 09:11:55 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1CqSvH-00087K-N4; Mon, 17 Jan 2005 12:11:43 +0300 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: <41E589BB.1060702@savvis.net> References: <1100552998.1098.5.camel@localhost> <419B8353.7040908@savvis.net> <419B9EF8.2090401@savvis.net> <1103269957.974.7.camel@localhost> <41C32471.2050805@savvis.net> <866530fusa.fsf@kamino.rfc1149.org> <41DB1084.2090405@savvis.net> <1105261338.1126.6.camel@localhost> <41E589BB.1060702@savvis.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Mon, 17 Jan 2005 12:11:43 +0300 Message-Id: <1105953103.1086.8.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: bluetooth cc: Hiroyuki Aizu cc: Yann Berthier Subject: Re: Bluetooth mouse X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2005 09:11:56 -0000 =F7 =D3=D2, 12/01/2005 =D7 12:34 -0800, Maksim Yevmenkin =D0=C9=DB=C5=D4: > Vladimir and Guys, >=20 > please take a look at FreeBSD PR misc/76107. it includes the patch that=20 > fixes PSM problem. prize goes to Hiroyuki Aizu and the pointy hat goes=20 > to me :) i've committed the fix into -current and will MFC it to=20 > 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 =3D $2; " interrupt_psm 0x%x;\n" \ hid_device->control_psm, hid_device->interrupt_psm, if (hid_device->interrupt_psm =3D=3D 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=20 0x09 0x01 0xa1 0x00 0x05 0x09 0x19 0x01=20 0x29 0x08 0x15 0x00 0x25 0x01 0x95 0x08=20 0x75 0x01 0x81 0x02 0x05 0x01 0x09 0x30=20 0x09 0x31 0x16 0x01 0xf8 0x26 0xff 0x07=20 0x75 0x0c 0x95 0x02 0x81 0x06 0x09 0x38=20 0x15 0x81 0x25 0x7f 0x75 0x08 0x95 0x01=20 0x81 0x06 0xc0 0xc0 0x06 0x00 0xff 0x09=20 0x01 0xa1 0x01 0x85 0x10 0x75 0x08 0x95=20 0x06 0x15 0x00 0x26 0xff 0x00 0x09 0x01=20 0x81 0x00 0x09 0x01 0x91 0x00 0xc0=20 }; } It is still 0x19 instead of 0x13. =20 /usr/src/usr.sbin/bluetooth# bthidcontrol -a mouse query > /etc/bluetooth/b= thidd.conf /usr/src/usr.sbin/bluetooth# /usr/sbin/bthidd /usr/src/usr.sbin/bluetooth#=20 But, it works, after usual timeout mouse was found and added to /var/db/bth= idd.hids Jan 17 12:08:01 vbook bthidd[31162]: Opening outbound session for 00:07:61:= 17:9b:27 (new_device=3D1, reconnect_initiate=3D1) 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 >=20 > >> Hi Guys, > >>=20 > >> sorry for the delay :) > >>=20 > >> 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. > >>=20 > >> here is what i found so far. > >>=20 > >> 1) according to the dumps the mouse advertises correct psm, i.e. > >> 0x13 > >>=20 > >> 2) bthidcontrol(8) _should_ work just fine, but it _does_not_. for > >> whatever reason it gets wrong psm (0x25). > >>=20 > >> let me just ask one more question: did you guys set any gcc > >> optimization flags? anything that is *not* default? > >=20 > >=20 > > no, nothing in make.conf, > >=20 > > /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=20 > > /usr/src/usr.sbin/bluetooth/bthidd$ > >=20 > >=20 > >> 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? > >=20 > >=20 > > Unfortunately it is my work notebook, and usually it connected behind > > some firewall and there is no good way to enter from Internet here. > >=20 > > Let I try to debug this problem. As I understand bthidcontrol Dump=20 > > should show valid psm (0x13). > >=20 > >=20 > >> thanks, max > >=20 > >=20 >=20 --=20 Vladimir B. Grebenchikov vova@fbsd.ru