Re: Resource Temporarily Unavailable error when trying to read from the accelerator on a ThinkPad twist

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

 



Hello Reyad!

I've preformed the steps to enable the scan elements and the buffer,
and when using `cat` on the character device I got some gibberish
(looked like ���� /���).

Here's the dmeg output: https://elad.fedorapeople.org/iio-debug/dmesg.txt
and here's the rdesc file: https://elad.fedorapeople.org/iio-debug/rdesc.txt

Furthermore, after preforming these steps, I tried to read the _raw files,
[root@rincewind iio:device3]# cat in_accel_*raw
-27
56
-974

According to the developer of iio-sensor-proxy the numbers should
always be lower than 400, and as you can see one of the raw values is
974

It seems that iio-sensor-proxy is getting EAGAIN when trying to read
the data, but I can still cat the raw files.
Examining the iio-sensor-proxy output it seems that it manages to read
the sensor data ONCE and then gets EAGAIN in all the following read
attempts.

** (process:2889): DEBUG: Found accel_3d at
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/0003:0483:91D1.0003/HID-SENSOR-200073.1.auto/iio:device3
** (process:2889): DEBUG: Found associated trigger at
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/0003:0483:91D1.0003/HID-SENSOR-200073.1.auto/trigger3
** (process:2889): DEBUG: Got type for in_accel_x: is signed: 1,
bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:2889): DEBUG: Got type for in_accel_y: is signed: 1,
bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:2889): DEBUG: Got type for in_accel_z: is signed: 1,
bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:2889): DEBUG: Built channel array for in_accel_x: is
signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:2889): DEBUG: Built channel array for in_accel_y: is
signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:2889): DEBUG: Built channel array for in_accel_z: is
signed: 1, bytes: 4, bits_used: 32, shift: 0, mask: 0x0, be: 0
** (process:2889): DEBUG: Read from IIO: 18, -51, -976
** (process:2889): DEBUG: Found orientation: undefined, prev:undefined

** (process:2889): WARNING **: Couldn't read from device: Resource
temporarily unavailable
** (process:2889): DEBUG: Found orientation: undefined, prev:undefined

** (process:2889): WARNING **: Couldn't read from device: Resource
temporarily unavailable
** (process:2889): DEBUG: Found orientation: undefined, prev:undefined
^C


While trying to figure out what's going on, I tried to `cat` the _raw
files while iio-sensor-proxy was running, and I noticed that every
time I `cat` them, iio-sensor-proxy can read the data too!

So, we have two issues here:
1) The numbers returned from the raw file are "weird", as
iio-sensor-proxy expects them to be under 400
2) When iio-sensor-proxy is running it can't read the data until I
manually read the _raw files in a different terminal window, upon
which iio-sensor-proxy suddenly gets the data too.

I hope this helps debug the issue.

Do you think it's a driver problem, or is it iio-sensor-proxy doing
something wrong?

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux