UPower 0.9.21

Julien Danjou julien at danjou.info
Wed Aug 28 03:57:02 PDT 2013


On Wed, Aug 28 2013, Peter Wu wrote:

> On Tuesday 27 August 2013 23:08:07 Julien Danjou wrote:
>> >> I still the light meter I had implemented back then (don't know why it's
>> > 
>> > "light meter"? You mean the current lux value? Where should it be
>> > visible?
>> 
>> Yes, that's what I meant. My initial patch (git log) implemented it.
>
> So I looked at this and had one question, when is the BattLightMeasureEvent 
> sent? A second after SetLightMeasure or while SetLightMeasure is executing 
> (there is no reply yet).
>
> Can you generate a usbmon/hidraw trace using the 'read-dev-usbmon' script in 
> the ltunify repo? There is also a 'shell' script which provides a convenience 
> function for writing to a hidraw device.

FWIW, this is the trace when I start upowerd with your patches:

12:48:49.467 Send	report_id=10 short device=01 DEV1 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:49.504 Recv	report_id=10 short device=01 DEV1 type=8F _ERROR_MSG              SubID=00 _HIDPP20  reg=10   err=01 INVALID_SUBID  
12:48:49.504 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=20 00 00 
12:48:49.506 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=20 07 08 10  1B 04 00 02  06 00 00 00  00 00 00 00 
12:48:49.506 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=40 00 00 
12:48:49.508 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=40 04 4D 37  30 35 00 00  00 00 00 00  00 00 00 00 
12:48:49.508 Send	report_id=10 short device=01 DEV1 type=81 GET_REG                 reg=0D   params=00 00 00 
12:48:49.582 Recv	report_id=20 unkn  device=02 DEV2 type=01 KEYBOARD                params=01 4B 00 00  00 00 00 00  00 00 00 00 
12:48:49.606 Recv	report_id=10 short device=01 DEV1 type=81 GET_REG                 reg=0D   params=28 47 34 
12:48:49.606 Send	report_id=10 short device=01 DEV1 type=81 GET_REG                 reg=0D   params=00 00 00 
12:48:49.642 Recv	report_id=20 unkn  device=02 DEV2 type=01 KEYBOARD                params=01 00 00 00  00 00 00 00  00 00 00 00 
12:48:49.708 Recv	report_id=10 short device=01 DEV1 type=81 GET_REG                 reg=0D   params=28 47 34 
12:48:49.739 Send	report_id=10 short device=02 DEV2 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:49.782 Recv	report_id=11 long  device=02 DEV2 type=00 _HIDPP20                func=1  swId=0  params=02 00 42 00  00 00 00 00  00 00 00 00  00 00 00 00 
12:48:49.782 Send	report_id=10 short device=02 DEV2 type=00 _HIDPP20                func=0  swId=0  params=10 00 00 
12:48:49.824 Recv	report_id=11 long  device=02 DEV2 type=00 _HIDPP20                func=0  swId=0  params=00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 
12:48:49.824 Send	report_id=10 short device=02 DEV2 type=00 _HIDPP20                func=0  swId=0  params=43 01 00 
12:48:49.864 Recv	report_id=11 long  device=02 DEV2 type=00 _HIDPP20                func=0  swId=0  params=09 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00 
12:48:49.864 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=21 00 00 
12:48:49.866 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=21 08 14 40  02 04 00 01  07 00 00 00  00 00 00 00 
12:48:49.866 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=41 00 00 
12:48:49.868 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=41 04 4B 37  35 30 00 00  00 00 00 00  00 00 00 00 
12:48:49.868 Send	report_id=10 short device=02 DEV2 type=09                         params=00 01 01 00 
12:48:49.904 Recv	report_id=11 long  device=02 DEV2 type=09                         params=00 01 01 00  00 00 00 00  00 00 00 00  00 00 00 00  00 
12:48:49.905 Send	report_id=10 short device=02 DEV2 type=09                         params=00 01 01 00 
12:48:49.944 Recv	report_id=11 long  device=02 DEV2 type=09                         params=00 01 01 00  00 00 00 00  00 00 00 00  00 00 00 00  00 
12:48:49.975 Send	report_id=10 short device=03 DEV3 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:49.978 Recv	report_id=10 short device=03 DEV3 type=8F _ERROR_MSG              SubID=00 _HIDPP20  reg=10   err=09 RESOURCE_ERROR  
12:48:49.978 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=22 00 00 
12:48:49.980 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=22 09 08 40  09 04 00 02  0C 00 00 00  00 00 00 00 
12:48:49.980 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=42 00 00 
12:48:49.982 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=42 09 4D 33  31 35 2F 4D  32 33 35 00  00 00 00 00 
12:48:49.982 Send	report_id=10 short device=03 DEV3 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:49.984 Recv	report_id=10 short device=03 DEV3 type=8F _ERROR_MSG              SubID=00 _HIDPP20  reg=10   err=09 RESOURCE_ERROR  
12:48:49.984 Send	report_id=10 short device=03 DEV3 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:49.986 Recv	report_id=10 short device=03 DEV3 type=8F _ERROR_MSG              SubID=00 _HIDPP20  reg=10   err=09 RESOURCE_ERROR  
12:48:50.017 Send	report_id=10 short device=04 DEV4 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:50.020 Recv	report_id=10 short device=04 DEV4 type=8F _ERROR_MSG              SubID=00 _HIDPP20  reg=10   err=09 RESOURCE_ERROR  
12:48:50.020 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=23 00 00 
12:48:50.022 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=23 0A 08 41  01 04 00 09  06 00 00 00  00 00 00 00 
12:48:50.022 Send	report_id=10 short device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=43 00 00 
12:48:50.024 Recv	report_id=11 long  device=FF RECV type=83 GET_LONG_REG            reg=B5 PAIRING_INFO  params=43 04 54 36  35 30 20 A5  00 00 00 00  00 00 00 00 
12:48:50.024 Send	report_id=10 short device=04 DEV4 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:50.026 Recv	report_id=10 short device=04 DEV4 type=8F _ERROR_MSG              SubID=00 _HIDPP20  reg=10   err=09 RESOURCE_ERROR  
12:48:50.026 Send	report_id=10 short device=04 DEV4 type=00 _HIDPP20                func=1  swId=0  params=00 00 42 
12:48:50.028 Recv	report_id=10 short device=04 DEV4 type=8F _ERROR_MSG              SubID=00 _HIDPP20  reg=10   err=09 RESOURCE_ERROR  
12:48:50.508 Recv	report_id=11 long  device=02 DEV2 type=09                         params=10 35 01 37  06 17 47 4F  4F 44 00 00  00 00 00 00  00 


> ./usbmon-setperms
> ./read-dev-usbmon /dev/usbmon2 # '2' is USB bus displayed above
>
> ./shell hidw 10 02 06  0f  01 01

Running./shell hidw /dev/usbmon2 10 02 06  0f  01 01
(tried with all usbmon anyway)

I keep getting:

+ echo 10 02 06 0f 01 01 00
+ xxd -ps -r
xxd: Invalid argument
+ return

The write() return -EINVAL. Any idea?

-- 
Julien Danjou
// Free Software hacker / independent consultant
// http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20130828/6d011bb5/attachment.pgp>


More information about the devkit-devel mailing list