Hello,
I just wanted to let you know that your code compiles fine with cygwin. At one point I decided to only compile with ptp2 so I don't know about the other camera module (but they seem to compile fine too) I also had to add a call to usb_set_configuration before usb_claim_interface in libgphoto2_port, because that's a requirement of libusb-win32. I was able to get --capture-preview as well as --capture-image to work with my Nikon D7000 via PTP. Also piggyphoto (a ctypes python binding to libgphoto2) seems to work, after some minor adjustments. I used a recent version(1.2.2.0) of libusb-win32, not the one provided in the cygwin repository. If there's interest I'll try to provide more details and a patch for the usb_set_configuration call Best regards, Michael ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
Hi Michael,
I'm interested in getting the gphoto2 working in cygwin. And currently I cannot compile the libgphoto2. It passed the configure command successfully, but cannot when excuting the second step "make". It came up with 2 errors: Error makefile 854: Colon expected Error makefile 942: Colon expected *** 2 errors during make *** Sincing compiling gphoto2 requires installing the libgphoto2 in the first place, could you please give me some detailed information on how to do this? Thanks in advance! Jack
|
In reply to this post by Michael-612
I have compiled gphoto2 successfully under Cygwin and can run the resulting binary. Everything looks good except for the fact that when I run auto-detect it doesn't find any cameras. I have a D7000 in PTP mode connected. Could the modification you mention below have anything to do with this problem? Any help will be greatly appreciated!
|
On Fri, Apr 29, 2011 at 07:59:35AM -0700, whitebrianc wrote:
> > I have compiled gphoto2 successfully under Cygwin and can run the resulting > binary. Everything looks good except for the fact that when I run > auto-detect it doesn't find any cameras. I have a D7000 in PTP mode > connected. Could the modification you mention below have anything to do > with this problem? Any help will be greatly appreciated! Run "gphoto2 --version" and see if it reports usb support first. If yes, run gphoto2 --list-ports to see if it sees any ports. Ciao, Marcus ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
Thanks for the reply. Here is the info you requested:
> $ /usr/local/gphoto2/v2.4.11/bin/gphoto2 --version > gphoto2 2.4.11 > > Copyright (c) 2000-2011 Lutz Mueller and others > > gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may > redistribute copies of gphoto2 under the terms of the GNU General Public > License. For more information about these matters, see the files named > COPYING. > > This version of gphoto2 is using the following software versions and > options: > gphoto2 2.4.11 gcc, popt(m), exif, no cdk, no aa, > jpeg, readline > > libgphoto2 2.4.11 gcc, ltdl, no EXIF > libgphoto2_port 0.8.0 gcc, ltdl, USB, serial without locking > $ /usr/local/gphoto2/v2.4.11/bin/gphoto2 --list-ports > Devices found: 2 > Path Description > -------------------------------------------------------------- > ptpip: PTP/IP Connection > usb: Universal Serial Bus It seems to be seeing the USB ports. Brian On 4/29/2011 12:14 PM, Marcus Meissner wrote: > On Fri, Apr 29, 2011 at 07:59:35AM -0700, whitebrianc wrote: >> I have compiled gphoto2 successfully under Cygwin and can run the resulting >> binary. Everything looks good except for the fact that when I run >> auto-detect it doesn't find any cameras. I have a D7000 in PTP mode >> connected. Could the modification you mention below have anything to do >> with this problem? Any help will be greatly appreciated! > Run "gphoto2 --version" and see if it reports usb support first. > > If yes, run gphoto2 --list-ports to see if it sees any ports. > > Ciao, Marcus ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
On Fri, Apr 29, 2011 at 04:50:09PM -0400, Brian White wrote:
> Thanks for the reply. Here is the info you requested: > > $ /usr/local/gphoto2/v2.4.11/bin/gphoto2 --version > > gphoto2 2.4.11 > > > > Copyright (c) 2000-2011 Lutz Mueller and others > > > > gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may > > redistribute copies of gphoto2 under the terms of the GNU General Public > > License. For more information about these matters, see the files named > > COPYING. > > > > This version of gphoto2 is using the following software versions and > > options: > > gphoto2 2.4.11 gcc, popt(m), exif, no cdk, no aa, > > jpeg, readline > > > > libgphoto2 2.4.11 gcc, ltdl, no EXIF > > libgphoto2_port 0.8.0 gcc, ltdl, USB, serial without locking > and > > > $ /usr/local/gphoto2/v2.4.11/bin/gphoto2 --list-ports > > Devices found: 2 > > Path Description > > -------------------------------------------------------------- > > ptpip: PTP/IP Connection > > usb: Universal Serial Bus > It seems to be seeing the USB ports. Can you run gphoto2 --auto-detect --debug --debug-logfile=xx.log and post xx.log? Ciao, Marcus ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
Here is the result of running the command and I will upload the log file.
$ /usr/local/gphoto2/v2.4.11/bin/gphoto2 --auto-detect --debug --debug-logfile= gphoto2_auto-detect.log Model Port ---------------------------------------------------------- Brian gphoto2_auto-detect.log
|
On Fri, Apr 29, 2011 at 10:11:10AM -0700, whitebrianc wrote:
> > Here is the result of running the command and I will upload the log file. > > $ /usr/local/gphoto2/v2.4.11/bin/gphoto2 --auto-detect --debug > --debug-logfile= > gphoto2_auto-detect.log > Model Port > ---------------------------------------------------------- > > Brian > http://old.nabble.com/file/p31507275/gphoto2_auto-detect.log > gphoto2_auto-detect.log There are no USB ports exposed by libusb-win32, not even hubs. Is the kernel driver of libusb-win32 loaded? Ciao, Marcus ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
Do you mean the driver in the Windows native environment? I am using
the libusb-win32 as distributed by Cygwin since the version was newer than the one you put in your original post. There doesn't seem to be anything analogous to lsmod under Cygwin so how would I check to see if the libusb-win32 kernel driver is loaded? Once again thanks for the help. Brian On 4/29/2011 1:36 PM, Marcus Meissner wrote: > On Fri, Apr 29, 2011 at 10:11:10AM -0700, whitebrianc wrote: >> Here is the result of running the command and I will upload the log file. >> >> $ /usr/local/gphoto2/v2.4.11/bin/gphoto2 --auto-detect --debug >> --debug-logfile= >> gphoto2_auto-detect.log >> Model Port >> ---------------------------------------------------------- >> >> Brian >> http://old.nabble.com/file/p31507275/gphoto2_auto-detect.log >> gphoto2_auto-detect.log > There are no USB ports exposed by libusb-win32, not even hubs. > > Is the kernel driver of libusb-win32 loaded? > > Ciao, Marcus ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
Sorry. i just realized I was missing the '0' before the '12' in the version number offered by Cygwin. I am now going to build the latest version of libusb-win32 and then rebuild gphoto2. I'll let you know what happens. Sorry about the confusion.
|
When compiling gphoto2 2.5.8 under Cygwin I have encountered a small but troublesome bug in libgphoto2_port's configure script that prevents USB iolib to be build when libusb-0.1 is used for compilation. No problem occurs when libusb-1.0 is configured - USB1 iolib is successfuly build.
So it looks like configure's block starting at line 16509 shall be similar to the block starting at line 16889. Comparing these blocks it's plain to see that there's one line missing between line 16893 and line 16894. My solution was to add the missing line to make USB iolib compilation feasible, replacing case "$host" in *-*-mingw* | *-*-cygwin* | *-*-msvc* ) ;; *) with case "$host" in *-*-mingw* | *-*-cygwin* | *-*-msvc* ) IOLIB_LIST="$IOLIB_LIST usb" ;; *) |
On Sat, Oct 17, 2015 at 02:11:47AM -0700, Michal wrote:
> When compiling gphoto2 2.5.8 under Cygwin I have encountered a small but > troublesome bug in libgphoto2_port's configure script that prevents USB > iolib to be build when libusb-0.1 is used for compilation. No problem occurs > when libusb-1.0 is configured - USB1 iolib is successfuly build. > > So it looks like configure's block starting at line 16509 shall be similar > to the block starting at line 16889. Comparing these blocks it's plain to > see that there's one line missing between line 16893 and line 16894. > > My solution was to add the missing line to make USB iolib compilation > feasible, replacing > case "$host" in > *-*-mingw* | *-*-cygwin* | *-*-msvc* ) > ;; > *) > > with > > case "$host" in > *-*-mingw* | *-*-cygwin* | *-*-msvc* ) > IOLIB_LIST="$IOLIB_LIST usb" > ;; > *) Well, you saw the comment above it? dnl Windows itself has usb.h we mis-detect so don't set IOLIB_LIST Done by Daniel (commit d6eb91770d706052308a3b721559d09933f1f198), perhaps he has more details. Ciao, Marcus ------------------------------------------------------------------------------ _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
Haven't seen that comment, sorry. And it's not even located "above it", it's in configure.ac (it's only configure itself that I reviewed). I don't think I saw that comment during or after configure execution. Configure scripts for both gphoto2 and libgphoto2 gives me short summary with impression that USB is properly configured for the build. And both packages built successfully.
Only having complete gphoto2 2.4 I was able to spot missing usb.dll file in 2.5.8 version. Went through all included documentation related to Cygwin build and haven't seen any mention that one need to update configure script manually. With brief configure script analysis I think you can't enable USB iolib build with command line parameter. My understanding of intentional disabling USB iolib build by development team is to protect the user from build errors that come from bad environment configuration. For Cygwin it's quite straightforward to isolate Cygwin from Win environment by setting "set path=" in the first line of cygwin.bat included in Cygwin itself. In result it's not possible for Cygwin to mis-detect usb.h. Spent plenty many time to solve that problem and you're telling me it's a feature ... :) |
In reply to this post by Marcus Meissner-4
On Sat, Oct 17, 2015 at 11:57:28AM +0200, Marcus Meissner wrote:
> On Sat, Oct 17, 2015 at 02:11:47AM -0700, Michal wrote: > > When compiling gphoto2 2.5.8 under Cygwin I have encountered a small but > > troublesome bug in libgphoto2_port's configure script that prevents USB > > iolib to be build when libusb-0.1 is used for compilation. No problem occurs > > when libusb-1.0 is configured - USB1 iolib is successfuly build. > > > > So it looks like configure's block starting at line 16509 shall be similar > > to the block starting at line 16889. Comparing these blocks it's plain to > > see that there's one line missing between line 16893 and line 16894. > > > > My solution was to add the missing line to make USB iolib compilation > > feasible, replacing > > case "$host" in > > *-*-mingw* | *-*-cygwin* | *-*-msvc* ) > > ;; > > *) > > > > with > > > > case "$host" in > > *-*-mingw* | *-*-cygwin* | *-*-msvc* ) > > IOLIB_LIST="$IOLIB_LIST usb" > > ;; > > *) > > Well, you saw the comment above it? > > dnl Windows itself has usb.h we mis-detect so don't set IOLIB_LIST > > Done by Daniel (commit d6eb91770d706052308a3b721559d09933f1f198), perhaps he has more details. Pretty much as the comment says - I found we mis-detected the wrong header file. NB, I was building with Mingw, not Cygwin, so it is entirely possible there's differences that need to be taken into account for Mingw vs Cygwin. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| ------------------------------------------------------------------------------ _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
In reply to this post by Michal
Hi,
well, I added the line now. btw, usb1 is prefered to be used these days. Ciao, Marcus On Sat, Oct 17, 2015 at 02:11:47AM -0700, Michal wrote: > When compiling gphoto2 2.5.8 under Cygwin I have encountered a small but > troublesome bug in libgphoto2_port's configure script that prevents USB > iolib to be build when libusb-0.1 is used for compilation. No problem occurs > when libusb-1.0 is configured - USB1 iolib is successfuly build. > > So it looks like configure's block starting at line 16509 shall be similar > to the block starting at line 16889. Comparing these blocks it's plain to > see that there's one line missing between line 16893 and line 16894. > > My solution was to add the missing line to make USB iolib compilation > feasible, replacing > case "$host" in > *-*-mingw* | *-*-cygwin* | *-*-msvc* ) > ;; > *) > > with > > case "$host" in > *-*-mingw* | *-*-cygwin* | *-*-msvc* ) > IOLIB_LIST="$IOLIB_LIST usb" > ;; > *) > > > > > -- > View this message in context: http://gphoto-software.10949.n7.nabble.com/Successful-cygwin-compilation-tp9022p15727.html > Sent from the gphoto-devel mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > _______________________________________________ > Gphoto-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gphoto-devel > ------------------------------------------------------------------------------ _______________________________________________ Gphoto-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gphoto-devel |
Hi all,
I also built the latest version (2.2.5.14) of libphoto2 and gphoto2 in cygwin 64-bit. I could install all other dependencies from the cygwin repository. My camera (Sony Nex-6) also gets recognized in MTP mode: ---------------------------------------------------------- $ gphoto2 --auto-detect Model Port ---------------------------------------------------------- Sony NEX-6 usb:002,013 ---------------------------------------------------------- However if I try to list the files I get an error: ---------------------------------------------------------- $ env LANG=C gphoto2 --debug --debug-logfile=my_logfile.txt --list-files *** Error *** An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (No such process). Make sure no other program (unknown libgphoto2 using program) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device. *** Error (-53: 'Could not claim the USB device') *** ---------------------------------------------------------- The debug log file can be found here: https://pastebin.com/6rFnS4nG In the log file I can spot these lines: ---------------------------------------------------------- 8.803883 gp_port_set_error [gphoto2-port.c:1190](0): Could not query kernel driver of device. 8.803883 gp_libusb1_open (2): claiming interface 0 8.804883 gp_libusb1_open [libusb1.c:414](0): 'libusb_claim_interface (port->pl->dh, port->settings.usb.interface)' failed: Access denied (insufficient permissions) (-3) 8.804883 gp_port_set_error [gphoto2-port.c:1190](0): Could not claim interface 0 (No such process). Make sure no other program (unknown libgphoto2 using program) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device. 8.804883 gp_context_error (0): An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (No such process). Make sure no other program (unknown libgphoto2 using program) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device. ---------------------------------------------------------- However the --list-files command is working in mass storage mode. Is it intended behaviour? Regards, Timo |
This post has NOT been accepted by the mailing list yet.
Hello,
I also successfully built gphoto 2.2.5.14 with Cygwin 64bit, separate builds for libusb0.1 and libusb1.0. However I could only take few photos with capture-image-and-download parameter, then "PTP error: couldn't download image" started to show up. After taking about a dozen of photos "PTP error" occurs permanently. The camera (Nikon D5200) is triggered and takes a photo, but it hangs with "Connecting to PC" message when the image is about to be transferred over USB. It hangs even when gphoto2 process is killed and I have to turn it off and on to become responsive. This is very strange and both builds behave exactly the same: first 4-5 photos are taken without a problem, then PTP errors show up and after about ca 12 photos the camera hangs permanently. It looks like one shot compilation and I cannot use gphoto anymore after 12 photos. So I thought using 64bit Cygwin is the problem, but there's another problem with 32bit Cygwin: libgphoto builds successfully, gphoto compiles successfully but it won't link - libtool complains there's /usr/lib/libintl.la missing. This file is missing indeed, but it's also missing in 64bit which builds successfully. libtool complains even if "internationalization" is turned off (./configure --disable-nls). Basically even makefiles for 64 and 32bit are the same so I don't know where this libintl.la dependency comes from. Any ideas how to solve any of the issues ? Regards Michal |
This post has NOT been accepted by the mailing list yet.
Hello,
What a nightmare. I almost fall into depression trying to solve the problem. I have excluded HW problem as I had exactly the same configuration (USB camera + USB embedded controller) perfrectly working on the same PC under Ubuntu. Today I discovered gphoto is working properly when connected to one of my PC's USB slots but not when connected to other two. However it stopped working (camera is triggered but PTP error when trying to download image) after pluging in the controller to the other slots. So I used USB hub (with external power supply) to have both devices connected to the "proper USB slot". And finally everything works: gphoto captures and downloads images, the controller talks. Just when I run my script (send a command to the controller then take a photo and so on) the camera keeps disconnecting and connecting every second after first command is send to the controller. When I stop the script the camera stays connected, everything works, gphoto captures and downloads images, controllers talks. And that's ridiculous. At this point my only idea was to change Nikon's USB cable and ... this solved all the problems. But still it's hard to understand why was it working under Ubuntu. Anyway I can confirm all variations of gphoto2 2.5.8/2.5.14 libusb0/libusb1 32/64bit are working well under Win7. Simple workaround for missing libintl.la file in 32bit Cygwin is to copy an existing one (like libiconv.la) and update it with libintl libraries which are already there in Cygwin. Best regards Michal |
Free forum by Nabble | Edit this page |