Hi again, Even my friend Thomas who use owfs and temploggerd had an enumerated USB adapter 2 days ago, and he doesn't have any light switches or anything else close to the adapter. I think I finally have solved the problem now.
I made some updates at work on a Fedora core 4 with a 2.6.11 kernel. It worked pretty good, but when I tested the code on my server at home with 2.4.22 I had some hard USB errors and even some kernel panics. It seems like it's impossible to handle an usb-device with timeouts and read-errors in a good way, so I have to close the usb-handle and re-open it every time I get some communication problem. It doesn't take much time at all, but it's not necessary to do that on the 2.6.11 kernel. If the adapter couldn't be found, then owfs will continue with scanning the usb-bus every time until it's found again. Anyway, the code need some more cleanup, but it works very good on my two servers now.... You can disconnect a device and plugin it somewhere else if you want, and it will be reconnected and used like before. The 81 or 01 device is saved as a unique identifier to the adapter. If those aren't found (if user have a single DS2490 chip), the last found 1-wire device is saved as an identifier. /Christian On Fri, 2005-07-01 at 17:50, Alfille, Paul H.,M.D. wrote: > This works for newer DS9490s, the older ones used an 01 device. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Christian Magnusson > Sent: Friday, July 01, 2005 5:26 AM > To: owfs-developers@lists.sourceforge.net > Cc: Paul Alfille; [EMAIL PROTECTED] > Subject: Re: [Owfs-developers] More on "Hanging" Problems > > > > I have done some testing with it, and have managed to reconnect the > adapter even if it's unplugged manually. It's perhaps not a very > nice solution, but it works at least. > > Right now it detects the 1-wire adapters as usual at startup. At the > first 1-wire scan, the serial number of the ds1420 chip (81.0000000000) > is saved in the connin.usb struct. > > If the adapter fails at *_reset(), owserver tries to close the > usb-handle, and reopen it as I did before (it solves most situations). > > If it's not possible to reopen the usb device, then I assume the USB > adapter is unplugged (manually or by some EMP problem). It will then do > a full usb device-scan (which is done at startup). If an USB adapter is > found, I make a 1-wire scan on it. If the 1-wire device 81.0000000000 is > found, I use this usb-adapter in the future. It works even if you unplug > it and reconnect it to some other usb-hub. > > It works pretty good for me, and I assume it will solve your problem > too when it's a small glitch and the kernel thinks it's disconnected. > > I will cleanup the source and checkin the changes during the day. It > will be nice to hear if it works for you too after that. > > Paul, do you have any comments about it? > > /Christian > ------------------------------------------------------- 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 Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers