pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/58048 : gphoto2 --list-files error





El 18/3/24 a las 10:45, ea1abz%gmail.com@localhost escribió:
Number:         58048
Category:       pkg
Synopsis:       gphoto2 --list-files error
Confidential:   no
Severity:       serious
Priority:       medium
Responsible:    pkg-manager
State:          open
Class:          sw-bug
Submitter-Id:   net
Arrival-Date:   Mon Mar 18 09:45:00 +0000 2024
Originator:     Ramiro Aceves
Release:        NetBSD 10.0_RC6
Organization:
Environment:
netbsd-nuc# uname -a
NetBSD netbsd-nuc.home 10.0_RC6 NetBSD 10.0_RC6 (GENERIC) #0: Tue Mar 12 10:19:02 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Description:
Hello,

I am trying to get gphoto2 working to get some pictures from my old digital Canon EOS 350D camera but I do not know what happens.



netbsd-nuc# uname -a
NetBSD netbsd-nuc.home 10.0_RC6 NetBSD 10.0_RC6 (GENERIC) #0: Tue Mar 12 10:19:02 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64



netbsd-nuc# gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Canon EOS 350D                 usb:001,016
netbsd-nuc#


netbsd-nuc# gphoto2 --list-files

And after some time...



*** Error ***
An error occurred in the io-library ('I/O problem'): Could not query kernel driver of device.
*** Error (-7: 'I/O problem') ***

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel%lists.sourceforge.net@localhost>, please run
gphoto2 as follows:

     env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --list-files

Please make sure there is sufficient quoting around the arguments.


Issuing the suggested debug command (only the last lines, it is too long):


...
...

0.053667 gp_port_info_list_get_info (2): Getting info of entry 6 (13 available)... 0.053742 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds.
0.053747 gp_port_set_settings        (2): Setting settings...
0.053751 gp_port_info_list_get_info (2): Getting info of entry 7 (13 available)... 0.053905 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds.
0.053910 gp_port_set_settings        (2): Setting settings...
0.053919 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:001,015, (new int=0, conf=-1, alt=-1) port usb:001,015 0.053923 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes
0.053927 gp_abilities_list_detect_usb(2): Auto-detecting USB cameras...
0.054761 gp_libusb1_find_device_lib (2): Looking for USB device (vendor 0x4a9, product 0x30ef)... found. 0.105455 gp_libusb1_find_device_lib (2): Detected defaults: config 1, interface 0, altsetting 0, inep 81, outep 02, intep 83, class 06, subclass 01 0.105474 gp_abilities_list_detect_usb(2): Found 'Canon EOS 350D' (0x4a9,0x30ef)
0.105481 gp_port_free                (2): Freeing port...
0.105487 gp_port_close               (2): Closing port...
0.105560 gp_camera_set_abilities (2): Setting abilities ('Canon EOS 350D')... 0.105567 gp_setting_set (2): Setting key 'model' to value 'Canon EOS 350D' (gphoto2) 0.105573 save_settings (2): Saving 2 setting(s) to file "/root/.gphoto/settings" 0.105900 gp_port_info_list_lookup_path(2): Looking for path 'usb:001,015' (13 entries available)... 0.105909 gp_port_info_list_get_info (2): Getting info of entry 7 (13 available)... 0.105915 gp_camera_set_port_info (2): Setting port info for port 'Universal Serial Bus' at 'usb:001,015'... 0.106078 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds.
0.106083 gp_port_set_settings        (2): Setting settings...
0.106091 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:001,015, (new int=0, conf=-1, alt=-1) port usb:001,015 0.106095 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.106101 gp_setting_set (2): Setting key 'port' to value 'usb:001,015' (gphoto2) 0.106105 save_settings (2): Saving 2 setting(s) to file "/root/.gphoto/settings" 0.106438 foreach (2): Executing action 'List Files' for folder '/'.
0.106444 gp_camera_folder_list_files (2): Listing files in '/'...
0.106449 gp_camera_init              (2): Initializing camera...
0.106686 gp_libusb1_find_device_lib (2): Looking for USB device (vendor 0x4a9, product 0x30ef)... found. 0.157852 gp_libusb1_find_device_lib (2): Detected defaults: config 1, interface 0, altsetting 0, inep 81, outep 02, intep 83, class 06, subclass 01 0.157858 gp_camera_init (2): Loading '/usr/pkg/lib/libgphoto2/2.5.27/ptp2'...
0.158828 gp_port_open                (2): Opening USB port...
0.158841 gp_libusb1_open             (2): ()
0.158865 gp_port_set_error [gphoto2-port.c:1190](0): Could not query kernel driver of device.
0.158869 gp_libusb1_open             (2): claiming interface 0
47.297901 gp_libusb1_queue_interrupt_urbs [libusb1.c:717](0): 'libusb_submit_transfer (port->pl->transfers[i])' failed: Input/Output error (-1) 47.298083 gp_context_error (0): An error occurred in the io-library ('I/O problem'): Could not query kernel driver of device.
47.298124 gp_camera_free              (2): Freeing camera...
47.298128 gp_port_free                (2): Freeing port...
47.298132 gp_port_close               (2): Closing port...
47.310390 gp_filesystem_reset         (2): resetting filesystem
47.310396 gp_filesystem_lru_clear     (2): Clearing fscache LRU list...
47.310400 gp_filesystem_lru_clear     (2): fscache LRU list already empty
47.310404 delete_all_folders (2): Internally deleting all folders from '/'...
47.310408 lookup_folder               (2): Lookup folder '/'...
47.310412 lookup_folder               (2): Found! / is 0x783225f23030
47.310415 recurse_delete_folder (2): Recurse delete folder 0x783225f23030// 47.310420 delete_all_files (2): Delete all files in folder 0x783225f23030//



