NetBSD Problem Report #47286
From martin@aprisoft.de Wed Dec 5 10:38:48 2012
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 9FDE363E54C
for <gnats-bugs@gnats.NetBSD.org>; Wed, 5 Dec 2012 10:38:48 +0000 (UTC)
Message-Id: <20121205103838.608ACED0E48@emmas.aprisoft.de>
Date: Wed, 05 Dec 2012 11:38:38 CET
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: bluetooth mouse (MS Wedge Touch) not working
X-Send-Pr-Version: 3.95
>Number: 47286
>Category: kern
>Synopsis: bluetooth mouse (MS Wedge Touch) not working
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: plunky
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 05 10:40:00 +0000 2012
>Closed-Date: Wed Dec 26 21:37:18 +0000 2012
>Last-Modified: Sun Jan 20 12:15:04 +0000 2013
>Originator: Martin Husemann
>Release: NetBSD 6.99.15
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD beasty.aprisoft.de 6.99.15 NetBSD 6.99.15 (NIGHT-OWL) #124: Wed Nov 28 21:08:07 CET 2012 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:
I followed the guide, did a btpin -p 0000, then a btdevctl -A and this says:
local bdaddr: 00:26:5e:9b:f1:22
remote bdaddr: 7c:1e:52:68:73:c1
link mode: auth
vendor id: 0x045e
product id: 0x0792
device type: bthidev
control psm: 0x0011
interrupt psm: 0x0013
Collection page=Generic_Desktop usage=Mouse
Collection page=Generic_Desktop usage=Mouse
Collection page=Generic_Desktop usage=Pointer
Input id=26 size=1 count=1 page=Button usage=Button_1 Variable, logical range 0..1
Input id=26 size=1 count=1 page=Button usage=Button_2 Variable, logical range 0..1
Input id=26 size=1 count=1 page=Button usage=Button_3 Variable, logical range 0..1
Input id=26 size=1 count=1 page=Button usage=Button_4 Variable, logical range 0..1
Input id=26 size=1 count=1 page=Button usage=Button_5 Variable, logical range 0..1
Input id=26 size=3 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1
Input id=26 size=16 count=1 page=Generic_Desktop usage=X Variable Relative, logical range -32767..32767
Input id=26 size=16 count=1 page=Generic_Desktop usage=Y Variable Relative, logical range -32767..32767
Collection page=0x0000 usage=0x0000
Feature id=18 size=2 count=1 page=Generic_Desktop usage=Resolution_Multiplier Variable, logical range 0..1, physical range 1..16
Input id=26 size=16 count=1 page=Generic_Desktop usage=Wheel Variable Relative, logical range -32767..32767
End collection
Collection page=0x0000 usage=0x0000
Feature id=18 size=2 count=1 page=Generic_Desktop usage=Resolution_Multiplier Variable, logical range 0..1, physical range 1..16
Feature id=18 size=4 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1
Input id=26 size=16 count=1 page=Consumer usage=AC_Pan Variable Relative, logical range -32767..32767
End collection
End collection
End collection
End collection
Collection page=Consumer usage=Consumer_Control
Collection page=Generic_Desktop usage=Mouse
Input id=31 size=16 count=1 page=Consumer usage=AC_Pan Variable Relative, logical range -32767..32767
Feature id=23 size=2 count=1 page=Microsoft usage=0xff06 Variable, logical range 0..1, physical range 1..16
Feature id=23 size=2 count=1 page=Microsoft usage=0xff0f Variable, logical range 0..1, physical range 1..16
Feature id=23 size=1 count=1 page=Microsoft usage=0xff04 Variable, logical range 0..1
Feature id=23 size=3 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1
End collection
Input id=22 size=16 count=1 page=Consumer usage=Unassigned, logical range 0..1023
Input id=22 size=8 count=1 page=Microsoft usage=0xfd01, logical range 1..255
Input id=22 size=8 count=1 page=0x0000 usage=0x0000 Const, logical range 1..255
End collection
Collection page=Consumer usage=Consumer_Control
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=34 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Feature id=36 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
Input id=39 size=8 count=1 page=Microsoft usage=0xfa0a Variable, logical range 0..255
End collection
Now doing a btdevctl -A results in:
bthidev0 at bthub0 remote-bdaddr 7c:1e:52:68:73:c1 link-mode auth
bthidev0: reportid 18 not configured
bthidev0: reportid 22 not configured
bthidev0: reportid 23 not configured
btms0 at bthidev0 reportid 26: 5 buttons, W and Z dirs.
wsmouse1 at btms0 mux 0
bthidev0: reportid 31 not configured
bthidev0: reportid 34 not configured
bthidev0: reportid 36 not configured
bthidev0: reportid 39 not configured
Looks good so far, according to the guide it should now work.
But as soon as I move the mouse I get:
bthidev0: disconnected
bthidev0: disconnected
ubt0: unknown handle 12! (losing track of 1 packet buffer)
bthidev0: disconnected
bthidev0: disconnected
and the mouse pointer never moves.
>How-To-Repeat:
Just try to use a Wedge Touch mouse.
>Fix:
n/a
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->plunky
Responsible-Changed-By: plunky@NetBSD.org
Responsible-Changed-When: Thu, 06 Dec 2012 11:06:42 +0000
Responsible-Changed-Why:
I feel responsible for this
From: Iain Hibbert <plunky@rya-online.net>
To: gnats-bugs@NetBSD.org
Cc: martin@NetBSD.org
Subject: Re: kern/47286 (bluetooth mouse (MS Wedge Touch) not working)
Date: Thu, 6 Dec 2012 11:38:18 +0000 (GMT)
> bthidev0 at bthub0 remote-bdaddr 7c:1e:52:68:73:c1 link-mode auth
> bthidev0: reportid 18 not configured
> bthidev0: reportid 22 not configured
> bthidev0: reportid 23 not configured
> btms0 at bthidev0 reportid 26: 5 buttons, W and Z dirs.
> wsmouse1 at btms0 mux 0
> bthidev0: reportid 31 not configured
> bthidev0: reportid 34 not configured
> bthidev0: reportid 36 not configured
> bthidev0: reportid 39 not configured
>
> Looks good so far, according to the guide it should now work.
Yes, these non-configured reports are mostly Microsoft special features or
inputs, and would likely need special handlers written
#31 though is PAN (left/right scroll) which is handled by btms normally..
I think this might be because the btms driver only attaches to
Desktop/Mouse reports and this is showing up in a ConsumerControl/Mouse
collection.
however, even fudging the match routine will not help for this report ID
as it would attach as a separate mouse and the driver doesn't allow for a
mouse with no X and Y movements (it could be simple enough to fix that,
the mouse driver is fairly minimal)
ultimately, the HID framework needs a redesign I think, and the
USB/Bluetooth drivers merging (since they are approximately the same) as
currently the only way to get this kind of thing fully working is to
provide a driver which attaches to the whole device, and duplicates the
HID stuff (see btmagic(4))
> But as soon as I move the mouse I get:
>
> bthidev0: disconnected
> bthidev0: disconnected
> ubt0: unknown handle 12! (losing track of 1 packet buffer)
> bthidev0: disconnected
> bthidev0: disconnected
This one I'm not sure about but it should not happen.. the bthidev(4)
driver is responsible for handling the connection, can you do that with
sysutils/netbt-hcidump running (hcidump -w dump) and send me the dump
file?
iain
From: "Iain Hibbert" <plunky@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47286 CVS commit: src/sys/dev/bluetooth
Date: Thu, 20 Dec 2012 11:13:55 +0000
Module Name: src
Committed By: plunky
Date: Thu Dec 20 11:13:54 UTC 2012
Modified Files:
src/sys/dev/bluetooth: bthidev.c btmagic.c
Log Message:
when no link-mode is specified, explicitly set a mode of (int)0
otherwise l2cap_setmode() will fail during connection setup
for bthidev.c, this fixes a problem with Microsoft Wedge Touch
mouse (which may not be able to authenticate)
for btmagic.c, include this fix in case somebody tries that
related to PR/47286
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/bluetooth/bthidev.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/bluetooth/btmagic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Iain Hibbert" <plunky@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47286 CVS commit: src/usr.sbin/btdevctl
Date: Wed, 26 Dec 2012 17:33:10 +0000
Module Name: src
Committed By: plunky
Date: Wed Dec 26 17:33:09 UTC 2012
Modified Files:
src/usr.sbin/btdevctl: btdevctl.8
Log Message:
add a comment pointing out that the link-mode may need to be
changed manually, for devices which cannot authenticate
for PR/47286
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/btdevctl/btdevctl.8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Iain Hibbert <plunky@ogmig.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/47286
Date: Wed, 26 Dec 2012 18:13:47 +0000 (GMT)
Apologies for delay, but analysis of the PR is as follows
After some discussion with Martin which does not appear here, it appears
that the mouse was failing to authenticate with to the host. I suggested
disabling that (providing "-m none" to btdevctl), which revealed a problem
with the bthidev.c code, which did not handle the "none" linkmode
properly. This was fixed and the mouse does connect and the basic mouse
functions do work now
I was concerned that there could be different problem because
authentication failed, but it appears that Microsoft believe[1] that this
is not required, and the Bluetooth HID specification[2] does not mandate
that mice support it. Our btdevctl(8) program sets a linkmode of "auth"
for HID devices by default, and I added a comment to the manpage pointing
out that this may need to be modified manually. (will add something to the
Guide also)
I also increased the diagnostics in the bthidev(4) driver to print the
errno for failed connections, which would hopefully make it easier to
diagnose why a device was not connecting.
(will request this is pulled up to -6 and -5 branches)
iain
[1] https://www.microsoft.com/hardware/en-us/help/support/how-to/mouse/bluetooth
[2] https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245140
State-Changed-From-To: open->closed
State-Changed-By: plunky@NetBSD.org
State-Changed-When: Wed, 26 Dec 2012 21:37:18 +0000
State-Changed-Why:
mouse is working now
From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47286 CVS commit: [netbsd-6] src
Date: Mon, 7 Jan 2013 04:15:13 +0000
Module Name: src
Committed By: riz
Date: Mon Jan 7 04:15:12 UTC 2013
Modified Files:
src/sys/dev/bluetooth [netbsd-6]: bthidev.c btmagic.c
src/usr.sbin/btdevctl [netbsd-6]: btdevctl.8
Log Message:
Pull up following revision(s) (requested by plunky in ticket #769):
sys/dev/bluetooth/bthidev.c: revision 1.23
sys/dev/bluetooth/bthidev.c: revision 1.24
usr.sbin/btdevctl/btdevctl.8: revision 1.8
sys/dev/bluetooth/btmagic.c: revision 1.4
sys/dev/bluetooth/btmagic.c: revision 1.5
when no link-mode is specified, explicitly set a mode of (int)0
otherwise l2cap_setmode() will fail during connection setup
for bthidev.c, this fixes a problem with Microsoft Wedge Touch
mouse (which may not be able to authenticate)
for btmagic.c, include this fix in case somebody tries that
related to PR/47286
increase some diagnostics
add a comment pointing out that the link-mode may need to be
changed manually, for devices which cannot authenticate
for PR/47286
To generate a diff of this commit:
cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/dev/bluetooth/bthidev.c
cvs rdiff -u -r1.1.22.1 -r1.1.22.2 src/sys/dev/bluetooth/btmagic.c
cvs rdiff -u -r1.7 -r1.7.8.1 src/usr.sbin/btdevctl/btdevctl.8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47286 CVS commit: [netbsd-5] src
Date: Sun, 20 Jan 2013 12:10:54 +0000
Module Name: src
Committed By: bouyer
Date: Sun Jan 20 12:10:53 UTC 2013
Modified Files:
src/sys/dev/bluetooth [netbsd-5]: bthidev.c btmagic.c
src/usr.sbin/btdevctl [netbsd-5]: btdevctl.8
Log Message:
Pull up following revision(s) (requested by plunky in ticket #1835):
sys/dev/bluetooth/bthidev.c: revision 1.23 via patch
sys/dev/bluetooth/bthidev.c: revision 1.24 via patch
usr.sbin/btdevctl/btdevctl.8: revision 1.8 via patch
sys/dev/bluetooth/btmagic.c: revision 1.4 via patch
sys/dev/bluetooth/btmagic.c: revision 1.5 via patch
when no link-mode is specified, explicitly set a mode of (int)0
otherwise l2cap_setmode() will fail during connection setup
for bthidev.c, this fixes a problem with Microsoft Wedge Touch
mouse (which may not be able to authenticate)
for btmagic.c, include this fix in case somebody tries that
related to PR/47286
increase some diagnostics
add a comment pointing out that the link-mode may need to be
changed manually, for devices which cannot authenticate
for PR/47286
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/dev/bluetooth/bthidev.c
cvs rdiff -u -r1.1.8.2 -r1.1.8.3 src/sys/dev/bluetooth/btmagic.c
cvs rdiff -u -r1.5 -r1.5.12.1 src/usr.sbin/btdevctl/btdevctl.8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.