DS18B20 and 30-Jan firmware
Hi all,
Sorry if this is a repost - I've done a quick search, and can't find anything, so I'll risk the (deserved) wrath of the forum and post a new topic. Please feel free to tell me how to use search if this has already been done to death...
I've been using a pair of DS18B20 sensors for ages now, no problems. However, yesterday I upgraded my machine with rpi-update, and noticed that things had stopped working. When I looked in /sys/bus/w1/devices/ it was empty. Tried rebooting, removing and reloading the modules, and even the final solution, switching it off and on again. Nothing. I Tried another sensor, just in case it was a coincidence. Still nothing. So I downgraded the firmware to the previous one (I'm not sure exactly what version, I'll check, but it was from around October last year) and the sensors appeared again, and were working as expected.
So, it seems that at some point in the last few firmware/kernel updates, something has changed. I had a quick look at github and didn't notice anything obvious, but then again, remember what I said earlier about my powers of search?
Anyone else noticed this? Is there anything that's changed that I couldn't find, or is it broken?
Ta,
Sorry if this is a repost - I've done a quick search, and can't find anything, so I'll risk the (deserved) wrath of the forum and post a new topic. Please feel free to tell me how to use search if this has already been done to death...
I've been using a pair of DS18B20 sensors for ages now, no problems. However, yesterday I upgraded my machine with rpi-update, and noticed that things had stopped working. When I looked in /sys/bus/w1/devices/ it was empty. Tried rebooting, removing and reloading the modules, and even the final solution, switching it off and on again. Nothing. I Tried another sensor, just in case it was a coincidence. Still nothing. So I downgraded the firmware to the previous one (I'm not sure exactly what version, I'll check, but it was from around October last year) and the sensors appeared again, and were working as expected.
So, it seems that at some point in the last few firmware/kernel updates, something has changed. I had a quick look at github and didn't notice anything obvious, but then again, remember what I said earlier about my powers of search?
Anyone else noticed this? Is there anything that's changed that I couldn't find, or is it broken?
Ta,
--
nr.
nr.
Re: DS18B20 and 30-Jan firmware
See http://www.raspberrypi.org/forums/viewt ... 28&t=97314
Summary
Add one or more of the following to your /boot/config.txt and reboot.
I2C
Add dtparam=i2c1=on (or dtparam=i2c0=on on old models)
SPI
Add dtparam=spi=on
I2S
Add dtparam=i2s=on
lirc-rpi
Add dtoverlay=lirc-rpi
Add module parameters to the end of the dtoverlay line,
e.g. dtoverlay=lirc-rpi,gpio_in_pin=16,gpio_in_pull=high
w1-gpio
If you require the external pullup
dtoverlay=w1-gpio-pullup,gpiopin=x,pullup=y
otherwise
dtoverlay=w1-gpio-pullup,gpiopin=x
(where x and y are gpios).
Audio card
Add one of the following
dtoverlay=hifiberry-dac
dtoverlay=hifiberry-dacplus
dtoverlay=hifiberry-digi
dtoverlay=iqaudio-dac
dtoverlay=iqaudio-dacplus
heartbeat LED
dtparam=act_led_trigger=heartbeat
Summary
Add one or more of the following to your /boot/config.txt and reboot.
I2C
Add dtparam=i2c1=on (or dtparam=i2c0=on on old models)
SPI
Add dtparam=spi=on
I2S
Add dtparam=i2s=on
lirc-rpi
Add dtoverlay=lirc-rpi
Add module parameters to the end of the dtoverlay line,
e.g. dtoverlay=lirc-rpi,gpio_in_pin=16,gpio_in_pull=high
w1-gpio
If you require the external pullup
dtoverlay=w1-gpio-pullup,gpiopin=x,pullup=y
otherwise
dtoverlay=w1-gpio-pullup,gpiopin=x
(where x and y are gpios).
Audio card
Add one of the following
dtoverlay=hifiberry-dac
dtoverlay=hifiberry-dacplus
dtoverlay=hifiberry-digi
dtoverlay=iqaudio-dac
dtoverlay=iqaudio-dacplus
heartbeat LED
dtparam=act_led_trigger=heartbeat
Re: DS18B20 and 30-Jan firmware
Excellent, thank you! For some reason, if I search for w1-gpio or w1-therm, that topic doesn't get found, so I didn't see it. But that's great information, thanks 

