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. ------------------------------------------------------------------------