|
From: Nicolas H. <nhu...@gh...> - 2003-08-29 09:49:40
|
I plan my application to have multiple little scripts that access the directory tree. Since the 1-wire is inherently unique and exclusive, I must not be able to access two devices at the same time. This is currently the case, with various impact. Here is a little test that run many (2) $t/tempC in parallel : [nhuillard@palma:devices]$ for t in 10.*; do (echo $t $(cat $t/tempC)& ); done cat: 10.26FE46000800/tempC: Invalid argument 10.26FE46000800 10.E42257000800 22.8125 [nhuillard@palma:devices]$ for t in 10.*; do (echo $t $(cat $t/tempC)& ); done cat: 10.26FE46000800/tempC: Invalid argument 10.26FE46000800 cat: 10.E42257000800/tempC: Invalid argument 10.E42257000800 [nhuillard@palma:devices]$ for t in 10.*; do (echo $t $(cat $t/tempC)& ); done cat: 10.26FE46000800/tempC: Invalid argument 10.26FE46000800 10.E42257000800 22.8125 As you can see, there is either an "Invalid argument" on one 1820, or on both. When the $t/tempC are slightly desynchronized (when I type the command on two terminals, with a longer delay), one 1820 might return a 85°C reading, indicating a wrong conversion. A mono-threaded OWFS (like OWHTTDP) might be useful. NH |