From owner-freebsd-bluetooth@FreeBSD.ORG Mon Feb 13 19:42:31 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 5FB9F16A420 for ; Mon, 13 Feb 2006 19:42:31 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 168FA43DA4 for ; Mon, 13 Feb 2006 19:42:19 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k1DJgGM24912; Mon, 13 Feb 2006 14:42:17 -0500 Message-ID: <43F0E117.2060509@savvis.net> Date: Mon, 13 Feb 2006 11:42:15 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Mumby References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Pairing problem with Motorola E398 X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 19:42:31 -0000 Mark, > I have a problem that i hope you can help with. > > I am trying to pair my E398 with my FreeBSD 5.4 box. Basicly nothing > happens. > I have only recently added bluetooth to my setup and i am new to it. > > I am able to pair my iPAQ 2110 and my PC to the FreeBSD box. > > I have been through the configs many times and believe the are correct - > > When i start Bluetooth i get - > firewall# /etc/rc.bluetooth start ubt0 [...] looks good. > When i put the phone into "Find Me" (only allows 60 sec) mode i get - > firewall# hccontrol -n ubt0hci inquiry > Inquiry result, num_responses=1 > Inquiry result #0 > BD_ADDR: MarkCell > Page Scan Rep. Mode: 0x1 > Page Scan Period Mode: 00 > Page Scan Mode: 00 > Class: 52:22:04 > Clock offset: 0x232 > Inquiry complete. Status: No error [00] looks good > Then do a name query - > firewall# hccontrol -n ubt0hci remote_name_request markcell 0 0 0 > BD_ADDR: MarkCell > Name: MarkCell looks good > Then do a spdcontrol -a markcell browse (this can be done at anytime oes not > need to be in "Find Me" mode - > > firewall# /usr/sbin/spdcontrol -a markcell browse [...] looks good. > I have addeded MarkCell to the host file - > 00:0a:28:32:0e:25 MarkCell > > Here is the hcsecd.conf entry - > device { > bdaddr 00:0a:28:32:0e:25; > name "MarkCell"; > key nokey; > pin "0000"; > } looks fine > But when i run hcsecd -d and put the phone into "Find Me" mode nothing seems > to happen. hcsecd(8) will NOT actively connect to your phone. all hcsecd(8) does is answers hci pin code/link key request events. one of the devices (either phone or pc) has to request authentication. many devices (such as phones) only ask for authentication when remote device is trying to use service. first, make sure that hcsecd(8) is running then do # hccontrol -n ubt0hci write_authentication_enable 1 now try to do % sdpcontrol -a MarkCell browse you should get request for pin code in hcsecd(8). after the link key was generated it will be stored in /var/db/hcsecd.keys file. next time the phone will request authentication this key will be used. note that you MUST run hcsecd(8) at all times. now you can turn authentication off # hccontrol -n ubt0hci write_authentication_enable 0 thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Feb 14 12:59:30 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org 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 14DB416A420 for ; Tue, 14 Feb 2006 12:59:30 +0000 (GMT) (envelope-from anders@FreeBSD.org) Received: from totem.fix.no (totem.fix.no [80.91.36.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03CAB43D76 for ; Tue, 14 Feb 2006 12:59:21 +0000 (GMT) (envelope-from anders@FreeBSD.org) Received: by totem.fix.no (Postfix, from userid 1000) id A90888DB148; Tue, 14 Feb 2006 13:59:18 +0100 (CET) Date: Tue, 14 Feb 2006 13:59:18 +0100 From: Anders Nordby To: freebsd-bluetooth@FreeBSD.org Message-ID: <20060214125918.GB51893@totem.fix.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP-Key: http://anders.fix.no/pgp/ X-PGP-Key-FingerPrint: 1E0F C53C D8DF 6A8F EAAD 19C5 D12A BC9F 0083 5956 User-Agent: Mutt/1.5.11 Cc: Subject: Bluetooth compatibility X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 12:59:30 -0000 Hi, Does ng_ubt support Bluetooth 1.2 devices? Are USB dongles with Bluetooth 1.2 backwards compatible? I'm considering to buy a D-Link DBT-120 (1.1) or DBT-122 (1.2) device. Cheers, -- Anders. From owner-freebsd-bluetooth@FreeBSD.ORG Tue Feb 14 17:28:09 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org 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 2D46316A420; Tue, 14 Feb 2006 17:28:09 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADB4E43D48; Tue, 14 Feb 2006 17:28:08 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k1EHS7M02938; Tue, 14 Feb 2006 12:28:07 -0500 Message-ID: <43F21326.8000906@savvis.net> Date: Tue, 14 Feb 2006 09:28:06 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anders Nordby References: <20060214125918.GB51893@totem.fix.no> In-Reply-To: <20060214125918.GB51893@totem.fix.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: Bluetooth compatibility X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 17:28:09 -0000 Anders, > Does ng_ubt support Bluetooth 1.2 devices? Are USB dongles with Bluetooth 1.2 > backwards compatible? I'm considering to buy a D-Link DBT-120 (1.1) or > DBT-122 (1.2) device. in general, yes, bluetooth v1.2 devices will work with ng_ubt(4) and bluetooth stack. i have v1.2 device and it works just fine. keep in mind that ng_hci.h does not yet have definitions for bluetooth v1.2 hci commands and events. it does not mean that you can not send these commands to the device. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Feb 14 18:07:01 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 6EEA016A420; Tue, 14 Feb 2006 18:07:01 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.com [194.25.134.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id C852E43D55; Tue, 14 Feb 2006 18:06:59 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from fwd32.aul.t-online.de by mailout05.sul.t-online.com with smtp id 1F94Zj-0003gw-02; Tue, 14 Feb 2006 19:06:55 +0100 Received: from ramses.kicks-ass.net (Gn0S+vZl8e2NJoCSPM+MGwRzAGPy12gRYJPs3FqXGDRdYedDUIQf4w@[80.143.250.85]) by fwd32.sul.t-online.de with esmtp id 1F94Zd-1QDOlc0; Tue, 14 Feb 2006 19:06:49 +0100 Received: from localhost (dslb-084-061-030-058.pools.arcor-ip.net [84.61.30.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ramses.kicks-ass.net (Postfix) with ESMTP id 83BF5B833; Tue, 14 Feb 2006 19:06:49 +0100 (CET) From: Markus Brueffer To: freebsd-bluetooth@freebsd.org Date: Tue, 14 Feb 2006 19:05:57 +0100 User-Agent: KMail/1.9.1 References: <20060214125918.GB51893@totem.fix.no> <43F21326.8000906@savvis.net> In-Reply-To: <43F21326.8000906@savvis.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1287468.oaZIUhmXfY"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200602141906.01983.markus@brueffer.de> X-ID: Gn0S+vZl8e2NJoCSPM+MGwRzAGPy12gRYJPs3FqXGDRdYedDUIQf4w@t-dialin.net X-TOI-MSGID: 10558100-d2dc-4e4e-8efe-329f65ba5164 Cc: Subject: Re: Bluetooth compatibility X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 18:07:01 -0000 --nextPart1287468.oaZIUhmXfY Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Tuesday 14 February 2006 18:28 schrieb Maksim Yevmenkin: > Anders, > > > Does ng_ubt support Bluetooth 1.2 devices? Are USB dongles with Bluetoo= th > > 1.2 backwards compatible? I'm considering to buy a D-Link DBT-120 (1.1) > > or DBT-122 (1.2) device. > > in general, yes, bluetooth v1.2 devices will work with ng_ubt(4) and > bluetooth stack. i have v1.2 device and it works just fine. keep in mind > that ng_hci.h does not yet have definitions for bluetooth v1.2 hci > commands and events. it does not mean that you can not send these > commands to the device. Just for the archive: bluetooth V2.0 dongles work as well (tested with 3=20 different dongles here). Markus =2D-=20 Markus Brueffer =A0 =A0| GPG-Key: http://people.FreeBSD.org/~markus/markus.= asc markus@brueffer.de | FP: 3F9B EBE8 F290 E5CC 1447 8760 D48D 1072 78F8 A8D4 markus@FreeBSD.org | FreeBSD: The Power to Serve! --nextPart1287468.oaZIUhmXfY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBD8hwJ1I0Qcnj4qNQRAu7AAKCZ7mkba2EQGFQs+A+nwPN3sXV6cQCgxJ+t GKktyljWVd2anv5vCYX5MbY= =snHq -----END PGP SIGNATURE----- --nextPart1287468.oaZIUhmXfY-- From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 15 06:08:26 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 AE2E916A420 for ; Wed, 15 Feb 2006 06:08:26 +0000 (GMT) (envelope-from mmumby@xtra.co.nz) Received: from mta201-rme.xtra.co.nz (mta201-rme.xtra.co.nz [210.86.15.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id D18A543D4C for ; Wed, 15 Feb 2006 06:08:25 +0000 (GMT) (envelope-from mmumby@xtra.co.nz) Received: from web3-rme.xtra.co.nz ([210.86.15.193]) by mta201-rme.xtra.co.nz with ESMTP id <20060215060824.ZWSG1862.mta201-rme.xtra.co.nz@web3-rme.xtra.co.nz>; Wed, 15 Feb 2006 19:08:24 +1300 Received: from orac ([222.152.21.232]) by web3-rme.xtra.co.nz with SMTP id <20060215060823.YFWI22512.web3-rme.xtra.co.nz@orac>; Wed, 15 Feb 2006 19:08:23 +1300 From: "Mark Mumby" To: "Maksim Yevmenkin" Date: Wed, 15 Feb 2006 19:08:35 +1300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <43F0E117.2060509@savvis.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Cc: freebsd-bluetooth@freebsd.org Subject: RE: Pairing problem with Motorola E398 X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 06:08:26 -0000 Max, Absolutely fantastic, worked first time. Thanks for your help. Mark -----Original Message----- From: Maksim Yevmenkin [mailto:maksim.yevmenkin@savvis.net] Sent: Tuesday, 14 February 2006 8:42 a.m. To: Mark Mumby Cc: freebsd-bluetooth@freebsd.org Subject: Re: Pairing problem with Motorola E398 Mark, > I have a problem that i hope you can help with. > > I am trying to pair my E398 with my FreeBSD 5.4 box. Basicly nothing > happens. > I have only recently added bluetooth to my setup and i am new to it. > > I am able to pair my iPAQ 2110 and my PC to the FreeBSD box. > > I have been through the configs many times and believe the are correct - > > When i start Bluetooth i get - > firewall# /etc/rc.bluetooth start ubt0 [...] looks good. > When i put the phone into "Find Me" (only allows 60 sec) mode i get - > firewall# hccontrol -n ubt0hci inquiry > Inquiry result, num_responses=1 > Inquiry result #0 > BD_ADDR: MarkCell > Page Scan Rep. Mode: 0x1 > Page Scan Period Mode: 00 > Page Scan Mode: 00 > Class: 52:22:04 > Clock offset: 0x232 > Inquiry complete. Status: No error [00] looks good > Then do a name query - > firewall# hccontrol -n ubt0hci remote_name_request markcell 0 0 0 > BD_ADDR: MarkCell > Name: MarkCell looks good > Then do a spdcontrol -a markcell browse (this can be done at anytime oes not > need to be in "Find Me" mode - > > firewall# /usr/sbin/spdcontrol -a markcell browse [...] looks good. > I have addeded MarkCell to the host file - > 00:0a:28:32:0e:25 MarkCell > > Here is the hcsecd.conf entry - > device { > bdaddr 00:0a:28:32:0e:25; > name "MarkCell"; > key nokey; > pin "0000"; > } looks fine > But when i run hcsecd -d and put the phone into "Find Me" mode nothing seems > to happen. hcsecd(8) will NOT actively connect to your phone. all hcsecd(8) does is answers hci pin code/link key request events. one of the devices (either phone or pc) has to request authentication. many devices (such as phones) only ask for authentication when remote device is trying to use service. first, make sure that hcsecd(8) is running then do # hccontrol -n ubt0hci write_authentication_enable 1 now try to do % sdpcontrol -a MarkCell browse you should get request for pin code in hcsecd(8). after the link key was generated it will be stored in /var/db/hcsecd.keys file. next time the phone will request authentication this key will be used. note that you MUST run hcsecd(8) at all times. now you can turn authentication off # hccontrol -n ubt0hci write_authentication_enable 0 thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 15 14:52:27 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 F27A916A420; Wed, 15 Feb 2006 14:52:26 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from mailout10.sul.t-online.com (mailout10.sul.t-online.com [194.25.134.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AB3243D45; Wed, 15 Feb 2006 14:52:26 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from fwd26.aul.t-online.de by mailout10.sul.t-online.com with smtp id 1F9O12-0001Cw-03; Wed, 15 Feb 2006 15:52:24 +0100 Received: from ramses.kicks-ass.net (ZYd41cZEweuVy6PjRmMQyZzLNdiEYJGo0eEKp7WKAFNgUweccyfhUw@[80.143.250.85]) by fwd26.sul.t-online.de with esmtp id 1F9O0x-0yeNo80; Wed, 15 Feb 2006 15:52:19 +0100 Received: from localhost (dslb-084-061-054-045.pools.arcor-ip.net [84.61.54.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ramses.kicks-ass.net (Postfix) with ESMTP id 25A75B833; Wed, 15 Feb 2006 15:52:22 +0100 (CET) From: Markus Brueffer To: freebsd-usb@freebsd.org Date: Wed, 15 Feb 2006 15:51:20 +0100 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1515827.EJBHUV7QcL"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200602151551.27188.markus@brueffer.de> X-ID: ZYd41cZEweuVy6PjRmMQyZzLNdiEYJGo0eEKp7WKAFNgUweccyfhUw@t-dialin.net X-TOI-MSGID: 04423a6b-709a-402f-90d6-8b764d0a1eab Cc: freebsd-bluetooth@freebsd.org Subject: [Patch] Fix collection entry parsing in libusbhid X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 14:52:27 -0000 --nextPart1515827.EJBHUV7QcL Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, here is a patch for libusbhid which fixes parsing of collection entries if = the=20 collection has only non-variable Input/Output/Feature entries: http://people.freebsd.org/~markus/bt/parse.c.diff The problem ist that the output of collection pages has to be deferred unti= l=20 the report id is known. Without the patch, deferred collection pages are on= ly=20 reported correctly if variable Input/Output/Feature entries are present. The effect can be seen here (output of the hid descriptor dump of a Logitec= h=20 MX5000 keyboard using bthidcontrol): http://people.freebsd.org/~markus/bt/mx5000_before.txt http://people.freebsd.org/~markus/bt/mx5000_after.txt =46urthermore I have removed the loop in REPORT_SAVED_COLL. If someone know= s why=20 it was there in the first place, please share your wisdom :) Third change is the removal of REPORT_SAVED_COLL if the end of a collection= is=20 reached. All collection entries should have been reported by then. Ok to commit? Markus =2D-=20 Markus Brueffer =A0 =A0| GPG-Key: http://people.FreeBSD.org/~markus/markus.= asc markus@brueffer.de | FP: 3F9B EBE8 F290 E5CC 1447 8760 D48D 1072 78F8 A8D4 markus@FreeBSD.org | FreeBSD: The Power to Serve! --nextPart1515827.EJBHUV7QcL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBD8z/v1I0Qcnj4qNQRAkjSAKDCBidrz0FyH8W6P16KEix76s5A0wCfXMlQ 9AOrEWxkT9hLGdKcoAAisRQ= =Q0xs -----END PGP SIGNATURE----- --nextPart1515827.EJBHUV7QcL-- From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 15 15:05:06 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 7DA2A16A422 for ; Wed, 15 Feb 2006 15:05:06 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 167C143D4C for ; Wed, 15 Feb 2006 15:04:58 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k1FF4wVi075939 for ; Wed, 15 Feb 2006 09:04:58 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43F34314.7030606@centtech.com> Date: Wed, 15 Feb 2006 09:04:52 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: freebsd-bluetooth@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1289/Tue Feb 14 08:36:44 2006 on mh2.centtech.com X-Virus-Status: Clean Subject: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 15:05:06 -0000 I saw a recent commit regarding bluetooth mouse battery status: markus 2006-02-10 19:54:17 UTC FreeBSD src repository (ports committer) Modified files: usr.sbin/bluetooth/bthidcontrol sdp.c Log: - Fix attribute id of HIDBatteryPower - Fix two typos in comments Approved by: emax Revision Changes Path 1.2 +5 -5 src/usr.sbin/bluetooth/bthidcontrol/sdp.c That's for -current, but I'm running 6.1-PRERELEASE (fyi). Is there a way to find the current battery power on a bluetooth mouse? Here's a bthidcontrol dump of my Logitech mx900: Collection page=Generic_Desktop usage=Mouse Collection page=Generic_Desktop usage=Pointer Input id=2 size=1 count=1 page=Button usage=Button_1 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_2 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_3 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_4 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_5 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_6 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_7 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_8 Variable, logical range 0..1 Input id=2 size=12 count=1 page=Generic_Desktop usage=X Variable Relative, logical range -2047..2047 Input id=2 size=12 count=1 page=Generic_Desktop usage=Y Variable Relative, logical range -2047..2047 Input id=2 size=8 count=1 page=Generic_Desktop usage=Wheel Variable Relative, logical range -127..127 End collection End collection Input id=16 size=8 count=6 page=Microsoft usage=0x0001, logical range 0..255 Output id=16 size=8 count=6 page=Microsoft usage=0x0001, logical range 0..255 Collection page=Microsoft usage=0x0001 Thanks! Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 15 17:44:48 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 C4D6216A420 for ; Wed, 15 Feb 2006 17:44:48 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7180F43D46 for ; Wed, 15 Feb 2006 17:44:48 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k1FHikM09229; Wed, 15 Feb 2006 12:44:46 -0500 Message-ID: <43F3688B.8060700@savvis.net> Date: Wed, 15 Feb 2006 09:44:43 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <43F34314.7030606@centtech.com> In-Reply-To: <43F34314.7030606@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 17:44:48 -0000 Eric, > I saw a recent commit regarding bluetooth mouse battery status: > > markus 2006-02-10 19:54:17 UTC > > FreeBSD src repository (ports committer) > > Modified files: > usr.sbin/bluetooth/bthidcontrol sdp.c Log: > - Fix attribute id of HIDBatteryPower > - Fix two typos in comments > > Approved by: emax > > Revision Changes Path > 1.2 +5 -5 src/usr.sbin/bluetooth/bthidcontrol/sdp.c > > > That's for -current, but I'm running 6.1-PRERELEASE (fyi). > > Is there a way to find the current battery power on a bluetooth mouse? > Here's a bthidcontrol dump of my Logitech mx900: with this patch bthidd(8) should properly detect battery operated devices. that is one piece of the puzzle another piece is that the device should send hid report about its battery status, i.e. bthidd(8) will use syslog(3) facility to log such events. bthidd(8) understand battery report if page is HUP_MICROSOFT and usage is 0xfe01 (please see /usr/src/usr.sbin/bluetooth/bthidd/hid.c for details). i do not see page == microsoft and usage == 0xfe01 in the hid descriptor you have posted. so it seems like your mouse will not send battery report. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 15 22:43:36 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org 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 6E00F16A420 for ; Wed, 15 Feb 2006 22:43:36 +0000 (GMT) (envelope-from anders@FreeBSD.org) Received: from totem.fix.no (totem.fix.no [80.91.36.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A2CE43D46 for ; Wed, 15 Feb 2006 22:43:35 +0000 (GMT) (envelope-from anders@FreeBSD.org) Received: by totem.fix.no (Postfix, from userid 1000) id D2FC68DB148; Wed, 15 Feb 2006 23:43:33 +0100 (CET) Date: Wed, 15 Feb 2006 23:43:33 +0100 From: Anders Nordby To: Maksim Yevmenkin , freebsd-bluetooth@FreeBSD.org Message-ID: <20060215224333.GA15277@totem.fix.no> References: <20060214125918.GB51893@totem.fix.no> <43F21326.8000906@savvis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43F21326.8000906@savvis.net> X-PGP-Key: http://anders.fix.no/pgp/ X-PGP-Key-FingerPrint: 1E0F C53C D8DF 6A8F EAAD 19C5 D12A BC9F 0083 5956 User-Agent: Mutt/1.5.11 Cc: Subject: Re: Apple bluetooth keyboard/mouse, pairing problems (was: Bluetooth compatibility) X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 22:43:36 -0000 Hi, On Tue, Feb 14, 2006 at 09:28:06AM -0800, Maksim Yevmenkin wrote: >>Does ng_ubt support Bluetooth 1.2 devices? Are USB dongles with Bluetooth >>1.2 >>backwards compatible? I'm considering to buy a D-Link DBT-120 (1.1) or >>DBT-122 (1.2) device. > in general, yes, bluetooth v1.2 devices will work with ng_ubt(4) and > bluetooth stack. i have v1.2 device and it works just fine. keep in mind > that ng_hci.h does not yet have definitions for bluetooth v1.2 hci > commands and events. it does not mean that you can not send these > commands to the device. I bought a D-Link DBT-122, and it works fine with no modifications in FreeBSD 6.0-RELEASE: Feb 14 20:40:05 lappy kernel: ubt0: D-Link DBT-122, rev 1.10/0.01, addr 2 Feb 14 20:40:05 lappy kernel: ubt0: D-Link DBT-122, rev 1.10/0.01, addr 2 Feb 14 20:40:05 lappy kernel: ubt0: Interface 0 endpoints: interrupt=0x81, bulk- in=0x82, bulk-out=0x2 Feb 14 20:40:06 lappy kernel: ubt0: Interface 1 (alt.config 4) endpoints: isoc-i I got it working with an Apple Bluetooth mouse. Thanks to Eric Anderson for posting a recipe. I also looked in the Bluetooth section of the handbook. However, when trying to pair with an Apple Bluetooth Keyboard, I get permission denied: 1) Turn keyboard on. 2) Run hccontrol to see if it is there. Luckily, it is: # hccontrol -n ubt0hci inquiry Inquiry result, num_responses=1 Inquiry result #0 BD_ADDR: akeyb Page Scan Rep. Mode: 0x1 Page Scan Period Mode: 00 Page Scan Mode: 00 Class: 00:25:40 Clock offset: 0x58b9 Inquiry complete. Status: No error [00] Is this what starts the pairing process from the host/USB adapter? If not, how do I do it? I'm supposed to enter the pin code (+enter) in the keyboard here, but it has no pairing button it seems. 3) Try to query it (yes, I have added it to /etc/bluetooth/hosts and /etc/bluetooth/hcsecd.conf): # bthidcontrol -a akeyb query Could not perform SDP query on the device 00:0a:95:38:cf:bb. Permission denied (13) Now, I tried entering the PIN code before and after running hccontrol and bthidcontrol, with a given pin code, with pin codes "0000"/"1234" and nopin (and set write_authentication_enable to 1). But bthidcontrol always gives me either "Permission denied (13)" or "Host is down (64)". How can I get it paired? Does anyone have a Bluetooth keyboard working? Cheers, -- Anders. From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 15 22:58:50 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org 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 393BE16A420; Wed, 15 Feb 2006 22:58:50 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CF3443D49; Wed, 15 Feb 2006 22:58:49 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k1FMwmM17026; Wed, 15 Feb 2006 17:58:48 -0500 Message-ID: <43F3B226.50000@savvis.net> Date: Wed, 15 Feb 2006 14:58:46 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anders Nordby References: <20060214125918.GB51893@totem.fix.no> <43F21326.8000906@savvis.net> <20060215224333.GA15277@totem.fix.no> In-Reply-To: <20060215224333.GA15277@totem.fix.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: Apple bluetooth keyboard/mouse, pairing problems X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 22:58:50 -0000 Anders, >>> Does ng_ubt support Bluetooth 1.2 devices? Are USB dongles with >>> Bluetooth 1.2 backwards compatible? I'm considering to buy a >>> D-Link DBT-120 (1.1) or DBT-122 (1.2) device. >> >> in general, yes, bluetooth v1.2 devices will work with ng_ubt(4) >> and bluetooth stack. i have v1.2 device and it works just fine. >> keep in mind that ng_hci.h does not yet have definitions for >> bluetooth v1.2 hci commands and events. it does not mean that you >> can not send these commands to the device. > > I bought a D-Link DBT-122, and it works fine with no modifications in > FreeBSD 6.0-RELEASE: [...] looks fine to me. > I got it working with an Apple Bluetooth mouse. Thanks to Eric Anderson > for posting a recipe. I also looked in the Bluetooth section of the > handbook. ok > However, when trying to pair with an Apple Bluetooth Keyboard, I get > permission denied: ok. first of all, bluetooth keyboards are NOT yet supported. kbdmux(4) needs to be fixed for that. can someone please help me with fixing it? > 1) Turn keyboard on. > > 2) Run hccontrol to see if it is there. Luckily, it is: > > # hccontrol -n ubt0hci inquiry > Inquiry result, num_responses=1 > Inquiry result #0 > BD_ADDR: akeyb > Page Scan Rep. Mode: 0x1 > Page Scan Period Mode: 00 > Page Scan Mode: 00 > Class: 00:25:40 > Clock offset: 0x58b9 > Inquiry complete. Status: No error [00] looks fine > Is this what starts the pairing process from the host/USB adapter? If > not, how do I do it? I'm supposed to enter the pin code (+enter) in the > keyboard here, but it has no pairing button it seems. no, inquiry *does not* start pair process. you have to make connection to the device otherwise it wont request authentication. you have to follow pairing instructions for your keyboard. > 3) Try to query it (yes, I have added it to /etc/bluetooth/hosts and > /etc/bluetooth/hcsecd.conf): ok, is hcsecd(8) running? it has to be running in order to answer pin code/link key requests. > # bthidcontrol -a akeyb query > Could not perform SDP query on the device 00:0a:95:38:cf:bb. Permission > denied (13) can you please install hcidump from port and try to run it to see what is going on. > Now, I tried entering the PIN code before and after running hccontrol > and bthidcontrol, with a given pin code, with pin codes "0000"/"1234" > and nopin (and set write_authentication_enable to 1). But bthidcontrol > always gives me either "Permission denied (13)" or "Host is down (64)". 1) hcsecd(8) MUST be running at all times 2) hcsecd.conf has to have an entry for the device 3) follow pair instructions that came with the keyboard. it should pair. > How can I get it paired? Does anyone have a Bluetooth keyboard working? read above. but still its not going to work, because there is no working support for multiple keyboards yet (i.e. kbdmux(4)) thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 16 07:47:25 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 2BE5116A420; Thu, 16 Feb 2006 07:47:25 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F2C443D46; Thu, 16 Feb 2006 07:47:24 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5EC58.dip.t-dialin.net [84.165.236.88]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.1/8.13.1) with ESMTP id k1G7Yswa054547; Thu, 16 Feb 2006 08:34:55 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id k1G7lHXQ048690; Thu, 16 Feb 2006 08:47:17 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Thu, 16 Feb 2006 08:47:17 +0100 Message-ID: <20060216084717.yyj986z4ckow4w0w@netchild.homeip.net> X-Priority: 3 (Normal) Date: Thu, 16 Feb 2006 08:47:17 +0100 From: Alexander Leidinger To: Markus Brueffer References: <200602151551.27188.markus@brueffer.de> In-Reply-To: <200602151551.27188.markus@brueffer.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: freebsd-bluetooth@freebsd.org, freebsd-usb@freebsd.org Subject: Re: [Patch] Fix collection entry parsing in libusbhid X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2006 07:47:25 -0000 Markus Brueffer wrote: > Furthermore I have removed the loop in REPORT_SAVED_COLL. If someone > knows why > it was there in the first place, please share your wisdom :) This is done in many places in the source. It's a common way of writting a macro which is usable like a function (yes, this macro returns, so it doesn't _work_ like a function, but this is not the point). Usually this is used with macros which take arguments. You just can add a ';' after the use of the macro without having to remember if you need to do it, or if your compiler may moan because of an empty statement. Have a look into style(9), it also has to say something about it. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ANDROPHOBIA: Fear of men. From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 16 13:00:05 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 6B9FD16A420; Thu, 16 Feb 2006 13:00:05 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from mailout11.sul.t-online.com (mailout11.sul.t-online.com [194.25.134.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58ECD43D49; Thu, 16 Feb 2006 13:00:04 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from fwd27.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1F9ijq-0008Uj-00; Thu, 16 Feb 2006 14:00:02 +0100 Received: from ramses.kicks-ass.net (SaTfB2ZCQeXzk3uSgvf7sKhFaxE64UBV9mXLj35A0076s4-mSKL7wT@[80.143.206.102]) by fwd27.sul.t-online.de with esmtp id 1F9iiY-1HrKcq0; Thu, 16 Feb 2006 13:58:42 +0100 Received: from localhost (dslb-084-061-048-181.pools.arcor-ip.net [84.61.48.181]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ramses.kicks-ass.net (Postfix) with ESMTP id F26EEB833; Thu, 16 Feb 2006 13:58:45 +0100 (CET) From: Markus Brueffer To: Alexander Leidinger Date: Thu, 16 Feb 2006 13:57:48 +0100 User-Agent: KMail/1.9.1 References: <200602151551.27188.markus@brueffer.de> <20060216084717.yyj986z4ckow4w0w@netchild.homeip.net> In-Reply-To: <20060216084717.yyj986z4ckow4w0w@netchild.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1249937.euqofBNrL1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200602161357.54103.markus@brueffer.de> X-ID: SaTfB2ZCQeXzk3uSgvf7sKhFaxE64UBV9mXLj35A0076s4-mSKL7wT@t-dialin.net X-TOI-MSGID: ee67091d-6302-44ad-a539-0d43bb56a1bd Cc: freebsd-bluetooth@freebsd.org, freebsd-usb@freebsd.org Subject: Re: [Patch] Fix collection entry parsing in libusbhid X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2006 13:00:05 -0000 --nextPart1249937.euqofBNrL1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Thursday 16 February 2006 08:47 schrieb Alexander Leidinger: > Markus Brueffer wrote: > > Furthermore I have removed the loop in REPORT_SAVED_COLL. If someone > > knows why > > it was there in the first place, please share your wisdom :) > > This is done in many places in the source. It's a common way of writting a > macro which is usable like a function (yes, this macro returns, so it > doesn't _work_ like a function, but this is not the point). Usually this = is > used with macros which take arguments. You just can add a ';' after the u= se > of the macro without having to remember if you need to do it, or if your > compiler may moan because of an empty statement. > > Have a look into style(9), it also has to say something about it. Ah, I see. Thanks for the explanation. I have updated the diff to not remov= e=20 the loop. Markus =2D-=20 Markus Brueffer =C2=A0 =C2=A0| GPG-Key: http://people.FreeBSD.org/~markus/m= arkus.asc markus@brueffer.de | FP: 3F9B EBE8 F290 E5CC 1447 8760 D48D 1072 78F8 A8D4 markus@FreeBSD.org | FreeBSD: The Power to Serve! --nextPart1249937.euqofBNrL1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBD9HbS1I0Qcnj4qNQRAlckAKCdeI1StIqz0d+WbGY3Sqci21xFlwCgmKai tR9oKVuJNuh//emY4O3mW1s= =HQbF -----END PGP SIGNATURE----- --nextPart1249937.euqofBNrL1-- From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 16 17:34:42 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 858DF16A420 for ; Thu, 16 Feb 2006 17:34:42 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F32C43D45 for ; Thu, 16 Feb 2006 17:34:41 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k1GHYf9a005754; Thu, 16 Feb 2006 11:34:41 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43F4B7AA.5030000@centtech.com> Date: Thu, 16 Feb 2006 11:34:34 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Maksim Yevmenkin References: <43F34314.7030606@centtech.com> <43F3688B.8060700@savvis.net> In-Reply-To: <43F3688B.8060700@savvis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1290/Thu Feb 16 03:14:53 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-bluetooth@freebsd.org Subject: Re: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2006 17:34:42 -0000 Maksim Yevmenkin wrote: > Eric, > >> I saw a recent commit regarding bluetooth mouse battery status: >> >> markus 2006-02-10 19:54:17 UTC >> >> FreeBSD src repository (ports committer) >> >> Modified files: >> usr.sbin/bluetooth/bthidcontrol sdp.c Log: >> - Fix attribute id of HIDBatteryPower >> - Fix two typos in comments >> >> Approved by: emax >> >> Revision Changes Path >> 1.2 +5 -5 src/usr.sbin/bluetooth/bthidcontrol/sdp.c >> >> >> That's for -current, but I'm running 6.1-PRERELEASE (fyi). >> >> Is there a way to find the current battery power on a bluetooth >> mouse? Here's a bthidcontrol dump of my Logitech mx900: > > with this patch bthidd(8) should properly detect battery operated > devices. that is one piece of the puzzle > > another piece is that the device should send hid report about its > battery status, i.e. bthidd(8) will use syslog(3) facility to log such > events. > > bthidd(8) understand battery report if page is HUP_MICROSOFT and usage > is 0xfe01 (please see /usr/src/usr.sbin/bluetooth/bthidd/hid.c for > details). > > i do not see page == microsoft and usage == 0xfe01 in the hid > descriptor you have posted. so it seems like your mouse will not send > battery report. Ahh - so only MS mice send the output, or that's just a Microsoft add-in that others use too? I have a microsoft bluetooth mouse at home that I'll try to get the info from. I wonder where the right place to report the battery information is? Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-bluetooth@FreeBSD.ORG Fri Feb 17 01:10:58 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 0D3B016A420 for ; Fri, 17 Feb 2006 01:10:57 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9858F43D45 for ; Fri, 17 Feb 2006 01:10:57 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k1H1AtM20606; Thu, 16 Feb 2006 20:10:55 -0500 Message-ID: <43F5229C.8050106@savvis.net> Date: Thu, 16 Feb 2006 17:10:52 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <43F34314.7030606@centtech.com> <43F3688B.8060700@savvis.net> <43F4B7AA.5030000@centtech.com> In-Reply-To: <43F4B7AA.5030000@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 01:10:58 -0000 Eric, >>> Is there a way to find the current battery power on a bluetooth >>> mouse? Here's a bthidcontrol dump of my Logitech mx900: >> >> with this patch bthidd(8) should properly detect battery operated >> devices. that is one piece of the puzzle >> >> another piece is that the device should send hid report about its >> battery status, i.e. bthidd(8) will use syslog(3) facility to log such >> events. >> >> bthidd(8) understand battery report if page is HUP_MICROSOFT and usage >> is 0xfe01 (please see /usr/src/usr.sbin/bluetooth/bthidd/hid.c for >> details). >> >> i do not see page == microsoft and usage == 0xfe01 in the hid >> descriptor you have posted. so it seems like your mouse will not send >> battery report. > > Ahh - so only MS mice send the output, or that's just a Microsoft add-in > that others use too? do not know. this code in bthidd(8) was written by looking at msdn docs (i think). > I have a microsoft bluetooth mouse at home that I'll try to get the info > from. ok. let us know about the results. > I wonder where the right place to report the battery information is? like i said, right now it goes to /var/log/messages. info, notice and warning levels are used for different battery states (ok, low, very low). if this is not the right place, please let me know where do you want it to be? thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Feb 17 13:37:12 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 35F8C16A420 for ; Fri, 17 Feb 2006 13:37:12 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5E6043D45 for ; Fri, 17 Feb 2006 13:37:11 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k1HDbAKd026693; Fri, 17 Feb 2006 07:37:10 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43F5D186.7060302@centtech.com> Date: Fri, 17 Feb 2006 07:37:10 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Maksim Yevmenkin References: <43F34314.7030606@centtech.com> <43F3688B.8060700@savvis.net> <43F4B7AA.5030000@centtech.com> <43F5229C.8050106@savvis.net> In-Reply-To: <43F5229C.8050106@savvis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1292/Fri Feb 17 03:39:02 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-bluetooth@freebsd.org Subject: Re: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 13:37:12 -0000 Maksim Yevmenkin wrote: > Eric, > >>>> Is there a way to find the current battery power on a bluetooth >>>> mouse? Here's a bthidcontrol dump of my Logitech mx900: >>> >>> with this patch bthidd(8) should properly detect battery operated >>> devices. that is one piece of the puzzle >>> >>> another piece is that the device should send hid report about its >>> battery status, i.e. bthidd(8) will use syslog(3) facility to log >>> such events. >>> >>> bthidd(8) understand battery report if page is HUP_MICROSOFT and >>> usage is 0xfe01 (please see /usr/src/usr.sbin/bluetooth/bthidd/hid.c >>> for details). >>> >>> i do not see page == microsoft and usage == 0xfe01 in the hid >>> descriptor you have posted. so it seems like your mouse will not >>> send battery report. >> >> Ahh - so only MS mice send the output, or that's just a Microsoft >> add-in that others use too? > > do not know. this code in bthidd(8) was written by looking at msdn > docs (i think). > >> I have a microsoft bluetooth mouse at home that I'll try to get the >> info from. > > ok. let us know about the results. Here's a bthidcontrol dump from a microsoft mouse: Collection page=Generic_Desktop usage=Mouse Collection page=Generic_Desktop usage=Pointer Input id=2 size=1 count=1 page=Button usage=Button_1 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_2 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_3 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_4 Variable, logical range 0..1 Input id=2 size=1 count=1 page=Button usage=Button_5 Variable, logical range 0..1 Input id=2 size=3 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1 Input id=2 size=8 count=1 page=Generic_Desktop usage=X Variable Relative, logical range -127..127 Input id=2 size=8 count=1 page=Generic_Desktop usage=Y Variable Relative, logical range -127..127 Input id=2 size=8 count=1 page=Generic_Desktop usage=Wheel Variable Relative, logical range -127..127 Input id=2 size=8 count=1 page=Consumer usage=AC_Pan Variable Relative, logical range -127..127 End collection Feature id=2 size=1 count=1 page=Generic_Desktop usage=0x004b Variable, logical range 0..1 Feature id=2 size=7 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1 End collection Collection page=Consumer usage=Consumer_Control Collection page=Generic_Desktop usage=Mouse Input id=3 size=2 count=1 page=Microsoft usage=0xfe01 Variable, logical range 0..3 Input id=3 size=1 count=1 page=Microsoft usage=0xfe00 Variable, logical range 0..1 Input id=3 size=5 count=1 page=0x0000 usage=0x0000 Const, logical range 0..1 End collection End collection Collection page=Consumer usage=Consumer_Control Collection page=Generic_Desktop usage=Mouse Input id=4 size=8 count=1 page=Consumer usage=AC_Pan Variable Relative, logical range -127..127 Feature id=4 size=1 count=1 page=Microsoft usage=0xff04 Variable, logical range 0..1 Feature id=4 size=1 count=1 page=Microsoft usage=0xff06 Variable, logical range 0..1 Feature id=4 size=1 count=6 page=0x0000 usage=0x0000 Const, logical range 0..1 End collection End collection I also noticed that a query shows this line: battery_power true; What is that telling me? That it is currently on battery power? I suppose if that's the case, then some devices may report false for AC power and true for battery.. >> I wonder where the right place to report the battery information is? > > like i said, right now it goes to /var/log/messages. info, notice and > warning levels are used for different battery states (ok, low, very > low). if this is not the right place, please let me know where do you > want it to be? > > thanks, > max I suppose if one wanted to make a tool to monitor the mouse battery (say, for an X window manager), you could poll/parse the output of bthidcontrol, right? Is there a better way to grab the info (a bthid library or something)? Sorry if this is a trivial question - I'm not a bluetooth hacker :) Thanks! Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-bluetooth@FreeBSD.ORG Fri Feb 17 17:40:26 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 0852316A420 for ; Fri, 17 Feb 2006 17:40:26 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EFF543D58 for ; Fri, 17 Feb 2006 17:40:23 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k1HHeHM10199; Fri, 17 Feb 2006 12:40:17 -0500 Message-ID: <43F60A7B.2090206@savvis.net> Date: Fri, 17 Feb 2006 09:40:11 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <43F34314.7030606@centtech.com> <43F3688B.8060700@savvis.net> <43F4B7AA.5030000@centtech.com> <43F5229C.8050106@savvis.net> <43F5D186.7060302@centtech.com> In-Reply-To: <43F5D186.7060302@centtech.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 17:40:26 -0000 Eric Anderson wrote: [...] >> do not know. this code in bthidd(8) was written by looking at msdn >> docs (i think). >> >>> I have a microsoft bluetooth mouse at home that I'll try to get the >>> info from. >> >> ok. let us know about the results. > > Here's a bthidcontrol dump from a microsoft mouse: [...] > Collection page=Consumer usage=Consumer_Control > Collection page=Generic_Desktop usage=Mouse > Input id=3 size=2 count=1 page=Microsoft usage=0xfe01 Variable, > logical range 0..3 > Input id=3 size=1 count=1 page=Microsoft usage=0xfe00 Variable, > logical range 0..1 > Input id=3 size=5 count=1 page=0x0000 usage=0x0000 Const, logical > range 0..1 > End collection > End collection as you can see there is an input hid report, page == "Microsoft usage", usage == 0xfe01 and range 0..3. this looks like "battery report". i do not know what 0xfe00 report is > Collection page=Consumer usage=Consumer_Control > Collection page=Generic_Desktop usage=Mouse > Input id=4 size=8 count=1 page=Consumer usage=AC_Pan Variable > Relative, logical range -127..127 > Feature id=4 size=1 count=1 page=Microsoft usage=0xff04 Variable, > logical range 0..1 > Feature id=4 size=1 count=1 page=Microsoft usage=0xff06 Variable, > logical range 0..1 > Feature id=4 size=1 count=6 page=0x0000 usage=0x0000 Const, logical > range 0..1 > End collection > End collection i'm not sure what these are > I also noticed that a query shows this line: > > battery_power true; > > What is that telling me? That it is currently on battery power? I > suppose if that's the case, then some devices may report false for AC > power and true for battery.. no, its telling you that device uses battery as its power source. this information comes from the sdp record. usually, it only needs to pulled once during connection establishment. >>> I wonder where the right place to report the battery information is? >> >> like i said, right now it goes to /var/log/messages. info, notice and >> warning levels are used for different battery states (ok, low, very >> low). if this is not the right place, please let me know where do you >> want it to be? > > I suppose if one wanted to make a tool to monitor the mouse battery > (say, for an X window manager), you could poll/parse the output of > bthidcontrol, right? Is there a better way to grab the info (a bthid > library or something)? Sorry if this is a trivial question - I'm not a > bluetooth hacker :) not quite. "battery report" is an input report, i.e. mouse should send it periodically. bhtidd(8) already parses it. the question is what should it do with this information? right now it just logs it. it could send another message to another application (i.e. mouse battery monitoring tool) so it can do whatever is required. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Feb 17 19:25:10 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 21E9E16A422 for ; Fri, 17 Feb 2006 19:25:10 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A4B343D48 for ; Fri, 17 Feb 2006 19:25:08 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k1HJP7xN033546; Fri, 17 Feb 2006 13:25:08 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43F62314.1070101@centtech.com> Date: Fri, 17 Feb 2006 13:25:08 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Maksim Yevmenkin References: <43F34314.7030606@centtech.com> <43F3688B.8060700@savvis.net> <43F4B7AA.5030000@centtech.com> <43F5229C.8050106@savvis.net> <43F5D186.7060302@centtech.com> <43F60A7B.2090206@savvis.net> In-Reply-To: <43F60A7B.2090206@savvis.net> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1292/Fri Feb 17 03:39:02 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-bluetooth@freebsd.org Subject: Re: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 19:25:10 -0000 Maksim Yevmenkin wrote: > Eric Anderson wrote: > > [...] >> Collection page=Consumer usage=Consumer_Control >> Collection page=Generic_Desktop usage=Mouse >> Input id=3 size=2 count=1 page=Microsoft usage=0xfe01 Variable, >> logical range 0..3 >> Input id=3 size=1 count=1 page=Microsoft usage=0xfe00 Variable, >> logical range 0..1 >> Input id=3 size=5 count=1 page=0x0000 usage=0x0000 Const, logical >> range 0..1 >> End collection >> End collection > > as you can see there is an input hid report, page == "Microsoft > usage", usage == 0xfe01 and range 0..3. this looks like "battery report". > I see - thanks for clarifying.. >>>> I wonder where the right place to report the battery information is? >>> >>> like i said, right now it goes to /var/log/messages. info, notice >>> and warning levels are used for different battery states (ok, low, >>> very low). if this is not the right place, please let me know where >>> do you want it to be? >> >> I suppose if one wanted to make a tool to monitor the mouse battery >> (say, for an X window manager), you could poll/parse the output of >> bthidcontrol, right? Is there a better way to grab the info (a bthid >> library or something)? Sorry if this is a trivial question - I'm >> not a bluetooth hacker :) > > not quite. "battery report" is an input report, i.e. mouse should send > it periodically. bhtidd(8) already parses it. the question is what > should it do with this information? right now it just logs it. it > could send another message to another application (i.e. mouse battery > monitoring tool) so it can do whatever is required. I think either a sysctl entry that shows the value (0 - 3) would be nice. I guess ng_hci would create it? Then bthidd would just change the sysctl value when it gets the report from the mouse.. ? Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-bluetooth@FreeBSD.ORG Fri Feb 17 21:53:14 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org 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 5D6E416A422 for ; Fri, 17 Feb 2006 21:53:14 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03E6143D91 for ; Fri, 17 Feb 2006 21:53:03 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k1HLr1M16029; Fri, 17 Feb 2006 16:53:02 -0500 Message-ID: <43F645BB.4070008@savvis.net> Date: Fri, 17 Feb 2006 13:52:59 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <43F34314.7030606@centtech.com> <43F3688B.8060700@savvis.net> <43F4B7AA.5030000@centtech.com> <43F5229C.8050106@savvis.net> <43F5D186.7060302@centtech.com> <43F60A7B.2090206@savvis.net> <43F62314.1070101@centtech.com> In-Reply-To: <43F62314.1070101@centtech.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: mouse battery status? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 21:53:14 -0000 Eric Anderson wrote: [...] >>>>> I wonder where the right place to report the battery information is? >>>> >>>> like i said, right now it goes to /var/log/messages. info, notice >>>> and warning levels are used for different battery states (ok, low, >>>> very low). if this is not the right place, please let me know where >>>> do you want it to be? >>> >>> I suppose if one wanted to make a tool to monitor the mouse battery >>> (say, for an X window manager), you could poll/parse the output of >>> bthidcontrol, right? Is there a better way to grab the info (a bthid >>> library or something)? Sorry if this is a trivial question - I'm >>> not a bluetooth hacker :) >> >> not quite. "battery report" is an input report, i.e. mouse should send >> it periodically. bhtidd(8) already parses it. the question is what >> should it do with this information? right now it just logs it. it >> could send another message to another application (i.e. mouse battery >> monitoring tool) so it can do whatever is required. > > I think either a sysctl entry that shows the value (0 - 3) would be > nice. I guess ng_hci would create it? Then bthidd would just change > the sysctl value when it gets the report from the mouse.. ? sysctl sounds like a good idea, but i'm not sure who would create such sysctl. it most definitely does not belong at bluetooth hci, l2cap, rfcomm and even socket layer. this information is strictly for hid. so, i think, syslog is the best place for it right now. it is possible to divert these messages into another file and have monitoring tool look/parse the file periodically. thanks, max