Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Apr 2006 23:24:46 -0500
From:      Eric Anderson <anderson@centtech.com>
To:        Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: mouse battery status?
Message-ID:  <4434980E.8050202@centtech.com>
In-Reply-To: <43F645BB.4070008@savvis.net>
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> <43F645BB.4070008@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Maksim Yevmenkin wrote:
> 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.

What about a simple tiny kernel module that can maintain these and other 
tweaks related to bluetooth?  Like a btmon.ko?

Eric



-- 
------------------------------------------------------------------------
Eric Anderson        Sr. Systems Administrator        Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4434980E.8050202>