Hardware Reference
In-Depth Information
Figure 11-5. 1-Wire with DS18B20 slave circuit
When things are working correctly, the bus master detects slave devices
automatically as part of its periodic scan. If the device you've attached is not showing
up within 10 seconds or so, you may want to try forcing it. You can force adding a slave
device entry as follows:
# cd /sys/bus/w1/devices/w1_bus_master1
# echo 28−0000028f6667 >w1_master_add
Upon doing this, subdirectory 28-0000028f6667 will appear, at least until the
driver gives up trying to communicate with it (the following line with the ellipsis is
abbreviated):
# ls -ltr ./28-0000028f6667
total 0
-rw-r--r-- 1 root root 4096 Jan 30 18:56 uevent
lrwxrwxrwx 1 root root 0 Jan 30 18:56 subsystem -> ../../../
bus/w1
-r--r--r-- 1 root root 4096 Jan 30 18:56 w1_slave
Drwxr-xr-x 2 root root 0 Jan 30 18:56 powerr
-r--r--r-- 1 root root 4096 Jan 30 18:56 name
-r--r--r-- 1 root root 4096 Jan 30 18:56 id
lrwxrwxrwx 1 root root 0 Jan 30 18:56 driver -> .../w1_
slave_driver
If you want to remove a slave device, you can use the w1_master_remove file. The
device will reappear in 10 seconds or so (due to a scanning period), if the device is still
physically connected to the bus.
# echo 28-0000028f6667 >w1_master_remove
 
Search WWH ::




Custom Search