I2C Permissions

Ever tried running a python script as a cron job or as an snmp script that involves I2C access only to get 

Error (13) Permission denied

There are two fixes one temporary and one permanent.

sudo chmod a+rw /dev/i2c-0 for older RPIs
sudo chmod a+rw /dev/i2c-1 for newer RPIs (>= B+)

This is however lost after reboot so you might consider the following method

edit /lib/udev/rules.d/60-i2c-tools.rules
and change the i2c line to

KERNEL==”i2c-0″ , GROUP=”i2c”, MODE=”0660″
KERNEL==”i2c-[1-9]*”, GROUP=”i2c”, MODE=”0666″

Reboot and you are ok

4 Trackbacks / Pingbacks

  1. tamoxifen prices
  2. can buy ventolin online
  3. clonidine patch cheap
  4. allegra tablet use

Leave a Reply

Your email address will not be published.