--
nr.
nr.
Re: DS18B20 and 30-Jan firmware
Having a heartbeat pulse on the ACT LED is quite misleading. When the ACT LED is pulsing it looks like it's passing data, as you would expect. A heartbeat pulse on the PWR LED might be more sensible.
Is there any such function: "pwr_led_trigger=heartbeat" ?
Is there any such function: "pwr_led_trigger=heartbeat" ?
Penthux
------------
Slackware ARM on a Raspberry Pi - SARPi
http://sarpi.penthux.net
"Slackware ARM - it's not for NOOBS!"
------------
Slackware ARM on a Raspberry Pi - SARPi
http://sarpi.penthux.net
"Slackware ARM - it's not for NOOBS!"
Re: DS18B20 and 30-Jan firmware
I just made a new noobs installation and the sensors I had working before will not show up either. The Folder for /sys/bus/w1/devices/ is completely empty. I thought I had things wired up wrong or fried my sensors but they are not. Tested on another pi with older version.
Re: DS18B20 and 30-Jan firmware
I have the same problem. I added a few lines into config.txt, but without success. I have connected ds18b20 to GPIO4. Can someone tell me, what exactly should I do? Othervise I will do downgrade to previous version. Most likely there is only few lines to resolve the issue. Unfortunately I don't know which one. Thanks for all help.
Re: DS18B20 and 30-Jan firmware
The only line you should need to put into config.txt in your case isjbranko wrote:I have the same problem. I added a few lines into config.txt, but without success. I have connected ds18b20 to GPIO4. Can someone tell me, what exactly should I do? Othervise I will do downgrade to previous version. Most likely there is only few lines to resolve the issue. Unfortunately I don't know which one. Thanks for all help.
Code: Select all
dtoverlay=w1-gpio
Re: DS18B20 and 30-Jan firmware
Just to confirm, that everything is good for me on the latest update - it works just fine! I just added the one line to my config.txt file (I don't have access to the machine right now, so can't confirm exactly the syntax, but it was exactly as explained in the README file), rebooted, and all is good.
Thanks,
Thanks,
--
nr.
nr.
Re: DS18B20 and 30-Jan firmware
rpdom, thank you for help. It work's. You save me few hours with downgrade.
Re: DS18B20 and 30-Jan firmware
thank you very much.
it's good.
it's good.
Re: DS18B20 and 30-Jan firmware
Hi I was just about to post a longish explanation that I've read everything here and I am still unable to get my ds18b20 to work.rpdom wrote:The only line you should need to put into config.txt in your case isjbranko wrote:I have the same problem. I added a few lines into config.txt, but without success. I have connected ds18b20 to GPIO4. Can someone tell me, what exactly should I do? Othervise I will do downgrade to previous version. Most likely there is only few lines to resolve the issue. Unfortunately I don't know which one. Thanks for all help.which should work with the default of gpio 4.Code: Select all
dtoverlay=w1-gpio
Update: Please ignore, it does indeed work now. I am not sure what I changed, but suddenly it is normal. I did add dtoverlay=w1-gpio to /boot/config.txt
Possibly I plugged the pin header wrong. Sorry for wasting your time.
Re: DS18B20 and 30-Jan firmware
1st off, awesome opening post to this thread. LOL!
2nd, I had exactly the same issue as the OP. Added the dtoverlay=w1-gpio line to config.txt and all is well.
Thanks to all!
2nd, I had exactly the same issue as the OP. Added the dtoverlay=w1-gpio line to config.txt and all is well.
Thanks to all!
My projects and stuff: www.whiskeytangohotel.com
Re: DS18B20 and 30-Jan firmware
Groan, some work to do before I dare update my Pis with digital thermometers attached.....
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
Re: DS18B20 and 30-Jan firmware
Hello again.cacb wrote: Hi I was just about to post a longish explanation that I've read everything here and I am still unable to get my ds18b20 to work.
Update: Please ignore, it does indeed work now. I am not sure what I changed, but suddenly it is normal. I did add dtoverlay=w1-gpio to /boot/config.txt
Possibly I plugged the pin header wrong. Sorry for wasting your time.
As seen above, I had the problem with ds18b20 and apparently fixed it by updating /boot/config.txt
Today, I did another
sudo apt-get update
sudo apt-get upgrade
and now my ds18b20 sensors are gone *again* - sigh. Please, what is going on? This is a machine I am setting up for a friend.
I have tried adding/removing dtoverlay=w1-gpio to boot/config.txt, but now this does not help either. When I list the contents of /sys/bus/w1/devices (dtoverlay=w1-gpio is activated in boot/config.txt) i get a varying number of subfolders, but they do not have the proper names (serial numbers)
Right now I have 2 sensors attached, I know the serial numbers, they are
28-00005a013a4
28-00005a01d5f
but when I list /sys/bus/w1/devices , I get
00-300000000000
00-b00000000000
00-d00000000000
w1-bus-master1
The characters 3, b, d keep changing in the names above, and sometimes there are only 2 folders.
Please, this used to be dead simple, now it is broken. I would really appreciate some help.
-
- Posts: 2
- Joined: Tue Feb 17, 2015 3:17 pm
Re: DS18B20 and 30-Jan firmware
hello,same problem to me.Do you have fixed?cacb wrote:Hello again.cacb wrote: Hi I was just about to post a longish explanation that I've read everything here and I am still unable to get my ds18b20 to work.
Update: Please ignore, it does indeed work now. I am not sure what I changed, but suddenly it is normal. I did add dtoverlay=w1-gpio to /boot/config.txt
Possibly I plugged the pin header wrong. Sorry for wasting your time.
As seen above, I had the problem with ds18b20 and apparently fixed it by updating /boot/config.txt
Today, I did another
sudo apt-get update
sudo apt-get upgrade
and now my ds18b20 sensors are gone *again* - sigh. Please, what is going on? This is a machine I am setting up for a friend.
I have tried adding/removing dtoverlay=w1-gpio to boot/config.txt, but now this does not help either. When I list the contents of /sys/bus/w1/devices (dtoverlay=w1-gpio is activated in boot/config.txt) i get a varying number of subfolders, but they do not have the proper names (serial numbers)
Right now I have 2 sensors attached, I know the serial numbers, they are
28-00005a013a4
28-00005a01d5f
but when I list /sys/bus/w1/devices , I get
00-300000000000
00-b00000000000
00-d00000000000
w1-bus-master1
The characters 3, b, d keep changing in the names above, and sometimes there are only 2 folders.
Please, this used to be dead simple, now it is broken. I would really appreciate some help.
bye
cesare
Re: DS18B20 and 30-Jan firmware
Hi, I had this problem a couple of times, and I had difficulties finding the causes. Now it seems there were a couple of things at the same time. Initially, a system upgrade broke it. That was fixed by adding "dtoverlay=w1-gpio" to /boot/config.txtforzalaquila wrote: hello,same problem to me.Do you have fixed?
bye
cesare
The second time it happened, I did not really find out why, but it seems most likely I had some kind of hardware connection issue (my sensors are on a home made board connected to the GPIO pins via a pin header). After disconnection everything and re-connecting, I found that it "suddenly" worked again.
Re: DS18B20 and 30-Jan firmware
this is the second time DS18B20 goes wrong because of an upgrade.
I wonder why there were no update doc's warning for this issue, now my solarheater went into safe modus again after an upgrade made the thermistors not doing their thing,
safe modus means here open the valves to the accumulator even when temps might be too low, Resulting in a possible cooling off. To say the truth I really hate this kind of stuff going haywire because no one takes the courtesy to tell anyone.
A reason the more to setup a test environment of a few Raspi's before implementing an upgrade.
I wonder why there were no update doc's warning for this issue, now my solarheater went into safe modus again after an upgrade made the thermistors not doing their thing,
safe modus means here open the valves to the accumulator even when temps might be too low, Resulting in a possible cooling off. To say the truth I really hate this kind of stuff going haywire because no one takes the courtesy to tell anyone.
A reason the more to setup a test environment of a few Raspi's before implementing an upgrade.
Re: DS18B20 and 30-Jan firmware
This simple suggestion worked for me. Thanks a lot! I was having the same issue, instead of seeing 28-* in /sys/bus/w1/devices/ I was seeing some weird names like:cacb wrote:After disconnection everything and re-connecting, I found that it "suddenly" worked again.
Code: Select all
pi@raspberrypi /sys/bus/w1/devices $ ls
00-300000000000 00-b00000000000 00-d00000000000 w1_bus_master1
- NikThePlumber
- Posts: 11
- Joined: Sun Jan 05, 2014 10:30 am
- Location: Rugby, Warwickshire, UK
Re: DS18B20 and 30-Jan firmware
I've had this same odd problem. I don't have a solution yet, but my experience may help someone...
I've been continuously running 4 x DS18B20 probes in parallel on a Pi model B as part of a home temperature experiment for a few months now with no problems at all. I recently swapped to a Pi model A+ but I've encountered the same problem described above where I can see some folders in the w1/devices folder but they don't match up with the serial number in the actual sensors (I have these captured in my code on the model B so am 100% sure that they work and know what they should be). This is what it looks like when I list the folder contents:
I've been continuously running 4 x DS18B20 probes in parallel on a Pi model B as part of a home temperature experiment for a few months now with no problems at all. I recently swapped to a Pi model A+ but I've encountered the same problem described above where I can see some folders in the w1/devices folder but they don't match up with the serial number in the actual sensors (I have these captured in my code on the model B so am 100% sure that they work and know what they should be). This is what it looks like when I list the folder contents:
I've ensured I'm apt-get up-to-date and have tried different hardware configurations and various boot options with no success.pi@raspberrypi /sys/bus/w1/devices $ ls -l
total 0
lrwxrwxrwx 1 root root 0 Mar 29 09:49 00-774000000000 -> ../../../devices/w1_bus_master1/00-774000000000
lrwxrwxrwx 1 root root 0 Mar 29 09:49 00-b74000000000 -> ../../../devices/w1_bus_master1/00-b74000000000
lrwxrwxrwx 1 root root 0 Mar 29 09:50 00-f74000000000 -> ../../../devices/w1_bus_master1/00-f74000000000
lrwxrwxrwx 1 root root 0 Mar 29 09:49 w1_bus_master1 -> ../../../devices/w1_bus_master1
Re: DS18B20 and 30-Jan firmware
It is a weird problem. The numbers you list are the exact same I saw (on a PI1 Model B) when the sensors stopped working. A few days ago, my SD card got corrupted, I had to erase it and reinstall latest version of Raspbian (NOOBS). I added dtoverlay=w1gpio to /boot/config.txt and it worked fine with the same sensors as before.Agsom wrote:This simple suggestion worked for me. Thanks a lot! I was having the same issue, instead of seeing 28-* in /sys/bus/w1/devices/ I was seeing some weird names like:cacb wrote:After disconnection everything and re-connecting, I found that it "suddenly" worked again.
Unplugging and rewiring solved it.Code: Select all
pi@raspberrypi /sys/bus/w1/devices $ ls 00-300000000000 00-b00000000000 00-d00000000000 w1_bus_master1
It would be nice to understand why this sometimes happens though. Apparently, it is not a unique one-off problem.
- NikThePlumber
- Posts: 11
- Joined: Sun Jan 05, 2014 10:30 am
- Location: Rugby, Warwickshire, UK
Re: DS18B20 and 30-Jan firmware
hmm, the reason that I swapped to my A+ was that the B suddenly stopped working one day following a reboot, so because I'm logging data I just grabbed the spare A+ to try and minimise the data gap. I haven't revisited the B until today but when I investigated the B, I've found it's completely dead - won't even wake the screen up so I can't even tell if it's doing BIOS things. I put the SD card in my laptop and found my user data was OK, although I've not checked out the OS folders. I've no idea if this is related - perhaps I've fried the B and the probes, although I had a 2x16 LCD display plugged in which is still working with the A+
Weird...
Weird...
Re: DS18B20 and 30-Jan firmware
Don't know if it is of any help, but this is what my PI1 Model B looked like when it had suddenly crashed (after 88+ days with no reboot) and refused to bootNikThePlumber wrote:hmm, the reason that I swapped to my A+ was that the B suddenly stopped working one day following a reboot, so because I'm logging data I just grabbed the spare A+ to try and minimise the data gap. I haven't revisited the B until today but when I investigated the B, I've found it's completely dead - won't even wake the screen up so I can't even tell if it's doing BIOS things. I put the SD card in my laptop and found my user data was OK, although I've not checked out the OS folders. I've no idea if this is related - perhaps I've fried the B and the probes, although I had a 2x16 LCD display plugged in which is still working with the A+
Weird...
http://arnholm.org/tmp/Weathercam_noboot.jpg
It complained about corrupted "group descriptors" and was just hanging with the screen as shown. I just wiped the card and reinstalled Raspbian on the same card, no problem.
My PI is a weather camera capturing an image every minute, it has done that since the beginning of September last year, you can compute how many writes that is yourself

