From: Matekk <ma...@te...> - 2013-07-13 12:11:49
|
Hi, I'm having some pretty random trouble with my program.. The camera sometimes disconnects or just returns errors - either one of these: "Could not lock the device"(60) and "Unknown model"(105) in syslog i can see this happening at the same time: MOSTLY: usb 2-1.2: >usbfs: USBDEVFS_CONTROL failed cmd program rqt 33 rq 102 len 0 ret -71 ONE OCCURENCE: usb 2-1.2: >usbfs: USBDEVFS_CONTROL failed cmd program rqt 33 rq 102 len 0 ret -108 and there's a bunch of these messages. The camera usually recovers after a few seconds, and it keeps on working normally. Sometimes a system restart is needed. What could be the cause of this and how could I address it? Please help! Thank you, Matt -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421.html Sent from the gphoto-devel mailing list archive at Nabble.com. |
From: Marcus M. <mei...@su...> - 2013-07-13 12:21:47
|
On Sat, Jul 13, 2013 at 05:11:42AM -0700, Matekk wrote: > Hi, > I'm having some pretty random trouble with my program.. The camera sometimes > disconnects or just returns errors - either one of these: "Could not lock > the device"(60) and "Unknown model"(105) > > in syslog i can see this happening at the same time: > > MOSTLY: usb 2-1.2: >usbfs: USBDEVFS_CONTROL failed cmd program rqt 33 rq 102 > len 0 ret -71 > > ONE OCCURENCE: usb 2-1.2: >usbfs: USBDEVFS_CONTROL failed cmd program rqt 33 > rq 102 len 0 ret -108 > > > and there's a bunch of these messages. The camera usually recovers after a > few seconds, and it keeps on working normally. Sometimes a system restart is > needed. > > What could be the cause of this and how could I address it? > Please help! Such random disconnects / reconnects usually indicate hardware related problems. Check if the USB cable is good and correctly plugged in, or try anohter USB port on your machine. Ciao, Marcus |
From: Matekk <ma...@te...> - 2013-07-21 17:47:50
|
What about if a camera returns -1 Unknown error when trying to capture preview, and then proceeds to correctly capture full photos. :/ Thanks! Matt -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421p13455.html Sent from the gphoto-devel mailing list archive at Nabble.com. |
From: Marcus M. <ma...@je...> - 2013-07-21 19:02:41
|
On Sun, Jul 21, 2013 at 10:47:42AM -0700, Matekk wrote: > What about if a camera returns -1 Unknown error when trying to capture > preview, and then proceeds to correctly capture full photos. :/ really hard to say without looking at the debugtrace. Ciao, Marcus |
From: Matekk <ma...@te...> - 2013-07-21 19:25:25
|
How can I supply it? Unfortunately I'm not using gphoto2 directly, just libgphoto in my own program. Thanks! Matt -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421p13457.html Sent from the gphoto-devel mailing list archive at Nabble.com. |
From: Marcus M. <ma...@je...> - 2013-07-21 19:30:23
|
On Sun, Jul 21, 2013 at 12:25:15PM -0700, Matekk wrote: > How can I supply it? Unfortunately I'm not using gphoto2 directly, just > libgphoto in my own program. Define a function similar to this: static void errordumper(GPLogLevel level, const char *domain, const char *str, void *data) { printf("%s\n", str); } and on setup of your code do: gp_log_add_func(GP_LOG_DATA, errordumper, NULL); (GP_LOG_DATA to get all including data, GP_LOG_ERROR just for the errors... the full data log would be helpful here.) Ciao, Marcus |
From: Matekk <ma...@te...> - 2013-07-24 07:11:19
|
In the attachment there are two parts of a log with some occurring errors. Everything was fine after reset. This is a machine (a kiosk) that is functioning in the street, and we have some strange issues that could indicate perhaps an EMI problem, but I hope you can check out the logs and maybe see something interesting. Not as important but this happened two days ago as well: [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Opening USB port... [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: gp_port_usb_open() [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Device has driver 'usbfs' attached. [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Camera is already in use. [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: An error occurred in the io-library ('Could not lock the device'): Camera is already in use. [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Exiting camera ('Canon EOS 1100D')... [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Closing port... along with this (from syslog): Jul 23 10:10:57 pckrk kernel: [ 656.157646] usb 2-1.2: >usbfs: USBDEVFS_CONTROL failed cmd postcard rqt 33 rq 102 len 0 ret -71 Jul 23 10:10:57 pckrk kernel: [ 656.165641] usb 2-1.2: >usbfs: USBDEVFS_CONTROL failed cmd postcard rqt 33 rq 102 len 0 ret -71 Jul 23 10:10:57 pckrk kernel: [ 656.204918] usb 2-1.2: >USB disconnect, device number 16 Jul 23 10:10:58 pckrk kernel: [ 656.404652] usb 2-1.2: >new high-speed USB device number 17 using ehci_hcd Thank you very much! Matt gphoto_err-1_23072013_1.txt <http://gphoto.10949.n7.nabble.com/file/n13467/gphoto_err-1_23072013_1.txt> gphoto_err-1_23072013_2.txt <http://gphoto.10949.n7.nabble.com/file/n13467/gphoto_err-1_23072013_2.txt> -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421p13467.html Sent from the gphoto-devel mailing list archive at Nabble.com. |
From: Matekk <ma...@te...> - 2013-07-24 12:04:19
|
The camera functions in the manner that capture_image works fine, but capture_preview just opens and closes the mirror, with no image returned. Here is today's log of the same error... gphoto_err-1_24072013_1.txt <http://gphoto.10949.n7.nabble.com/file/n13468/gphoto_err-1_24072013_1.txt> -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421p13468.html Sent from the gphoto-devel mailing list archive at Nabble.com. |
From: Marcus M. <ma...@je...> - 2013-07-24 20:52:53
|
On Wed, Jul 24, 2013 at 05:04:12AM -0700, Matekk wrote: > The camera functions in the manner that capture_image works fine, but > capture_preview just opens and closes the mirror, with no image returned. > > Here is today's log of the same error... > gphoto_err-1_24072013_1.txt > <http://gphoto.10949.n7.nabble.com/file/n13468/gphoto_err-1_24072013_1.txt> Ok, I found for 2.5.2 this: ------------------------------------------------------------------------ r14263 | marcusmeissner | 2013-03-02 19:55:08 +0100 (Sat, 02 Mar 2013) | 4 lines - send camera wake ups during preview - increase usleep from 1000 -> 1300 as my EOS 1000D run into out of time issues Which is basically this patch: Index: camlibs/ptp2/library.c =================================================================== --- camlibs/ptp2/library.c (revision 14262) +++ camlibs/ptp2/library.c (revision 14263) @@ -1909,8 +1915,7 @@ return GP_ERROR; } else { if ((ret == 0xa102) || (ret == PTP_RC_DeviceBusy)) { /* means "not there yet" ... so wait */ - /* leave some compute time for the camera */ - usleep (1000); + usleep (1300); continue; } gp_log (GP_LOG_ERROR,"ptp2_capture_eos_preview", "get_viewfinder_image failed: 0x%x", ret); The wait was too short apparently. This helped on my EOS 1000D. Ciao, Marcus |
From: Matekk <ma...@te...> - 2013-07-27 11:52:00
|
Hi, Unfortuately I'm still getting the same error, at times even a restart doesn't solve it. Here is today's log, althought I guess it's the same as the previous ones, if you can please take a look: gphoto_err-1_27072013_1.txt <http://gphoto.10949.n7.nabble.com/file/n13475/gphoto_err-1_27072013_1.txt> I'm playing around with sleep numbers - currently set to 1350.. but I don't think that's the whole issue... I could try upgrading to 2.5.2 if there's anything more patched for ptp2 ? The kiosk is stationed on a public place, so maybe this is a power related issue as well, although the capture_image works fine.. Yesterday though, Linux decided to disconnect the camera device for 10 minutes, don't know what that was about, the only thing I have are the syslogs and the gphoto log saying -105 error... Ever had such issue? Thanks! Matt -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421p13475.html Sent from the gphoto-devel mailing list archive at Nabble.com. |
From: Marcus M. <ma...@je...> - 2013-07-24 20:55:53
|
On Wed, Jul 24, 2013 at 12:11:09AM -0700, Matekk wrote: > In the attachment there are two parts of a log with some occurring errors. > Everything was fine after reset. > > This is a machine (a kiosk) that is functioning in the street, and we have > some strange issues that could indicate perhaps an EMI problem, but I hope > you can check out the logs and maybe see something interesting. > > > > Not as important but this happened two days ago as well: > > [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Opening USB port... > [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: gp_port_usb_open() > [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Device has driver 'usbfs' > attached. > [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Camera is already in use. > [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: An error occurred in the > io-library ('Could not lock the device'): Camera is already in use. > [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Exiting camera ('Canon EOS > 1100D')... > [Tue, 23 Jul 2013 10:10:02 +0200] GPHOTO: Closing port... > > along with this (from syslog): > > Jul 23 10:10:57 pckrk kernel: [ 656.157646] usb 2-1.2: >usbfs: > USBDEVFS_CONTROL failed cmd postcard rqt 33 rq 102 len 0 ret -71 > Jul 23 10:10:57 pckrk kernel: [ 656.165641] usb 2-1.2: >usbfs: > USBDEVFS_CONTROL failed cmd postcard rqt 33 rq 102 len 0 ret -71 > Jul 23 10:10:57 pckrk kernel: [ 656.204918] usb 2-1.2: >USB disconnect, > device number 16 > Jul 23 10:10:58 pckrk kernel: [ 656.404652] usb 2-1.2: >new high-speed USB > device number 17 using ehci_hcd > > > > Thank you very much! > Matt > > gphoto_err-1_23072013_1.txt > <http://gphoto.10949.n7.nabble.com/file/n13467/gphoto_err-1_23072013_1.txt> > gphoto_err-1_23072013_2.txt > <http://gphoto.10949.n7.nabble.com/file/n13467/gphoto_err-1_23072013_2.txt> These are also both the same issues as the other mail, viewfinder capture is failing for some reason and we should try to increase the timeout to 1300. Ciao, Marcus |
From: Matekk <ma...@te...> - 2013-07-26 12:16:01
|
Thank you! But I think it still happens just not as much, and gets recovered without restart... I'll try increasing the sleep to 1500 and see how that goes Cheers, Matt -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421p13473.html Sent from the gphoto-devel mailing list archive at Nabble.com. |
From: Matekk <ma...@te...> - 2013-07-28 12:39:12
|
It seems as though some value gets stuck in the camera and the capture_preview stops working. Turning the camera off and on again resets this issue. Still not sure why it happens. Cheers Matt -- View this message in context: http://gphoto.10949.n7.nabble.com/Random-camera-errors-disconnects-tp13421p13479.html Sent from the gphoto-devel mailing list archive at Nabble.com. |