Page 1 of 1

Problem using 1-wire

Posted: Thu Mar 05, 2015 4:58 pm
by tedhale
I am having trouble using 1-wire devices on a few of my systems. Other systems have no problem.
The first clue that something was odd is that the "/sys/bus/w1/devices/w1_bus_master" file does not exist.

Yes, the driver modules are loaded as shown by lsmod
Module Size Used by
w1_therm 3325 0
w1_gpio 4502 0
wire 31280 2 w1_gpio,w1_therm
cn 5756 1 wire
i2c_dev 6709 0
snd_bcm2835 21342 0
snd_pcm 93100 1 snd_bcm2835
snd_seq 61097 0
snd_seq_device 7209 1 snd_seq
snd_timer 23007 2 snd_pcm,snd_seq
snd 67211 5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
uio_pdrv_genirq 3666 0
uio 9897 1 uio_pdrv_genirq

I noticed that on the systems that work, I get the following two lines during the boot process.

[ 10.812369] Driver for 1-wire Dallas network protocol.
[ 10.821869] w1-gpio w1-gpio: gpio pin 4, gpio pullup pin -1

But on the systems that don't work, I only see the first line.
This problem is occuring on models B, B+ and 2B.

I have updated using apt, and I just built a new system with the February Raspbian image. Still no luck.

Anyone have an idea what is going on?

Re: Problem using 1-wire

Posted: Thu Mar 05, 2015 5:27 pm
by rpdom
The latest systems (and upgrades) use Device Tree to handle hardware.

If you add

Code: Select all

To your config.txt, (and reboot) you will find that everything works again.

Documentation for this setting and others is in the /boot/overlays/README file.

Re: Problem using 1-wire

Posted: Thu Mar 05, 2015 10:25 pm
by tedhale
That fixed it. Thanks you very much.

I guess if I had been keeping up with my reading on the Pi, I would have already known this.

Thanks again.