From nobody@FreeBSD.org  Tue Jan 11 16:17:47 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E1B7516A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 11 Jan 2005 16:17:47 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CAEBB43D58
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 11 Jan 2005 16:17:47 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0BGHlw5047847
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 11 Jan 2005 16:17:47 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j0BGHl33047845;
	Tue, 11 Jan 2005 16:17:47 GMT
	(envelope-from nobody)
Message-Id: <200501111617.j0BGHl33047845@www.freebsd.org>
Date: Tue, 11 Jan 2005 16:17:47 GMT
From: Hiroyuki Aizu <aizu@navi.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Bluetooth: bthidcontrol reports interrupt_psm with wrong type. 
X-Send-Pr-Version: www-2.3

>Number:         76107
>Category:       misc
>Synopsis:       Bluetooth: bthidcontrol reports interrupt_psm with wrong type.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 11 16:20:26 GMT 2005
>Closed-Date:    Wed Jan 12 20:07:44 GMT 2005
>Last-Modified:  Wed Jan 12 20:07:44 GMT 2005
>Originator:     Hiroyuki Aizu
>Release:        5-STABLE
>Organization:
navi.org
>Environment:
FreeBSD ayers.navi.org 5.3-STABLE FreeBSD 5.3-STABLE #1: Sat Jan 8 10:29:16 JST 2005
>Description:
      The bthidcontrol command can dump information of Bluetooth HID device(Bluetooth mouse etc.) and it can use for bthidd.conf.
But bthidcontrol command reports interrupt_psm with wrong type like this.

interrupt_psm           0x19;
# 0x19 should be 0x13 with mouse device, because HID-intterupt.

I found just typo in /usr/src/usr.sbin/bluetooth/bthidd/parser.y.

>How-To-Repeat:
      Prepare Bluetooth dongle and Bluetooth mouse device.
And run bthidcontrol like below.

bthidcontrol -a xx:xx:xx:xx:xx:xx dump

>Fix:
      Just rewrite from 0x%d to 0x%x in /usr/src/usr.sbin/bluetooth/bthidd/parser.y 
like this.

--- /usr/src/usr.sbin/bluetooth/bthidd/parser.y.orig    Sat Apr 10 09:18:00 2004
+++ /usr/src/usr.sbin/bluetooth/bthidd/parser.y Wed Jan 12 01:02:19 2005
@@ -302,7 +302,7 @@
 "device {\n"                                   \
 "      bdaddr                  %s;\n"          \
 "      control_psm             0x%x;\n"        \
-"      interrupt_psm           0x%d;\n"        \
+"      interrupt_psm           0x%x;\n"        \
 "      reconnect_initiate      %s;\n"          \
 "      battery_power           %s;\n"          \
 "      normally_connectable    %s;\n"          \
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: emax 
State-Changed-When: Wed Jan 12 20:06:38 GMT 2005 
State-Changed-Why:  
The patch is correct and was committed to -current. I will MFC it to RELENG_5 
in 1 day. Pointy hat goes to me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76107 
>Unformatted:
