cancel
Showing results for 
Search instead for 
Did you mean: 

Could you please explain me if the STM Android Sensor IIO HAL calibration tool is an external APK? And provide information about how could I enable and run the calibration_daemon?

EVazq.1
Associate

Hello,

We have been working with the LIS3DH Accelerometer on an Android 11 based device. We have Integrated the corresponding Kernel drivers and the STM Android Sensor IIO HAL.

As per our understanding our Android device should be able to read values from the accelerometer and rotate the screen accordingly, but this feature is not working as expected.

When enabling the debug output of the Android WindowOrientationListener I saw that the code always returns a “proposedRotation=-1�? identifier, and when doing some research, I noted that this might be caused when the accelerometer has not been calibrated.

I reviewed the STM Android Sensor IIO HAL, and I noted that there is a calibration_daemon which depends on a calibration tool.

Could you please explain me if this calibration tool is an external APK? And provide information about how could I enable and run the calibration_daemon?

Any guidance will be highly appreciated,

Thanks, and best regards,

Esteban V.

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi Esteban @EVazq.1​ ,

Since this is a specific question about Android drivers, I suggest you to directly rise an issue on Github, so that it will be handled directly by Android ST experts.

--> https://github.com/STMicroelectronics/STMems_Android_Sensor_HAL_IIO

-Eleon

EVazq.1
Associate

Hello Eleon,

Thank you for the suggestion, I opened the following “issue�? on GitHub, but I have not received response yet.

https://github.com/STMicroelectronics/STMems_Android_Sensor_HAL_IIO/issues/13

Could you please let me know if I correctly posted the issue?

Thanks, and best regards,

Esteban V.

AhsanAnsari
Associate II

The issue you're facing with the accelerometer not rotating the screen may be due to a lack of calibration. The calibration_daemon in the STM Android Sensor IIO HAL requires a calibration tool, which is usually an external APK. This tool runs calibration routines to ensure the sensor works correctly. To solve this, you'll need to find and install the correct calibration APK from STM. Once installed, the calibration_daemon will run automatically to calibrate the sensor. Ensure the daemon is active and check system logs to confirm the calibration is applied. This should fix the rotation problem.