PINE64

Full Version: i2c in android
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Has anyone had luck using i2c in android ?
(03-09-2017, 06:24 AM)Skivholme Wrote: [ -> ]Hi,

Has anyone had luck using i2c in android ?

So, I've been trying to play with this, mostly from within a chroot linux environment for better visibility into what's going on... I really want to extend via i2c more than GPIO, and perhaps daisy chain sensors or arduinos off of it...

I'm running ayufan's 6.0 android build with a Kali chroot inside linux deploy. The pine64 GPIO pins are supported fine from both 'environments', but from looking at dmesg, /dev/ and messing with i2c-utils, I don't think that the built kernel has the i2c dev support.
I started considering how to just rebuild a custom kernel for the image, just adding i2c device support to the .config... but got sidetracked. I didn't confirm that this is the actual cause or solution; I'm just going off of the fact there's no /dev/i2c* . May they just need mknod'ed, if the config is already in there; Haven't verified at all.
Rather I'm running the 7.0 build. I think I tried 6.0 but didn't have access to the GPIO pins.
Yep, pretty certain that it's just the kernel build lacking i2c opts in the Android images we've been using. There might be the angle to compile the module by itself and insmod it during runtime (I think this was how community samba/cifs support was pulled off in old Android versions), or more likely to just compile a new kernel and drop it into the image, I think would be successful.

I2C works fine out of the box with both armbian mainline and dev kernels.