cancel
Showing results for 
Search instead for 
Did you mean: 

Is There a Dedicated Android Library for Interfacing with STHS34PF80 Proximity Sensor?

Anusree_k
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
ahsrabrifat
Senior II

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

View solution in original post

2 REPLIES 2
ahsrabrifat
Senior II

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

Hi, We have tried to integrate the sensor and it went well. While trying to read the proximity values from the sensor using linux on nxp imx8mp, we are getting value as 0. Also, no activities on trigger is seen. I have attached the files we used. Can anyone help on this ?