st-mems-android-linux-sensors-hal icon indicating copy to clipboard operation
st-mems-android-linux-sensors-hal copied to clipboard

TYPE_ACCELEROMETER - Doesn't stream any data on Android 13 + HIDL 2.0

Open jptcarreira opened this issue 1 year ago • 0 comments

Hello, Hi installed the evaluation board STEVAL-MKI217V1 in a custom android board. After all configurations, I can read some sensors data from Android SENSOR_SERVICE, but not all that I'm looking for.

This is a list of some sensors that I read correctly: TYPE_GYROSCOPE TYPE_GYROSCOPE_UNCALIBRATED TYPE_MAGNETIC_FIELD TYPE_MAGNETIC_FIELD_UNCALIBRATED (...)

My issue is with TYPE_ACCELEROMETER, I can read TYPE_ACCELEROMETER_UNCALIBRATED bot not TYPE_ACCELEROMETER.

There are as well other sensor data that i'm interested, but it just return zeros. The sensors are TYPE_ROTATION_VECTOR and TYPE_GAME_ROTATION_VECTOR. I suspect this is because the missing ACCELEROMETER data.

Any clue what I miss?

Log from logcat:

01-01 00:00:43.510 3435 3435 I stm-sensors: gyroscope rotation matrix: 1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000 01-01 00:00:43.510 3435 3435 I stm-sensors: magnetometer rotation matrix: 1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000 01-01 00:00:43.511 3435 3435 I stm-sensors: accelerometer rotation matrix: 1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000 01-01 00:00:43.511 3435 3435 I stm-sensors: gyroscope placement: 0.000000, 0.000000, 0.000000 01-01 00:00:43.511 3435 3435 I stm-sensors: magnetometer placement: 0.000000, 0.000000, 0.000000 01-01 00:00:43.511 3435 3435 I stm-sensors: pressure placement: 0.000000, 0.000000, 0.000000 01-01 00:00:43.511 3435 3435 I stm-sensors: accelerometer placement: 10.000000, 20.000000, 30.000000 01-01 00:00:43.512 3435 3435 D stm-sensors: found 11 IIO devices available under /sys/bus/iio/devices 01-01 00:00:43.523 3435 3435 D stm-sensors: lsm6dsox_mlc: IIO device not supported by sensorHAL 01-01 00:00:43.524 3435 3435 E stm-sensors: lsm6dsox_sign_motion: failed to disable sensor. 01-01 00:00:43.530 3435 3435 D stm-sensors: lsm6dsox_temp: IIO device not supported by sensorHAL 01-01 00:00:43.542 3435 3435 D stm-sensors: lsm6dsox_mlc_0: IIO device not supported by sensorHAL 01-01 00:00:43.542 3435 3435 D stm-sensors: lsm6dsox_tilt: IIO device not supported by sensorHAL 01-01 00:00:43.542 3435 3435 D stm-sensors: meson-g12a-saradc: IIO device not supported by sensorHAL 01-01 00:00:43.543 3435 3435 E stm-sensors: lsm6dsox_step_d: failed to disable sensor. 01-01 00:00:43.543 3435 3435 D stm-sensors: LSM6DSOX Magnetometer Sensor: injection mode not available 01-01 00:00:43.543 3435 3435 I stm-sensors: magn calibration library: stm-magn-lib-mock 01-01 00:00:43.544 3435 3435 D stm-sensors: LSM6DSOX Accelerometer Sensor: injection mode not available 01-01 00:00:43.544 3435 3435 I stm-sensors: accel calibration library: stm-accel-lib-mock 01-01 00:00:43.545 3435 3435 D stm-sensors: LSM6DSOX Step Counter Sensor: injection mode not available 01-01 00:00:43.545 3435 3435 D stm-sensors: LSM6DSOX Gyroscope Sensor: injection mode not available 01-01 00:00:43.545 3435 3435 I stm-sensors: gyro calibration library: stm-gyro-lib-mock 01-01 00:00:43.546 3435 3435 I stm-sensors: sensors fusion (6X) library: stm-sensors-fusion-6X-lib-mock 01-01 00:00:43.546 3435 3435 I stm-sensors: sensors fusion (9X) library: stm-sensors-fusion-9X-lib-mock 01-01 00:00:43.567 3435 3435 E stm-sensors: selftest functions cannot be loaded correctly 01-01 00:00:43.567 3435 3435 D stm-sensors: 12 sensors available and ready 01-01 00:00:43.568 3435 3435 I stm-sensors: timesync library: stm-timesync-lib-mock 01-01 00:00:43.570 3435 3435 W stm-sensors: failed to load gyro bias 01-01 00:00:43.570 3435 3435 W stm-sensors: failed to load accel bias 01-01 00:00:43.570 3435 3435 E stm-sensors: failed to load magn bias 09-02 14:31:01.504 3435 3435 D stm-sensors: LSM6DSOX Accelerometer Sensor: changed pollrate to 5.000000Hz, timeout=1500ms 09-02 14:31:01.504 3435 3435 D stm-sensors: LSM6DSOX Accelerometer Sensor: power-on 09-02 14:31:02.192 3435 3785 W stm-sensors: cannot process 64bit channel 09-02 14:31:02.192 3435 3785 W stm-sensors: cannot process 64bit channel

Thanks, João

jptcarreira avatar Sep 02 '24 20:09 jptcarreira