2025-05-09
3:22 AM
- last edited on
2025-05-09
5:26 AM
by
Lina_DABASINSKA
Hi,
I am currently working on a project using the STHS34PF80 proximity sensor from STMicroelectronics. The platform is running Android 14.0.0_1.0.0 (L6.1.55_2.2.0 BSP).
I would like to know if there is a dedicated Android driver or SDK available to directly interface with the STHS34PF80 sensor—either from STMicroelectronics or open-source contributors.
I have the datasheet and application notes for the sensor, and I understand its I²C communication protocol. However, before starting from scratch, I’d like to ask:
1) Any existing Android libraries or HAL implementations
2) Sensor integration examples in Android (preferably for NXP i.MX8M Plus - based platforms)
Any examples or references would be greatly appreciated.
Thanks in advance for your support!
Solved! Go to Solution.
2025-05-09 3:39 AM
STMicroelectronics provides an official Linux Industrial I/O (IIO) driver for the STHS34PF80 sensor, which is compatible with Android platforms. This driver is part of the st-mems-android-linux-drivers-iio repository and includes support for both I²C and SPI interfaces. https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio/blob/master/drivers/iio/stm/tmos/st_sths34pf80/Kconfig
For Android integration, ST offers the Android/Linux Sensor Hardware Abstraction Layer (HAL), which works with the IIO subsystem. This HAL provides a standardized interface for ST sensors, facilitating easier integration into Android systems.
https://www.st.com/en/embedded-software/androidlinuxhal.html
2025-05-09 3:39 AM
STMicroelectronics provides an official Linux Industrial I/O (IIO) driver for the STHS34PF80 sensor, which is compatible with Android platforms. This driver is part of the st-mems-android-linux-drivers-iio repository and includes support for both I²C and SPI interfaces. https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio/blob/master/drivers/iio/stm/tmos/st_sths34pf80/Kconfig
For Android integration, ST offers the Android/Linux Sensor Hardware Abstraction Layer (HAL), which works with the IIO subsystem. This HAL provides a standardized interface for ST sensors, facilitating easier integration into Android systems.
https://www.st.com/en/embedded-software/androidlinuxhal.html
2025-07-08 1:35 AM
2025-07-15 9:14 PM
Hi,
I am integrating the STHS34PF80 proximity MEMS sensor using the STMicroelectronics HAL from the following repository:
https://github.com/STMicroelectronics/st-mems-android-linux-sensors-hal/tree/master
However, when I run the HAL binary, I encounter the following error:
"root@imx8mp-lpddr4-evk:/st-mems-android-linux-sensors-hal/linux/build# ./stm-sensors-linux
failed to open config file [/etc/stm-sensors-hal/config], using defaults
found 5 IIO devices available under /sys/bus/iio/devices
sths34pf80_tmotion: IIO device not supported by sensorHAL
sths34pf80_tobject_comp: IIO device not supported by sensorHAL
sths34pf80_tpresence: IIO device not supported by sensorHAL
sths34pf80_tambshock: IIO device not supported by sensorHAL
sths34pf80_tobjamb: IIO device not supported by sensorHAL
No IIO sensors found!
no sensors available!"
Could you please guide me on how to add support for the sths34pf80 sensor in the ST HAL or help me resolve this issue?
Thank you.