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
PTP Device Busy on second capture and download for EOS 1200D #2 + slow Jessie #30
Comments
did you try the libgphoto2 2.5.9 version? should show the versions. If you run the cvommand with a debug trace it will show where the delays happens gphoto2 --debug --debug-logfile=logfile.txt --capture-image-and-download |
ok, did the debug command. The output is a 35MB file :-). Do you want me to put it here? Based on what I can see from the file there are 200ms delays when read/write happens to the camera. I will make the same debug command on the wheezy image and try to compare. About my question regarding the file I couldn't find. Well, I used gphoto-updater.sh to update to 2.5.9. Means, I don't have those files on my computer apparently. May be I messed up my system. How do I remove gphoto2 and libgphoto cleanly? |
as you did, you can check it yourself, it is probably happening in the first part before the larger data parts gets tansferred. the initial column in the logfile is seconds. there the area around big jumps to around 1.5 or so is interesting, you could cut off the rest afterwards. if you used gphoto2 updater you should have the current one, it will give you a 2.5.9 version for both libgphoto2 and gphoto2. There is not much of a documentation. but basically you download the tarballs, unpack them, then run ./configure --prefix=/usr (might need more options to configure) |
I need your help... I am going crazy..... I spend almost 3days installing/deinstalling gphoto2 (2.5.4, 2.5.8, 2.5.9, 2.5.9.1 using gphoto-updater) on vanilla versions of raspian. Both jessie and wheezy. I have no success in capture-image-and-download. It randomly fails. sometimes after 3times working fine sometimes after just one try. The first try seems to work fine but than it fails eventually. capture-preview works fine. Even more strange: A Canon 760D works perfectly. I only see these problem on a canon eos1200d What do I need to supply to you so that you have a chance to figure out what causes the problem? I made the following observation: When execute the command --capture-image-and-download and the autofocus of the camera starts trying to find a focus the command will finish nicely. But when I execute the command and nothing happens on the camera after some time the Error "PTP device busy" comes up. Canon EOS Full-Press failed (0x2019: PTP Device Busy) |
the code waits for successful focusing, and errors out if that does not happen. it should however not get into Busy state. can you capture logs of such a failed capture? it should be kind of short logfile then i again tested the same code with my EOS 100D and I do not see the busyness problem. |
it seems like it doesn't reach the state of trying to focus when it fails. It probably get stuck before. As I said, the code works fine for the 760D as well. Just curios, but maybe it is something related to the 4digit canon cameras only as they have cheaper chips implemented. :-) tomorrow I'll try again to give you a debug log file. However I don't think this will be of big success as I couldn't force the cam to fail when --debug was executed. Just asking: will the --debug flag slow down the --capture-image-and-download process? |
yes, there is some focusing trouble that leads to follow up problems. it will slow it down a bit, as it will write the logdata to disk |
...well, in my particular application I wouldn't even need the focusing. because I have the camera in "manual focus" :-) |
that you did not write earlier. I added code to git to handle manual focus without a 2 second delay, but I am not sure it will help more of your case |
okay, here is an interesting one. I try to get some more |
Thanks for the new code. I'll give it a try tomorrow. I wasn't insisting on a working version by excluding autofocus because the problem then still remains for others. |
okay, here is another interesting one. as you can see from the logfile, the command eventually finished but with a massive 5.5s delay. From 2.2s to 7.8s. I'll keep posting strange events that occur under --debug conditions. most of the time it takes between 4.5 and 7s until the command has been fully executed. Is that a normal behavior? As far as I can tell there is no background activity going on and no other program is running. |
FYI: I have your new code running but I couldn't see any difference in behavior... |
hi, The first call of c.capture_image() always fails on the1200d. But consecutive calls always succeed. Not sure if this is a pointer for you. |
There is a 5.6 seconds stop in the middle of a command in logfile_2.txt: 1.937177 ptp_usb_getresp (2): Reading PTP_OC 0x9116 (PTP_OC_CANON_EOS_GetEvent) response... 2.138397 ptp_usb_sendreq (2): Sending PTP_OC 0x9116 (PTP_OC_CANON_EOS_GetEvent) request... this is a camera side issue I think, not sure what the camera does at that time. would focusing take so long? |
Hi, Also in my case i am trying to use a the canon 1200D together with a gphoto2. Which also results in the same error as Benjamin7785 is experiencing. Canon EOS Full-Press failed (0x2019: PTP Device Busy) I get this error quite random, sometimes after taking 3 pictures successfully, sometimes after 1 and sometimes after 10. The command i use is the following "gphoto2 --capture-image-and-download" The log file you can find here Thanks! |
i am still at loss how this is caused. I had a small fix added to current git, which might help. can you try current git? |
I compiled the latest git, but still the same issue. *** Error *** If you want i send you our 1200D? |
i did some tests in the meantime. the device busy messages appear here when there is no focus achieved the camera seems to always recover from it so far , the issue does not persists |
In my case i use manual focus, so you would think he is not waiting for a focus lock. 1 on 4 times there is no picture taken because of the device busy error. So when you get an error and no picture is taken i just send "gphoto2 --capture-image-and-download" again, this time the chance is big it will take a picture. So in your case it always takes an picture? |
I compiled the latest git again. After taking 5 pictures successfully i got this error again. *** Error *** |
Today i did a test with a version of libgphoto2 from before the 1200D got supported version 2.5.1 I don't know if this is helping you. |
@benvb to which version are you refering to? |
Have the same problem with 2.5.4/2.5.10/2.5.11 on RP3 with Raspbian Jessie on a 1200D. |
after couple hours to find a solution, bellow my conclusion. gphoto2 --set-config /main/actions/manualfocusdrive=0 It's work! Or try to put the camera lens Autofocus in manual for avoid the calculation by the camera .. |
I'm trying to get a Canon EOS T6 (1300D) to capture reliably in manual focus & exposure mode regardless of wether there's anything in focus in the frame. I'm using the current release from python on OS X and the camera seems to become unresponsive after one capture, if nothing is in focus. The code works reliably as long as there's something to focus on. DEBUG:gphoto2:(camera_canon_eos_capture) focusing - read event type 3 The issue may be timing-related, because if i run gphoto2 --shell --debug, the problem will occur, but if i run gphoto2 --shell, it works OK. I'm not all that familiar with PTP, but in manual focus mode, the focus loop will exit after just one round, so I suppose that could leave some confusing events in the queue from the failed focusing? (And the result from focusing might take longer because there's nothing to focus on?) I have also tested this functionality in DarkTable, which uses libgphoto2, and I can't make it fail there. Then again, that program is C code and they seem to be installing custom event handlers for PTP, so the timing & event handling is probably completely different. |
I managed to write python code to work around the problems. It's really just a simplified version of the C code with the half-press removed, because I was only interested in not touching the focus at all before capture. For me, this code does exactly what I want. The only weird thing is that it currently doesn't work unless I do the viewfinder toggle before the first capture (something probably isn't initialized right). I have seen a lot of people ask about software-controlled focus and in writing this code, I incorporated that into it as well.
|
We're using the python & gphoto based software that I wrote in our production now. The code is running on Ubuntu on PCs. Our production team has found that it's nearly unusable on Canon Rebel T5 (1200D) cameras due to a long delay in downloading the photos (about 10 seconds), but works really well on Rebel T3 and T6 cameras. We have a whole bunch of T5s that we can't use right now because of this. Other than the issues with the T5 cameras, they are really happy with the new software, so many thanks to everyone who has worked on gphoto. |
Hi.
I know this error has been seen before, but what exactly is the fix for it?.
#13
Do I have to manually edit a file? sry, not an expert..... Where do I find the file?
I tried both the 2.5.8 and 2.5.9 (also 2.5.9.1) gphoto2 version. Because I thought the fix might have been implemented since then.
Moreover, I have one Raspberry Pi with an Raspbian wheezy image and one Pi with an Raspbian Jessie image. What I see is that on the Whezzy image it takes about 200ms from the time the command "gphoto2 --capture-image-and-download" is executed to the time the camera reacts. That is a fast respond. BUT on the Jessie image the same command takes about 1500ms until the camera reacts. What is going on there? Anyidea?
Thanks in advance,
Ben
The text was updated successfully, but these errors were encountered: