Code: Select all
[email protected]:~$ dtoverlay -h w1-gpio-pullup
Name: w1-gpio-pullup
Info: Configures the w1-gpio Onewire interface module.
Use this overlay if you *do* need a GPIO to drive an external pullup.
...
Code: Select all
dtoverlay=w1-gpio
dtparam=gpiopin=24
dtparam=gpiopin=4
dtoverlay=w1-gpio,gpiopin=24,gpiopin=4
dtoverlay=w1-gpio,gpiopin=4
Code: Select all
dtc [email protected] -I dts -O dtb -o w1-gpio-2.dtbo w1-gpio-2-overlay.dts
sudo cp w1-gpio-2.dtbo /boot/overlays
Code: Select all
dtoverlay=w1-gpio,gpiopin=4
dtoverlay=w1-gpio-2,gpiopin=24
Code: Select all
sudo dtoverlay w1-gpio-2 gpiopin=24
Code: Select all
dtoverlay=w1-gpio,gpiopin=4
dtoverlay=w1-gpio,gpiopin=5
Hi and welcome to the forum.dikva wrote:I have probably too much ds18b20 hanging on a too long (40m) UTP, some of them started to behave unstable after adding 2 to the final amount of 9. I will play around to change the wiring (now its a daisy chain), but I think the solution will be to separate them on different GPIO's - now I am using only GPIO 4.
Founding this thread and your solution, I updated my RPI3 to the latest firmware and tried with:
dtoverlay=w1-gpio
dtparam=gpiopin=4
dtparam=gpiopin=17
but it didn't work. What am I doing wrong?
Code: Select all
dtparam=w1-gpio,gpiopin=4
dtparam=w1-gpio,gpiopin=17
Code: Select all
dtoverlay=w1-gpio,gpiopin=4
dtoverlay=w1-gpio,gpiopin=5
Code: Select all
dtoverlay=w1-gpio
dtparam=gpiopin=4
dtoverlay=w1-gpio
dtparam=gpiopin=5
Code: Select all
# This is wrong - it is equivalent to dtoverlay=w1-gpio,gpiopin=5
dtoverlay=w1-gpio
dtparam=gpiopin=4
dtparam=gpiopin=5
Code: Select all
dtoverlay=w1-gpio
dtparam=gpiopin=22
dtoverlay=w1-gpio
dtparam=gpiopin=23
dtoverlay=w1-gpio
dtparam=gpiopin=24
Code: Select all
[email protected]:/sys/bus/w1/devices $ ls -o
total 0
lrwxrwxrwx 1 root 0 Apr 16 00:10 10-0008028a785f -> ../../../devices/w1_bus_master2/10-0008028a785f
lrwxrwxrwx 1 root 0 Apr 16 00:10 10-0008028a8cf9 -> ../../../devices/w1_bus_master3/10-0008028a8cf9
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000451f186 -> ../../../devices/w1_bus_master1/28-00000451f186
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000452c2c7 -> ../../../devices/w1_bus_master1/28-00000452c2c7
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000452c778 -> ../../../devices/w1_bus_master1/28-00000452c778
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000452d63f -> ../../../devices/w1_bus_master1/28-00000452d63f
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000452ee23 -> ../../../devices/w1_bus_master3/28-00000452ee23
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000452efef -> ../../../devices/w1_bus_master1/28-00000452efef
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-0000045310b4 -> ../../../devices/w1_bus_master1/28-0000045310b4
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000484d5bb -> ../../../devices/w1_bus_master1/28-00000484d5bb
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000484f06f -> ../../../devices/w1_bus_master1/28-00000484f06f
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000484f396 -> ../../../devices/w1_bus_master3/28-00000484f396
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-000004851799 -> ../../../devices/w1_bus_master1/28-000004851799
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-000004853efd -> ../../../devices/w1_bus_master2/28-000004853efd
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-000004854766 -> ../../../devices/w1_bus_master2/28-000004854766
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-000004854853 -> ../../../devices/w1_bus_master2/28-000004854853
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000485637a -> ../../../devices/w1_bus_master2/28-00000485637a
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000485d487 -> ../../../devices/w1_bus_master1/28-00000485d487
lrwxrwxrwx 1 root 0 Apr 16 00:10 28-00000485d5cb -> ../../../devices/w1_bus_master3/28-00000485d5cb
lrwxrwxrwx 1 root 0 Apr 16 00:10 w1_bus_master1 -> ../../../devices/w1_bus_master1
lrwxrwxrwx 1 root 0 Apr 16 00:10 w1_bus_master2 -> ../../../devices/w1_bus_master2
lrwxrwxrwx 1 root 0 Apr 16 00:10 w1_bus_master3 -> ../../../devices/w1_bus_master3
Code: Select all
dtoverlay=w1-gpio,gpiopin=22
dtoverlay=w1-gpio,gpiopin=23
dtoverlay=w1-gpio,gpiopin=24
Code: Select all
#!/bin/sh
dtoverlay w1-gpio gpiopin=22
dtoverlay w1-gpio gpiopin=23
dtoverlay w1-gpio gpiopin=24
Code: Select all
...
+/path/to/script
+
exit 0
There is, but it doesn't contain the information we want:dmilton wrote: It does seem strange, though, that there isn't some configuration file someplace that identifies what is attached to which GPIO pin.
Code: Select all
$ sudo sh -c "cat /sys/kernel/debug/pinctrl/*.gpio/pinmux-pins"
...
pin 21 (gpio21): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 22 (gpio22): 16.onewire pinctrl-bcm2835:22 function gpio_in group gpio22
pin 23 (gpio23): 17.onewire pinctrl-bcm2835:23 function gpio_in group gpio23
pin 24 (gpio24): 18.onewire pinctrl-bcm2835:24 function gpio_in group gpio24
pin 25 (gpio25): (MUX UNCLAIMED) (GPIO UNCLAIMED)
...