Note that this is an update to Part 4 of the same story.
In the previous post I mentioned the following changes:
With a little experimentation I have determined that the first two changes must both be present for my sought after stability to be achieved. If they are not both in place we will get the following error:
This will happen at some point and probably pretty quickly (within a minute).
The fourth change does not seem to be needed for my stability purposes. I have tried with it at half the above and without it at all. The vm.min_free_kbytes argument is actually part of a pair of tweeks in the sysctl file. I have not detected any change with them in or out...but I am leaving them in at this time.
There is one other thing that I am doing that is a left over from when I was working with a webcam. The shell script that I run my Python code within is shown below:
I know, I know, it is ugly with all that running as root but let's leave that alone for now!
Note the two uvcvideo lines. Without these two lines it takes my Python script twice as long to recognize motion (from about 1 second to about 3 seconds). I guess libgphoto2 uses uvcvideo? When I compare 'top' output between the two executions I do not see a difference...but...the response time difference is very noticeable.
Lastly (but not finally), I do still get the above libphoto2 error on occasion when I am starting my script a second or third time. I might be able to solve this with a usb reset, and I do have a script to do this, but I think this confirms what I wrote in an earlier post. For now I am happy with doing a power cycle on the camera now and again though I may work on the usbreset at some point.
Finally, in my next post I will describe my scripts a little more and make them available for download. I would now but the capture script is still doing a couple weird things.