Re: Apple Bluetooth devices: Battery level?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jiri,

> > Sorry, I posted a parsed version of the report descriptor previously
> > though I failed to cross post:
> > 
> > Collection page=Generic_Desktop usage=Mouse
> >   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=4 count=1 page=0x0000 usage=0x0000 Const Variable, logical range 0..1
> > Collection page=Generic_Desktop usage=Pointer
> >   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=Consumer usage=AC_Pan Variable Relative, logical range -127..127
> >   Input id=2 size=8 count=1 page=Generic_Desktop usage=Wheel Variable Relative, logical range -127..127
> > End collection
> >   Input id=2 size=8 count=1 page=0x00ff usage=0x00c0 Variable, logical range -127..127
> > Feature id=71 size=8 count=1 page=Device_Controls usage=Battery_Strength Variable NoPref Volatile, logical range 0..100
> > End collection
> > As you can see, there is a Feature report relating to the Battery 
> > Strength, but I do not know what to do with that. I suppose that it is 
> > to be polled in order to return a percentage value..
> 
> Yes, it has to be polled. But at least the initial value should be 
> retrieved during the very initialization of the device -- both USB and 
> Bluetooth implementations this in usbhid_init_reports()/hidp_start() -- 
> they query INPUT and FEATURE reports during device initialization.

since the descriptors are the same, can we not do this inside the HID
core with a specific quirk setting. And maybe even a timer that polls it
every 30 minutes or so.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux