host icon indicating copy to clipboard operation
host copied to clipboard

onewire-list doesn't work as expected.

Open gsexton opened this issue 5 months ago • 3 comments

I'm trying to play with a one-wire DS18B20. I'm building the onewire-list program.

On my Raspberry Pi 5, I've added:

dtoverlay=w1-gpio,gpiopin=21

to the /boot/firmware/config.txt file. Doing a directory of /sys/bus/w1 shows:

root@raspberrypi:/sys/bus/w1# ls -alh
total 0
drwxr-xr-x  4 root root   0 Sep  8 19:54 .
drwxr-xr-x 35 root root   0 Sep  8 19:54 ..
drwxr-xr-x  2 root root   0 Sep  8 19:54 devices
drwxr-xr-x  4 root root   0 Sep  8 19:54 drivers
-rw-r--r--  1 root root 16K Sep  8 19:56 drivers_autoprobe
--w-------  1 root root 16K Sep  8 19:56 drivers_probe
--w-------  1 root root 16K Sep  8 19:54 uevent
root@raspberrypi:/sys/bus/w1# cd devices/28-5c61d4455dfa
root@raspberrypi:/sys/bus/w1/devices/28-5c61d4455dfa# ls
alarms  conv_time  driver  eeprom_cmd  ext_power  features  hwmon  id  name  power  resolution  subsystem  temperature  uevent  w1_slave
root@raspberrypi:/sys/bus/w1/devices/28-5c61d4455dfa# cat temperature 
23000
root@raspberrypi:/sys/bus/w1/devices/28-5c61d4455dfa# cat name
28-5c61d4455dfa

When I run the onewire-list test binary on the device, it shows the length of the returned buses as 0.

I've instrumented onewirereg.Register() and can see it's not getting called.

It looks like whatever is supposed to register the one wire busses in host isn't working. Can you give me an idea of what's going wrong?

Thanks.

gsexton avatar Sep 09 '24 02:09 gsexton