I have a little problem about my app.
Firstly I install package i2c-tools,
I give all permission to all user for dev/i2c* files.
After, add the line i2c-dev in etc/modules file
i2c devices are exist in /dev/ directory.
I guess problem is in my C code:
Code:
int fd = open("/dev/i2c-1", O_RDWR);
returns -1 value and it give errno:2 No such file or directory.
Anyone has a suggestions, whats the problem I couldnt found?
Below i2cdetect, device and permission output.
Code:
root@arge16-HP-600B:/home/arge1-6# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- 37 -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- 59 -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Code:
root@arge16-HP-600B:/home/arge1-6# i2cdetect -l
i2c-0 i2c i915 gmbus ssc I2C adapter
i2c-1 i2c i915 gmbus vga I2C adapter
i2c-2 i2c i915 gmbus panel I2C adapter
i2c-3 i2c i915 gmbus dpc I2C adapter
i2c-4 i2c i915 gmbus dpb I2C adapter
i2c-5 i2c i915 gmbus dpd I2C adapter
i2c-6 i2c DPDDC-B
I2C adapter
Code:
root@arge16-HP-600B:/home/arge1-6# ls -l /dev/i2c*
crw-rw-rw- 1 root i2c 89, 0 Oct 2 14:36 /dev/i2c-0
crw-rw-rw- 1 root i2c 89, 1 Oct 2 14:36 /dev/i2c-1
crw-rw-rw- 1 root i2c 89, 2 Oct 2 14:36 /dev/i2c-2
crw-rw-rw- 1 root i2c 89, 3 Oct 2 14:36 /dev/i2c-3
crw-rw-rw- 1 root i2c 89, 4 Oct 2 14:36 /dev/i2c-4
crw-rw-rw- 1 root i2c 89, 5 Oct 2 14:36 /dev/i2c-5
crw-rw-rw- 1 root i2c 89, 6 Oct 2 14:36 /dev/i2c-6