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 https://lists.sourceforge.net/lists/listinfo/owfs-developers ------------------------------------------------------- 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_idt77&alloc_id492&op=click _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers