"light" channel not working in hid-sensor-hub

Started by Bastien Nocera on Jan 18, 2021 · 2 messages from 1 author · Last reply Jan 20, 2021

open the first message on its own page

Message details and related content
Hey,

It seems that the "light" channel that's available in hid-sensor-hub
stopped working quite some time ago. I've tested this on a ColorHug ALS
light sensor, as well as on the light sensor part of the HID sensor hub
on a Surface 3.

The accelerometer and the gyro work fine on the Surface 3, but the
light sensor only ever returns zeros when iio-sensor-proxy or the
iio_generic_buffer tools are used:

$ sudo iio_generic_buffer -A -N 0
iio device number being used is 0
iio trigger number being used is 0
Enabling all channels
Enabling: in_intensity_both_en
Enabling: in_illuminance_en
/sys/bus/iio/devices/iio:device0 als-dev0
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
0.000000 0.000000 
Disabling: in_intensity_both_en
Disabling: in_illuminance_en

I believe this has been broken for at least a year. Does anyone know
what the problem could be, or how to get started debugging the
problem? 

I'll probably try checking whether the problem is with the user-space
parsing of the data, rather than the kernel driver.

Cheers
Message details and related content
On Mon, 2021-01-18 at 21:06 +0100, Bastien Nocera wrote:
Hey,

It seems that the "light" channel that's available in hid-sensor-hub
stopped working quite some time ago. I've tested this on a ColorHug
ALS
light sensor, as well as on the light sensor part of the HID sensor
hub
on a Surface 3.
Using hid-recorder on the ColorHugALS device, after unloading the hid-
sensor-hub code after the device isn't outputting any useful data:
D: 0
R: 269 05 20 09 01 a1 01 09 41 a1 00 85 01 0a 09 03 15 00 25 01 75 08
95 01 a1 02 0a 31 08 0a 32 08 b1 00 c0 0a 16 03 15 00 25 02 a1 02 0a 40
08 0a 41 08 0a 42 08 b1 00 c0 0a 19 03 15 00 25 02 a1 02 0a 50 08 0a 51
08 0a 52 08 b1 00 c0 0a 01 02 15 00 25 06 a1 02 0a 00 08 0a 01 08 0a 02
08 0a 03 08 0a 04 08 0a 05 08 0a 06 08 b1 00 c0 0a 0e 03 15 00 27 ff ff
ff ff 75 20 55 00 b1 02 05 20 0a 01 02 15 00 25 05 75 08 95 01 a1 02 0a
00 08 0a 01 08 0a 02 08 0a 03 08 0a 05 08 0a 06 08 81 00 c0 0a 02 02 15
00 25 04 a1 02 0a 10 08 0a 11 08 0a 12 08 0a 13 08 0a 14 08 81 00 c0 0a
d1 04 15 00 26 ff ff 75 20 55 0e 81 02 06 c0 ff 09 02 a1 01 85 02 09 01
09 0d 09 03 95 03 b1 22 09 05 75 10 95 01 b1 22 c0 09 03 a1 01 85 03 09
30 75 08 95 01 b1 22 09 07 75 30 95 01 b1 22 09 0b 75 20 b1 22 09 24 09
28 75 08 95 02 c0 c0 c0
N: Hughski Ltd. ColorHugALS
P: usb-0000:00:14.0-10/input0
I: 3 273f 1008
D: 0
E: 0.000001 7 01 01 03 00 00 00 00
E: 0.663922 7 01 01 03 00 00 00 00
E: 1.327952 7 01 01 03 00 00 00 00
E: 1.991027 7 01 01 03 00 00 00 00
E: 2.654949 7 01 01 03 00 00 00 00
E: 3.318928 7 01 01 03 00 00 00 00
E: 3.982937 7 01 01 03 00 00 00 00
etc.

So it's possible that, in this case, the problem lies in the HID core.

Cheers
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help