Pin already claimed by gpioinfo

Basic Information:

Printer Model: Voron Switchwire
MCU / Printerboard: SKR MINI E3 V3

Describe your issue:

I’m trying to set up a DS18B20 with klipper, on a Raspberry pi 2. I enabled the necessary under raspi-config, set the pin parameters in /boot/config.txt, fidgeted around a bit because the internal pullup resistor of the RPi isn’t suitable and I had to solder in a pullup resistor to the dataline. In the end, I could read the DS18B20 in linux (moonraker + fluidd) with a simple Python script.

When I try to read the sensor with klipper, it reports the probe as 0C. The manual (RPi_microcontroller.html) says that gpioinfo should have the DS18B20 pin as unclaimed, but it is not unclaimed actually:
" line 4: “GPIO_GCLK” “onewire@4” output active-high [used open-drain]"
I’m not too sure where to look now. I don’t think any other process would access the sensor.
When I try something like “rmmod w1_therm”, then klipper actually reports the correct temperature for a brief moment.

Any pointers?
klippy (31).log (518.5 KB)

Hello @teus !

Would be possible if you would share the klippy.log as it was asked for.

okay, its uploaded in my post

The DS18B20 module in Klipper only reads the Linux sysfs entry of the device as provided by the Kernel. The gpioinfo command does not play a role here, also not if the pin is already claimed or not. In fact it needs to show up.

What does:

ls /sys/bus/w1/devices
cat /sys/bus/w1/devices/YOUR_DS_HERE/w1_slave

yield?

Output should look something like:

crc = 5e YES
t=20435

$ ls /sys/bus/w1/devices
28-c6a69d1e64ff w1_bus_master1

pi@raspberrypi:~ $ cat /sys/bus/w1/devices/28-c6a69d1e64ff/w1_slave
5e 01 55 00 7f ff 0c 10 6c : crc=6c YES
5e 01 55 00 7f ff 0c 10 6c t=21875

Well, this looks good, so temperature should pop up in Klipper.
As stated before, Klipper does no black magic here but just grabs t=21875, divides it by 1000 and shows it.
Just make sure that your Python script or anything else is not holding a lock on /sys/bus/w1/devices/28-c6a69d1e64ff/w1_slave (maybe reboot your RPi)

" $ sudo lsof /sys/bus/w1/devices/28-c6a69d1e64ff/w1_slave" turns up empty.
I tried rebooting, doesn’t help.

Strange indeed. Should work as system-wise things seem to be working. Sorry, no more ideas.