Unable to enable i2c device

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Unable to enable i2c device

Postby douglagm » Tue Jan 27, 2015 6:05 pm

Hi,

I am having issues enabling the i2c device. Previously I used the following procedure to activate the i2c device:
$this->bbcode_second_pass_code('', '
pacman -Sy file base-devel abs git python2-distribute i2c-tools python2-pip
pip2 install RPi.GPIO

modprobe i2c-dev
modprobe i2c-bcm2708

echo "i2c-dev" > /etc/modules-load.d/i2c-dev.conf
echo "i2c-bcm2708" > /etc/modules-load.d/i2c-bcm2708.conf

i2cdetect -y 0
')

But this does not work:
$this->bbcode_second_pass_quote('', '
')i2cdetect -y 0
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory


The device files definitely do not exist:
$this->bbcode_second_pass_quote('', '
')ls -la /dev/i2c*
ls: cannot access /dev/i2c*: No such file or directory


The kernel modules are loaded:
$this->bbcode_second_pass_quote('', '
')lsmod
Module Size Used by
cfg80211 455601 0
8192cu 516692 0
leds_gpio 3492 0
led_class 4066 1 leds_gpio
uio_pdrv_genirq 3238 0
uio 8753 1 uio_pdrv_genirq
sch_fq_codel 7611 6
snd_bcm2835 19740 0
snd_pcm 86628 1 snd_bcm2835
snd_timer 20697 1 snd_pcm
snd 61799 3 snd_bcm2835,snd_timer,snd_pcm
bcm2708_rng 1044 0
rng_core 5666 1 bcm2708_rng
i2c_dev 5968 0
i2c_bcm2708 5432 0
ipv6 327533 0


The kernel version is:
$this->bbcode_second_pass_quote('', '
')uname -a
Linux alarmpi 3.18.3-3-ARCH #1 PREEMPT Mon Jan 26 20:10:28 MST 2015 armv6l GNU/Linux


Any assistance will be greatly appreciated
Gregg
douglagm
 
Posts: 4
Joined: Mon Apr 15, 2013 10:41 am
Top

Re: Unable to enable i2c device

Postby pepedog » Tue Jan 27, 2015 6:50 pm

Look at /boot/config.txt for all new device tree options.
I'm beginning to sound like an expert on this
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Unable to enable i2c device

Postby douglagm » Wed Jan 28, 2015 4:36 pm

Thanks for the pointer.

In case someone else is experiencing the same issue.

From http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97257

Model A & B users should add this to /boot/config.txt
$this->bbcode_second_pass_quote('', '
') device_tree=bcm2708-rpi-b.dtb
device_tree_param=i2c1=on
device_tree_param=spi=on

reboot

Model A+ & B+ users should add this to /boot/config.txt
$this->bbcode_second_pass_quote('', '
') device_tree=bcm2708-rpi-b-plus.dtb
device_tree_param=i2c1=on
device_tree_param=spi=on

reboot
douglagm
 
Posts: 4
Joined: Mon Apr 15, 2013 10:41 am
Top

Re: Unable to enable i2c device

Postby tcallen07 » Thu Mar 05, 2015 10:28 pm

@douglagm, I registered as a user on this forum solely to say THANK YOU for your post, particularly the latter where you provide the solution "in case someone else is experiencing the same". I was, and you cured a hell of a headache for me. :-)

Thanks again!

Trevor
tcallen07
 
Posts: 1
Joined: Thu Mar 05, 2015 10:25 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 4 guests

cron