But the original sensor problem is unrelated to the crash I had, I believe.
-
- Posts: 26
- Joined: Thu Jun 19, 2014 5:18 am
- Location: Fernie, BC, CANADA
Re: DS18B20 and 30-Jan firmware
Anyone still having issues because I am.
I have 4 x DS18B20s and have been working a prototype using a 9 month old Pi with no problems whatsoever. (3.18.7+)
I hook up to a new Pi I got last week and did the update and upgrade. Ran
and also added those 2 modules to etc/modules.
I also have:
Whatever I do I just cannot get this Pi (3.18.11+) to recognise the temp sensors. I have double and triple checked the wiring.
Anyone have anything else I can try?
Thanks
Gary
I have 4 x DS18B20s and have been working a prototype using a 9 month old Pi with no problems whatsoever. (3.18.7+)
I hook up to a new Pi I got last week and did the update and upgrade. Ran
Code: Select all
sudo modprobe w1-gpio && sudo modprobe w1_therm
I also have:
Code: Select all
dtoverlay=w1-gpio,gpiopin=4
Anyone have anything else I can try?
Thanks
Gary
-
- Posts: 42
- Joined: Wed Mar 05, 2014 3:11 pm
Re: DS18B20 and 30-Jan firmware
I am waiting on my DS18B20 . about 5 of them
Thanks for posting this useful information
Thanks for posting this useful information