Am Dienstag, 21. Juni 2005 08:43 schrieb Christian Magnusson:
> I have actually also noticed some of those problems too... I have one
> of my LCD-displays in my office very close to the lamp-switch, and
> sometimes owserver has hanged at the same time as I entered the room
> and switched on the lamp and just walked through the room to get a
> screwdriver or something else. The 1-wire bus is connected to my uClinux
> board in the office too, so I have had those thoughts for some time
> that it has to be some connection between the EMC and the 1-wire
> bus stability.
>
I'm glad I'm not the only person who encountered this kind of error. I just 
thought I will either lose my credibility or my mind.


> I have never needed to remove the power supply to the 1-wire adapter
> when the problem has occurred. I have just needed to restart owserver
> and I had plans to do this automatically for a long time.
>
Yes, same for me. But it takes about 2 seconds to detect a failed owserver and 
to restart it - for local owserver. For remote owserver, things are even 
worse. It would be far better owserver wouldn't fail in this situation, but 
just re-initialize, maybe only the 1-wire, to get rid of the problem.


> It would be nice if you could look in the /bus.0/statistics/errors
> and see where the errors increase when you have problem next time.
> (Either from owhttp or owfs and connect to the failing owserver)
>
> When I have had problems, it's usually DS2480_reset_errors which
> increase every time I try to read something on the 1-wire bus.
>
Ok, I will do this in the evening.


> I think it would be safe to add a re-initialization of the 1-wire
> adapter when some of those errors occur:
>
> DS2480_reset_errors
> DS9097_reset_errors
> DS9490_reset_errors
> (and perhaps if DS2480_read_timeout is large I think...)
>
> if(DS2480_reset_errors || DS9097_reset_errors || DS9490_reset_errors) {
>   COM_close(in);
>   usleep(100000);
>   COM_open(in);
>   if ( DS2480_detect(in) ) {
>     if ( DS9097_detect(in) ) {
>       ret = -ENODEV;
>     }
>   }
> }
>
> Something like this would probably be enough to make a reset of the
> adapter when the 1-wire bus fails.
>
I'm willing to dig into owlib to make up the necessary functions if someone 
guides me. Then I can try out if it helps.

Kind regards

        Jan


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to