Fix 1-wire after upgrading to kernel 3.18.*

After todays update I have lost my 1-wire devices. As it turns out on January 20 they moved to Kernel 3.18 with device trees enabled. This breaks the i2c, spi, w1 … (list and fix here)

If you are using my setup on 1-wire temperature sensing then here is the fix for you.

  1. Open the /boot/config.txt file as root to gain write access.
  2. Add the following line to the end of the file:
    dtoverlay=w1-gpio,gpiopin=4
  3. Reboot your pi.

This solves your problem with the DS18B20 and other w1 sensors which are connected with three wires to the Pi. (Don’t use parasite mode…)

Have fun, and continue your super work.

Update (2015-03-30): Adafruit page

Advertisements

Author: Gajdos Tamás

A "barefoot physicist" with some IT skills in system administration.

4 thoughts on “Fix 1-wire after upgrading to kernel 3.18.*”

  1. Doing the procedure indicated, for sure, did change something, but I still can’t read my DS18B20.
    When I go to
    # cd /sys/bus/w1/devices/
    I only have
    “w1_bus_master1”
    but still no “28-xxxxxx” indicating for a sensor !

    Anyway to fix this ?

    1. I think you have a wiring issue. Check the GND/DQ/VDD lines from the DS18B20 sensor if they are connected to the proper pins (PIN1 (3.3V-VDD), PIN7 (GPIO4-DQ), PIN9 (GND)) on the raspberry. Remember to use a resistor (5k – 10k) between DQ and VDD.

      1. Thank you so much !
        I checked it so many time already !
        But you were right, I staggered GND from sensor to GPIO17(pin1) instead of GND(pin9) on the PI !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s