Hi everyone,
I'm a bit of a noob in Embedded Linux development. I just got an iMX6UL Evaluation Kit and succeeded to build a working Yocto Project image (core-image-minimal based, with some development packages added, as evtest).
I would like to retrieve (from an user-space console for the moment) events from the FXLS8471 Accelerometer and MAG3110 Magnetometer I2C devices already populated and configured (I looked in the imx6ulevk device tree).
I then launched evtest where I could see that /dev/input/event2 and /dev/input/event3 refer respectively to the accelerometer and magnetometer, but they return no event when I read them.
I suppose that we should configure them to provide interrupts at a fixed rate, but I could not figure where I should be looking.
Could someone help me with this ?
Thanks a lot in advance.
Arnaud N. (France)
Solved! Go to Solution.
Hi Arnaud
for sensor test one can look at unit tests :
imx-test package ../mxc_sensor_test/acctest.c
http://patches.openembedded.org/patch/103551/
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Arnaud
for sensor test one can look at unit tests :
imx-test package ../mxc_sensor_test/acctest.c
http://patches.openembedded.org/patch/103551/
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks to your answer, I managed to get the magnetometer working. Still seeking to enable the accelerometer input.
For the magnetometer, I used :
echo 1 > /sys/devices/virtual/input/input3/enable
Then I could watch for events with :
evtest /dev/input/event3
But "/sys/devices/virtual/input/input2/enable" does not exist for Accelerometer... I will find another way to get it working !
Thanks again
Arnaud.