1

I have several DS18B20 sensors wired to my Raspberry Pi and wrote a python script to read them all. I've had the script running for months without a problem. Last week I performed an update and an upgrade while my script was running and the pi crashed. The SD card was corrupted and I had to build a new one and now I do not see any of the devices at /sys/bus/w1/devices. When I type ls i get nothing, not even the w1_bus_master1

I have a Raspberry Pi Model B, Revision 2.0, RAM 512 MB, Maker Sony. I am running Linux raspberrypi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux. I double checked my wiring to make sure that there are no shorts or opens. I even got a new sensor and wired it to the pi by itself with same result. Could I have fouled something up while performing the update & upgrade while the script was running? Is there a way to test the GPIO port?

thekiwi5000
  • 651
  • 4
  • 14
Diane
  • 11
  • 5

2 Answers2

2

It sounds like that you have upgraded to firmware which uses device tree. If you were not using device tree before see Firmware 3.18.x breaks I²C, SPI, audio, lirc, 1-wire (e.g. /dev/i2c-1, No such file or directory)

See http://elinux.org/R-Pi_Troubleshooting#GPIO for my method of testing the gpios.

With nothing CONNECTED to the gpios it tests that they can be read, written, and that the internal pull-ups and pull-downs are functional.

joan
  • 71,024
  • 5
  • 73
  • 106
0

It appears that the Firmware 3.18.x includes a configuration change to enable Device Tree support by default which caused my problem. Take a look at the read me file here /boot/overlays/readme. Rather than post the entire file here, here's a link.

I added device_tree= in the /boot/config.txt file as noted in the above link since I was unable to read the w1-gpio-overlay.dtb file as mentioned on line 207 of the readme file as that file appears to be a binary file.

Diane
  • 11
  • 5
  • Adding device_tree= will only be temporary reprieve. At some stage device tree will be compulsory. I'm surprised the answer I gave did not work for you. – joan Mar 14 '15 at 10:03
  • Thanks. I did try the recommend fix but I couldn't figure out how to read the overlays binary file. Perhaps I'll post a new question to see if anyone knows how to the file. – Diane Mar 15 '15 at 21:10
  • You shouldn't need to touch any binary files. You just add dtoverlay=w1-gpio-pullup,gpiopin=4 to /boot/config.txt. – joan Mar 15 '15 at 21:13
  • Thanks, I just changed it and it works. Wish I had voting privileges for you. – Diane Mar 15 '15 at 21:20