I2C commands not working...
I have an onion 2S+, running with root access, which will not run the following I2C command:
i2cset -y 2 84 21 16
I get a response of:
Could not open file
/dev/i2c-1' or/dev/i2c/1': No such file or directory
I think the problem is that there isn't a bus 2 in some config file somewhere... How do we go through the process of adding bus 2? What is a bus?
All I2C interactions on the Omega2 are done using the virtual device file /dev/i2c-
<DEVICE ADDRESS> <REGISTER>
<DEVICE ADDRESS> <REGISTER> <VALUE>
Is there any way that could be overwritten from 0 to 2? I'm still not sure what the 0 indicates here.
0is the "name" of the default (dedicated) I2C bus of Omega2 - it's compiled into the kernel / firmware.
# Omega2+ firmware v0.3.2 b223 root@Omega-5BE1:/# ls -l /dev | grep -i i2c crw------- 1 root root 89, 0 Jan 1 1970 i2c-0 root@Omega-5BE1:/# i2cdetect -l i2c-0 i2c 10000900.i2c I2C adapter
Why don't you use
0(i2c-0 ie. i2c bus 0) instead of that
2(i2c-2 ie. i2c bus 2) in your commands?
How can you compile the kernel with a different number here?
@Nathan-Guyette Sorry, I don't know - I'm a simple, average Omega2 user.
If you have a build systen installed You can tweak the kernel setup by using "make kernel_menuconfig"
Look under Device Drivers -> I2C Support, there is a several debugging options you can set in order to assist with debugging i2c.