If you need the full output I can send it to you (my-logfile.txt).


I have tried in Debian GNU/Linux Bookworm and FreeBSD 15 and gphoto2 --list-files works just fine.


Thanks so much.
Regards.
How-To-Repeat:
Any command sent to the camera does not work. Only --auto-detect command works. --summary also fails.
Fix:
I do not know.



Hello,

Just before submitting this PR I received this hint from John D. Baker in pkgsrc-users mailing lists:

"""""""""""""""""""""""""""""""
I had a similar problem accessing a Nikon Coolpix L22. See the thread starting here:

  https://mail-index.netbsd.org/netbsd-users/2022/01/23/msg028205.html

  and the PR I filed:  pkg/56666.

  The patch to "devel/libgphoto2" posted in the PR makes it work for me.

  --
  |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
  |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD             FreeBSD
  | X  No HTML/proprietary data in email.   BSD just sits there and works!
  |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

""""""""""""""""""""""""""""


I applied the following patch to devel/libgphoto2, I rebuilt devel/ libgphoto2 and graphics/gphoto2 and worked!

--- libgphoto2_port/libusb1/libusb1.c.orig
+++ libgphoto2_port/libusb1/libusb1.c
@@ -684,6 +684,8 @@ gp_libusb1_queue_interrupt_urbs (GPPort *port)
 	unsigned int i;
 	int ret = 0;

+	return 0; /* not working yet */
+
 	/* no interrupt endpoint */
 	if (port->settings.usb.intep == -1)
 		return GP_OK;


netbsd-nuc# gphoto2 --list-files
There is no file in folder '/'.
There is no file in folder '/store_00000001'.
There is no file in folder '/store_00000001/DCIM'.
There are 4 files in folder '/store_00000001/DCIM/100CANON'.
#1     IMG_0001.CR2               rd  7925 KB image/x-canon-cr2
#2     IMG_0001.JPG               rd  1683 KB 3456x2304 image/jpeg
#3     IMG_0002.CR2               rd  7955 KB image/x-canon-cr2
#4     IMG_0002.JPG               rd  1713 KB 3456x2304 image/jpeg


Will this patch be applied in pkgsrc for general use?

Thanks
Ramiro.


Home | Main Index | Thread Index | Old Index