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
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?
- tedhale
- Posts: 114
- Joined: Thu Sep 20, 2012 4:52 pm
- Location: Williamsburg, VA, USA
- Contact: Website
Problem using 1-wire
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com
http://raspberrypihobbyist.blogspot.com
Re: Problem using 1-wire
The latest systems (and upgrades) use Device Tree to handle hardware.
If you add
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.
If you add
Code: Select all
dtoverlay=w1-gpio
Documentation for this setting and others is in the /boot/overlays/README file.
- tedhale
- Posts: 114
- Joined: Thu Sep 20, 2012 4:52 pm
- Location: Williamsburg, VA, USA
- Contact: Website
Re: Problem using 1-wire
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.
I guess if I had been keeping up with my reading on the Pi, I would have already known this.
Thanks again.
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com
http://raspberrypihobbyist.blogspot.com