test patch for troubled USB 3 and raspberry pi users

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

test patch for troubled USB 3 and raspberry pi users

Marcus Meissner-4
Hi folks,

Could the Raspberry PI and also the USB 3 users that experience
"camera works only for one access" symptoms please try this patch:

Ciao, Marcus

Index: camlibs/ptp2/library.c
===================================================================
--- camlibs/ptp2/library.c (revision 14263)
+++ camlibs/ptp2/library.c (working copy)
@@ -1730,7 +1730,9 @@
  params = NULL;
  camera->pl = NULL;
  }
- if ((camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) {
+ /* This code hangs USB 3 devices after the first bulk image transmission.
+         * For some unknown reason. */
+ if (0 && (camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) {
  /* clear halt */
  gp_port_usb_clear_halt
  (camera->port, GP_PORT_USB_ENDPOINT_IN);

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: test patch for troubled USB 3 and raspberry pi users

Sipter Bálint
It is working with usb3.


2013/3/9 Marcus Meissner <[hidden email]>
Hi folks,

Could the Raspberry PI and also the USB 3 users that experience
"camera works only for one access" symptoms please try this patch:

Ciao, Marcus

Index: camlibs/ptp2/library.c
===================================================================
--- camlibs/ptp2/library.c      (revision 14263)
+++ camlibs/ptp2/library.c      (working copy)
@@ -1730,7 +1730,9 @@
                params = NULL;
                camera->pl = NULL;
        }
-       if ((camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) {
+       /* This code hangs USB 3 devices after the first bulk image transmission.
+         * For some unknown reason. */
+       if (0 && (camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) {
                /* clear halt */
                gp_port_usb_clear_halt
                                (camera->port, GP_PORT_USB_ENDPOINT_IN);

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: test patch for troubled USB 3 and raspberry pi users

rod.d
In reply to this post by Marcus Meissner-4
It works on the Raspberry Pi, nice work. gphoto2 still fails every now and then with:

Canon EOS Capture failed to release: Perhaps no more memory on card?
ERROR: Could not capture image.
ERROR: Could not capture.
*** Error (-3: 'Out of memory') ***

But I can live with that for now, firing a 2nd time (and many more consecutive times after that) works great.  Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: test patch for troubled USB 3 and raspberry pi users

acct0ne
In reply to this post by Marcus Meissner-4
hi i'm a newbie to gphoto and the linux system in general. this may sound stupid but how do i apply this patch to my raspberry pi. can someone please point me to the right direction? thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: test patch for troubled USB 3 and raspberry pi users

acct0ne
This post was updated on .
In reply to this post by Marcus Meissner-4
Dunno if this did it for me but it is now working on my raspberry pi with a nikon d3000 camera. I scrapped the gphoto2 install from the raspbian repo and recompiled from source (howto). before I issued  "make all", I edited the "/ptp2/library.c" file and commented the line:

        /*if ((camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) { */

and replaced it with:

        if (0 && (camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) {

thanks marcus and everyone on the project!
Reply | Threaded
Open this post in threaded view
|

Re: test patch for troubled USB 3 and raspberry pi users

Texy
In reply to this post by Marcus Meissner-4
Hi,
thanks for the patch. It has proven to work on mine, and others, raspberry pi.
What needs to be done so that it is included in the next version available for the raspberry pi community?
Thanks again,
Texy
Reply | Threaded
Open this post in threaded view
|

Re: test patch for troubled USB 3 and raspberry pi users

Marcus Meissner-4
On Mon, May 13, 2013 at 05:10:17AM -0700, Texy wrote:
> Hi,
> thanks for the patch. It has proven to work on mine, and others, raspberry
> pi.
> What needs to be done so that it is included in the next version available
> for the raspberry pi community?

I think just wait until they upgrade to 2.5.2.

Ciao, Marcus

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel