3

Following Adafruit's instructions for their capacitive touch sensor (https://learn.adafruit.com/mpr121-capacitive-touch-sensor-on-raspberry-pi-and-beaglebone-black/overview) I'm getting the error message when trying to run their example python script:

pi@raspberrypi ~/Adafruit_Python_MPR121/examples $ python playtest.py 
Adafruit MPR121 Capacitive Touch Audio Player Test
chmod: cannot access `/sys/module/i2c_bcm2708/parameters/combined': No such file or directory
Traceback (most recent call last):
File "playtest.py", line 37, in <module>
if not cap.begin():
File "/usr/local/lib/python2.7/dist-packages/Adafruit_MPR121-1.1.0-py2.7.egg/Adafruit_MPR121/MPR121.py", line 90, in begin
I2C.require_repeated_start()
File "/usr/local/lib/python2.7/dist-packages/Adafruit_GPIO-0.9.3-py2.7.egg/Adafruit_GPIO/I2C.py", line 81, in require_repeated_start
subprocess.check_call('chmod 666 /sys/module/i2c_bcm2708/parameters/combined', shell=True)
File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'chmod 666 /sys/module/i2c_bcm2708/parameters/combined' returned non-zero exit status 1

I've checked the contents of the parameters folder and it's empty apart from a file named 'baudrate'.

The Pi is a Model B - Series 1. Raspbian is up to date.

pi@raspberrypi ~/Adafruit_Python_MPR121/examples $ uname -a
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux
pi@raspberrypi ~/Adafruit_Python_MPR121/examples $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

I've searched high and low but cannot find a fix.

tommyr
  • 37
  • 3
  • What Pi model are you using? – Steve Robillard Aug 20 '15 at 22:50
  • It's a Model B revision 1 – tommyr Aug 20 '15 at 22:58
  • At what step are you getting this error message? Please edit your question instead of replying in the comments. Did you run this with sudo? – Steve Robillard Aug 20 '15 at 23:24
  • Could you paste the results of uname -a and cat /etc/os-release? My parameters directory has baudrate and combined (although the machine I checked on is running Debian rather than Raspbian). – joan Aug 21 '15 at 07:50
  • @joan Thanks, i've updated the question with the results! – tommyr Aug 21 '15 at 11:28
  • 1
    You are using (in Pi terms) an ancient kernel (3.10.25). Modules are bound to the kernel version. I expect your kernel/module predates the introduction of the combined parameter. One solution is to update your kernel with sudo rpi-update. I thought that Raspbian updates automatically brought in the most recent stable kernel. Apparently not in your case. Have you done a sudo apt-get update followed by a sudo apt-get upgrade recently? – joan Aug 21 '15 at 13:23
  • The OP will need to do a "dist-upgrade" to get to the current main-line "Jessie" Raspbian version from their present "Wheezy" one, that will probably bring in to use a later kernel. A dist-upgrade in this case will also switch from sysV init to systemd if it gets the slightest chance which may produce some changes in the way things work for the OP. – SlySven Dec 23 '15 at 01:37
  • I ran into the same issue ... needed to be root as the directory was there, just didn't have the privileges. – Robert Wyatt Dec 30 '16 at 23:28
  • 1
    Turning 12c on the rasperry pi fixed it for me (https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c). – 1car69 Jan 18 '17 at 12:42

2 Answers2

0
cannot access `/sys/module/i2c_bcm2708/parameters/combined':
No such file or directory

Double check to make sure that's really not there. If so, try sudo modprobe i2c_bcm2708 and see if it appears.

If it is there, it may be because of permissions; as Steve says, try to run the script sudo.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
  • Thanks for your help! Still no joy though: pi@raspberrypi /sys/module/i2c_bcm2708/parameters $ ls baudrate pi@raspberrypi /sys/module/i2c_bcm2708/parameters $ sudo modprobe i2c_bcm2708 libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.10.25+/modules.dep.bin' – tommyr Aug 21 '15 at 12:50
  • I meant try the modprobe only if the file wasn't there, sorry. I think that is built-in and not really a module anyway. That is an odd modprobe error though. It implies you did not install a kernel correctly. Does lsmod say anything? – goldilocks Aug 21 '15 at 13:07
-3

In the end I gave up and wiped the Pi. This worked!

tommyr
  • 37
  • 3
  • 1
    You should add a few more details regarding why this worked - you may want to reference the comment about kernel versions and modules. – Steve Robillard Aug 24 '15 at 20:57
  • As this worked for you, it would be a good idea to mark it as correct. – Darth Vader Jan 18 '17 at 17:42
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Dec 11 '19 at 20:42