I2cdetect won't show the device, but it's there
Just a quick question. On my i2c bus 0
, I have two devices: 0x32
and 0x20
.
When I use i2cdetect, only one of them appears.
# ./i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- 32 -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
The weird thing is, however, I can use i2cset
both i2cget
to send and receive messages for both of them just fine. I suppose this is not a technical problem, but a technical curiosity - why is it 0x20
pretending that no one is there?
Thank!
source to share
Different I2C devices can behave differently when reading / writing bytes.
Some, for example, may be waiting for a write_then_read command and will not recognize an offline read command. Others might expect at least 16 bits of data to be read / written, otherwise the transaction will fail.
i2cdetect can use different probing approaches such as read / write command configured with command line parameters. You can try -r or -q.
If that doesn't work, look at the command implementation and your device data and make sure testing is possible.
source to share