Activating i2c-dev


I’m trying to get i2c to work on rpi2
Linux osmc 4.4.8-3-osmc #1 PREEMPT Sun May 1 22:11:11 UTC 2016 armv6l GNU/Linux

Basically, I’m looking to get the /dev/i2c devices but it seems to be super complicated on osmc.

so far I’ve set the dtparam=i2c_arm=on in config.txt - nothing changed
apt-get the kernel sources and compiled the i2c modules using the /boot/config-4.4.6-3-osmc (this is the only config available) and getting an error

ERROR: could not insert ‘i2c_bcm2708’: Exec format error

Any suggestions?

you shouldnt need to mess with kernel compiling

I just rebooted my pi:
root@blah:~# grep i2c /boot/config.txt

root@blah:~# lsmod | grep i2c
i2c_bcm2708 5828 0

root@blah:~# ls /dev/i2c*
ls: cannot access /dev/i2c*: No such file or directory
root@blah:~# modprobe i2c_dev
root@blah:~# ls /dev/i2c*

root@blah:~# python bh1750/
Luminosity 66.6666666667lx
Luminosity 65.0lx
Luminosity 61.6666666667lx
Luminosity 5.0lx
Luminosity 63.3333333333lx
Luminosity 65.0lx