Let's be systematic.
 1. You are using owserver and owfs? owhttpd?
 2. You are reading the DS2405/sensed and temperature at the same time. Is
 this required?
 3. USB?
 4. Versions?

i'm using this script to start onewire:
/etc/rc.d/ow restart

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    /usr/bin/owserver -p 1234 -d /dev/ttyS0
    /usr/bin/owhttpd -p 90 -s 127.0.0.1:1234
    ;;
  stop)
    killall owserver
    killall owhttpd
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0


i have an owhttpd interface to list onewire with browser 
and i'm using PHP library to get and put values 

the php program is something like this:


                        $pid=pcntl_fork();
                        if ($pid == -1){
                                die("Could not fork\n");
                        }elseif($pid==0){
                                // here i just read onewire and put on database 
the last read value like:
                                init("127.0.0.1:1234");
                                while (1){
                                        read database for some output
                                        put("/uncached/%ds2405 
device%/PIO",$output_value);
                                        usleep(10000); // don't have high CPU 
usage
                                }

                        }else{
                                // here i just read onewire and put on database 
the last read value like:
                                init("127.0.0.1:1234");
                                while (1){

                                        get("/uncached/%DS18S20 
device%/temperature")
                                        get("/uncached/%DS18B20 
device%/temperature")
                                        get("/uncached/%DS2405 device%/PIO")
                                        get("/uncached/%DS2405 device%/sensed")

                                        update last state on mysql database
                                        usleep(10000); // don't have high CPU 
usage

                                }
                        }


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to