-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
increase USB timeout #475
increase USB timeout #475
Conversation
Doing a bunch of USB disk IO was killin' the capture on my rPi. Bumping up to 1500ms allowed capture to run successfully while copying lots of data.
ZWO suggests setting timeout to (2 * exposure) + 500 ms, which is what version 0.8 uses. How do we know (2 * exposure) + 1500 is the right number? The ZWO developer who's looking into the ASI_ERROR_TIMEOUT issue asked if we've ever tried -1, which waits forever. |
Yeah, I saw their recommendation in the comments. Still captures cause bus resets on every exposure, which might be what they're trying to compensate for. Using the old (video) based capture algorithm, I'd get one bus reset transitioning across day or night modes, and no impact from heavy bus activity.
We can try some experiments; maybe exposure_time+5s might be a good approach which doesn't create unreasonably long timeouts for long exposures, but does leave time for heavy USB traffic. Imagine someone connects an ASI6200MM to a pi 0W? That could be sending 62Mpx 16-bit raw images over USB2. I doubt anyone would do such a silly thing, but the timeout code should be robust enough to handle it. What about |
Chris, ZWO describes their cameras as having two modes: "snap" mode where you take a single picture and where auto-* isn't supported, and "video" mode where the camera is constantly taking pictures. AllSky uses "video" mode and produces the USB reset error in kern.log whenever we turn on video mode by calling ASIStartVideoCapture(). Version 0.7 did that once and 0.8 (with "newexposure" on) does it for every picture. Why it does it at all I'm not sure, but ZWO support is aware of it. Personally, I think it's a bug. |
Yes, usb resets do seem buggy. I haven't fired up my 3d printer to print some more round tuits, but after I get a few I might look at what the library is doing. Because I also don't trust the SDK to not do broken things, I'm reluctant to go with an unlimited timeout. If something goes wrong, I'd prefer to have a bounded operation time so that allsky doesn't hang. I don't much care if we boost 500ms to 1.5 or 5s, just that by turning it up a bit I avoid daytime capture timeouts under heavy USB load - which tells me that 500.3ms is too short (was taking 150us exposures) under the circumstances. 1500.3ms was long enough. Gettin' off topic, I quite like the histogram based daytime exposure controls and would love to see it available for night exposures too. To my eyes, it produces better/more useful images than ZWO's auto-exposure. |
I'm all for adding 5 seconds (5000 ms) to the timeout. |
Thomas, this looks good to me. |
Doing a bunch of USB disk IO was killin' the capture on my rPi. Bumping
up to 1500ms allowed capture to run successfully while copying lots of
data.