Am Dienstag, 21. Juni 2005 13:18 schrieb Alfille, Paul H.,M.D.:
> 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.
>
> ----------
> This would work, but there may be a more efficient DS9490_detect, I made
> room for the USB device handle in connection_in
> in->connin.usb.dev so we can break out the internal part of DS9490_detect
> and save re-enumerating the entire USB bus.
>
> Perhaps a fallback of re-enumerating if the simpler routine fails.
>
> Paul
>
>
In the meanwhile, I made some logs of the statistics/errors directory:

init.log: Directly after "owfs -u1 mnt/1wire"
ok1.log: After starting and stopping "test.sh"
ok2.log: After starting and stopping "test.sh" again.

So far, no errors. Now the critical ones:

on1.log: After switching the mains transformer "ON" (blinking stopped before)
on2.log: After starting and stopping "test.sh" again.

Then I did "killall owfs" and restarted "owfs -u1 mnt/1wire", start test.sh.

off1.log: After switching the mains transformer "OFF"  (blinking stopped 
before)
off2.log: After starting and stopping "test.sh" again.

off3.log is just a repetition of off2.log after killall owfs and restarting 
all again.

I hope you now can find a way to detect this kind of error and automatically 
re-initialize.

Kind regards

        Jan

Attachment: logs.tar.bz2
Description: application/tbz

Reply via email to