pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

I2C stopped working

Sat Jun 13, 2015 10:15 pm

I have a home-built interface which uses i2c and recently stopped working. i2cdetect says
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory

I tried another i2c peripheral (XLoBorg), and i2cdetect gives the same error with that plugged in instead. This is on both my Pis and also with the SDCards swapped, and is possibly following an apg-get update, upgrade

It's got to be a simple problem but it escapes me for the moment. Any ideas?

Regards - Philip

User avatar
DougieLawson
Posts: 38851
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: I2C stopped working

Sat Jun 13, 2015 10:19 pm

Do you have

Code: Select all

dtparam=i2c_arm=on
in your config.txt?

Have you loaded i2c_dev with a sudo modprobe i2c_dev command?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

Re: I2C stopped working

Sat Jun 13, 2015 10:45 pm

Not touched anything of that sort since it last worked, and certainly not on both Pis. The only thing I'm aware of having changed is the rubber band holding my interface onto the top of the Pi case!

pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

Re: I2C stopped working

Sun Jun 14, 2015 3:14 pm

As I thought, a simple problem, but why??

A couple of weeks ago I was struggling to get sounds out of Pygame, and went into raspi-config to force audio through the 3.5mm jack. I didn't do anything else in there, but it seems it disabled i2c. I've just re-enabled it using raspi-config and my i2c interface now works just like it did before.

Very strange. Any idea why, anyone?

Regards - Philip

Return to “Troubleshooting”