Integrate SHT41 sensor using I2C with android application i.MX8MM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Integrate SHT41 sensor using I2C with android application i.MX8MM

1,353件の閲覧回数
archana_verma
Contributor II

Hi,

I am trying to port custom android OS on i.MX8MM board with android 14(6.1.57 kernel). I have connected SHT41 temperature and humidity sensor through I2C interface. I want the sensor data to be displayed on an android application and run it on the board.

I have enabled the sensor from kernel and able to print the sensor data to console as there is one ASCII text file in /sys/class/hwmon/hwmon0/temp1_input. When trying to open the file I'm getting permission denied(error 13). I have enabled SeLinux policies permissive.


I also tried to open /dev/i2c-2, as the sensor driver is using I2C but again getting the same error.

So, Please help me with how can I access I2C driver and SHT41 sensor and I found on android website that we need to enable AIDL to interact with HAL layer. So how can I do it? I am a beginner to the android OS. 


https://developer.android.com/develop/background-work/services/aidl

ラベル(2)
タグ(5)
0 件の賞賛
返信
3 返答(返信)

1,254件の閲覧回数
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Actually you're looking at the correct place, as developer.android webpage provides all documentation for android development on application level.

Even the link you have shared is spot on as it proivide examples of AIDL files and how it should be implemented.

Best regards/Saludos,
Aldo.

0 件の賞賛
返信

1,229件の閲覧回数
archana_verma
Contributor II
Hello @AldoG,

Thank you for you response. I'll move in the same direction but can you tell me like do we have to give some permission or enable AIDL from kernel side or just application level? Can you please give me a detailed description as I am new to this , I might me missing something ?
0 件の賞賛
返信

1,135件の閲覧回数
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please accept my apologize for the delayed response, please refer to the following post, I believe this does show exactly what needs to be done:
https://community.nxp.com/t5/i-MX-Processors/Adding-a-sensor-to-Android-but-HAL-doesn-t-seem-to-be/m...

Best regards/Saludos,
Aldo.

0 件の賞賛
返信