Evenin' (o;
What is the command to make changes to /dev/i2c-X persistent?
After every reboot the permission is reset to 660.
And adding user snmp to group i2c doesn't help either to use an external command reading i2c bus.
Re: /dev/i2c-x permission
http://www.reactivated.net/writing_udev ... #ownership
Udev controls the creation of /dev/ nodes each boot.
Udev rules also control what permissions etc they are created with - you can change the group to a suitable one or change permissions to allow read/write to everyone.
Udev controls the creation of /dev/ nodes each boot.
Udev rules also control what permissions etc they are created with - you can change the group to a suitable one or change permissions to allow read/write to everyone.
Re: /dev/i2c-x permission
This took a little searching as a noob to Linux for me to get this working. But here is what I did.
edited the 60-ic2-tools.rules file:I seperated out the i2c-0 so it remained MODE 0660, here are the two lines:
I rebooted, and the permissions changed to:
As soon as I get back to my Raspberry Pi with an I2C device, I can confirm this.
Hope this helps.
John
edited the 60-ic2-tools.rules file:
Code: Select all
sudo nano /lib/udev/rules.d/60-i2c-tools.rules
Code: Select all
KERNEL=="i2c-0" , GROUP="i2c", MODE="0660"
KERNEL=="i2c-[1-9]*", GROUP="i2c", MODE="0666"
Code: Select all
crw-rw---T 1 root i2c 89, 0 Dec 19 21:01 /dev/i2c-0
crw-rw-rwT 1 root i2c 89, 1 Dec 19 21:01 /dev/i2c-1
Hope this helps.
John
NCR 310 - ZX81 - Apple II+ - Dell/Intel - Mac mini... Raspberry Pi!
Re: /dev/i2c-x permission
Thank you that worked on Pidora with a model B+