User Tools

Site Tools


1wireandraspicam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
1wireandraspicam [10.08.2014 14:30]
andreas [Solving the issue]
1wireandraspicam [15.08.2014 13:37] (current)
andreas [Solving the issue, if it's bigger]
Line 13: Line 13:
 This is a known issue as it can be read [[https://​github.com/​raspberrypi/​linux/​issues/​435|here]]. It's related to an issue with the 1wire kernel module //​w1-gpio//,​ This module overwrites the setup of the I²C pins and prevents the access of the RaspberryPi camera, which is also using the I²C bus. This is a known issue as it can be read [[https://​github.com/​raspberrypi/​linux/​issues/​435|here]]. It's related to an issue with the 1wire kernel module //​w1-gpio//,​ This module overwrites the setup of the I²C pins and prevents the access of the RaspberryPi camera, which is also using the I²C bus.
 To solve this problem, it's just important to ensure the correct order, when which module is loaded. To solve this problem, it's just important to ensure the correct order, when which module is loaded.
 +\\ 
 +\\
 ===== Prerequisites ===== ===== Prerequisites =====
 You want to use the RaspberryPi Cam by using the mmal interface and you want to use the 1wire modules. If you e.g. want to take the temperature with an DS18S20 1wire temp sensor, then you get an error, you probably get the temp, but no cam pic anymore. You want to use the RaspberryPi Cam by using the mmal interface and you want to use the 1wire modules. If you e.g. want to take the temperature with an DS18S20 1wire temp sensor, then you get an error, you probably get the temp, but no cam pic anymore.
 +\\
 +\\
 ===== Preparation ===== ===== Preparation =====
 Fist update everything by calling Fist update everything by calling
Line 41: Line 44:
 Error: Could not open file `/​dev/​i2c-1'​ or `/​dev/​i2c/​1':​ No such file or directory Error: Could not open file `/​dev/​i2c-1'​ or `/​dev/​i2c/​1':​ No such file or directory
 </​code>​ </​code>​
 +\\
 ===== Solving the issue ===== ===== Solving the issue =====
  
Line 60: Line 63:
 i2c-dev i2c-dev
 snd-bcm2835 snd-bcm2835
 +</​code>​
 +
 +
 +Then ensure, that the modules **spi-bcm2708** and **i2c-bcm2708** are on the blacklist, so that they are not immediately loaded.
 +
 +<code bash>
 +pi@raspberrypi ~ $ cat /​etc/​modprobe.d/​raspi-blacklist.conf ​
 +# blacklist spi and i2c by default (many users don't need them)
 +
 +blacklist spi-bcm2708
 +blacklist i2c-bcm2708
 </​code>​ </​code>​
  
Line 65: Line 79:
 <code bash>​sudo reboot</​code>​ <code bash>​sudo reboot</​code>​
  
-After that, you can verify your again and you will get these interesting ​results:+After that, you can verify your I²C bus again and you will get these promising ​results:
 <​code>​ <​code>​
 pi@raspberrypi ~ $ sudo i2cdetect -y 0 pi@raspberrypi ~ $ sudo i2cdetect -y 0
 +     ​0 ​ 1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 +00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
 +10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 +20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 +30: -- -- -- -- -- -- 36 -- -- -- -- -- -- -- -- -- 
 +40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 +50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 +60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 +70: -- -- -- -- -- -- -- --                         
 +pi@raspberrypi ~ $ sudo i2cdetect -y 1
      ​0 ​ 1  2  3  4  5  6  7  8  9  a  b  c  d  e  f      ​0 ​ 1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00:          -- -- -- -- -- -- -- -- -- -- -- -- --  00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
Line 77: Line 101:
 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 70: -- -- -- -- -- -- -- --                          70: -- -- -- -- -- -- -- --                         
 +</​code>​
 +\\
 +===== Solving the issue, if it's bigger =====
 +
 +__Important additional information:​__ Since the newest firmware (kernel 3.12.26+), the i2c-1 address 0x3b is now been taken over by the OS, this might result in an I²C bus result, with having the **UU** here:
 +
 +<​code>​
 pi@raspberrypi ~ $ sudo i2cdetect -y 1 pi@raspberrypi ~ $ sudo i2cdetect -y 1
      ​0 ​ 1  2  3  4  5  6  7  8  9  a  b  c  d  e  f      ​0 ​ 1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
Line 88: Line 119:
 70: -- -- -- -- -- -- -- --                          70: -- -- -- -- -- -- -- --                         
 </​code>​ </​code>​
 +
 +UU means that probing was skipped, because this address is currently in use by a driver. This strongly suggests that there is a chip at this address, but in this case, it's an error.
 +
 +To fix this, you have to add two more modules to the blacklist (/​etc/​modprobe.d/​raspi-blacklist.conf),​ this finally has to look like this:
 +<​code>​
 +blacklist spi-bcm2708
 +blacklist i2c-bcm2708
 +blacklist snd-soc-bcm2708-i2s
 +blacklist snd_soc_wm8804
 +</​code>​
 +
 +Then reboot the Raspberry Pi and recheck the bus status, not it should be fixed and you get the same result as above with e.g. the 36 (but no UU anymore).
1wireandraspicam.1407673801.txt.gz · Last modified: 10.08.2014 14:30 by andreas