Read I2C on android VIM4

Android Khadas image

Hello All,

I am trying to read the I2C port on while using android and the command here is not recognized:
image

Any idea on how to access this?

Thanks,
Aaron

@chandrian You can view Android documents, which is the correct way.

Thanks for the reply. This is the message I got:
image

The top image is with the device powered off and the second powered on so I believe it is seeing it, just not getting a good response with the i2cget command.
image

@chandrian


Do you have an external i2c device? If not, the value cannot be read. As mentioned in our document, it is just an example of how to use i2c tools to read and write i2c devices.

Thanks for the reply. I realized I was using the example command but I needed to change the device to the right register (0x24)

Are there any examples to look at for reading data from the pins for VIM3 or VIM4? I2C, UART, SPI, etc?

@chandrian

console:/ # i2cdetect -l                                                       
i2c-3   i2c             Meson I2C adapter                       I2C Adapter
i2c-1   i2c             Meson I2C adapter                       I2C Adapter
i2c-6   i2c             Meson I2C adapter                       I2C Adapter
i2c-2   i2c             Meson I2C adapter                       I2C Adapter
i2c-0   i2c             Meson I2C adapter                       I2C Adapter
i2c-5   i2c             Meson I2C adapter                       I2C Adapter
console:/ # 
console:/ # i2cdetect -y 6                                                     
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- UU --
10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
20: -- -- 22 -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                  
1|console:/ # i2cget -fy 6 0x18 00                                             
0xff
console:/ # 
console:/ # i2cdump -fy 6 0x18                                                 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
10: ff ff 00 04 ff ff 00 ff ff ff ff ff ff ff ff ff    ??.???.?????????
20: 01 01 01 ff ff 00 01 00 00 01 ff ff ff 00 00 ff    ?????.?..????..?
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
80: ff ff ff ff ff ff 00 ff ff ff ff ff ff ff ff ff    ??????.?????????
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ????????????????
f0: ff ff ff ff ff ff ff ff ff ff ff 0e 00 00 00 00    ????????????....
console:/ # 

Thanks! I appreciate the help