Can not detect I2c device

I have connected temperature and humidity sensor SHT40 on i2c2 of apalis imx8 on ixora carrier board. on same i2c bus ixora have rtc@0x68 and eeprom@0x50. When I run i2cdetect on mapped i2c-4, it can detect rtc and eeprom but can not detect sht40 sensor at @ 0x44

Computer on Module - Apalis iMX8
Carrier Board - Ixora Carrier Board
Computer on Module OS - Torizon
Development PC OS - Linux

Greetings @bhagwat_99,

First of all are you sure the sht40 sensor is being initialized and working properly?

Actually how are you configuring this peripheral? I did a quick check and the driver for this sensor found here: hwmon: Add sht4x Temperature and Humidity Sensor Driver · torvalds/linux@505c254 · GitHub

Wasn’t added until V5.14 of the Linux kernel. Which is far later than the 5.4 kernel that we use in our software currently.

Best Regards,

1 Like

Hello Jeremias,
Thank you for help.
I am interfacing i2c sensor from user space. I am able to detect other i2c sensor using i2cdetect, both onboard sensor on ixora board (rtc ,eeprom) and external sensor (eg hts221) but not sht40 sensor. I checked with multiple sht40 sensor to verify that it is not hardware problem.


Hi @bhagwat_99

Have you tried adding the sht4x driver mentioned by @jeremias.tx?if not,could you add the driver as a module and update it in the torizon image?
Please refer to the building-external-kernel-modules-with-torizon article to add out-of-tree kernel modules.

Hello @ashok.tx ,
as per my understanding, adding the driver as module in the torizon image will access sensor in kernel space, but the problem I am facing is can not detect the sht40 sensor on i2c bus by i2cdetect. I have tried with other i2c sensor which working file in user space without adding driver or changing device tree. I don’t understand problem with specific sensor sht4x.

I understand your issue now. That is indeed strange, typically i2cdetect should “see” an i2c device even if the driver for it is not present/enabled.

Usually if an i2c device isn’t at least detected it’s a hardware issue. All I can suggest at the moment is to check connections, including any power connections to the i2c device. Though since you’ve successfully connected and detected other i2c devices, there may be other unforeseen issues.

Best Regards,