gphoto2 icon indicating copy to clipboard operation
gphoto2 copied to clipboard

Can not capture image when camera keeping power on all the time during computer startup

Open seaquel opened this issue 4 years ago • 4 comments

Thanks to gphoto2. Thanks to Marcus, could you please help me on this situation. This problem only occurs in this particular situation. I am not sure whether it is a bug, I search for a while but I don't know how to fix it without touching the power knob of camera.

Describe the bug The camera can not capture image is the case of : (the camera is turned on before the computer start) AND (the camera is keeping power on). If the camera is turned off and on again, capturing image is normal and everything goes fine. I can not touch the camera power knob in the photo-taking job so I have to keep the camera power knob on all the time. I have a AC power adapter as a faking battery to keep power on, but the genuine battery has the same problem.

Name the camera gphoto2 --auto-detect gives: Sony Alpha-A7R III (Control) usb:003,002

libgphoto2 and gphoto2 version gphoto2 2.5.23 libghoto2 2.5.23 libghoto2_port 0.12.0

OS and software environments OS: Ubuntu 19.10 and ArchLinux 2019.12 No gvfs related process in background (X window not installed or reboot into multi-user.target so X window not started) lsusb gives: Bus 003 Device 002: ID 054c:0c33 Sony Corp. ILCE-7RM3

To Reproduce

  1. power off computer and camera
  2. Connect USB to computer
  3. Turn on camera (never turn off in the following steps)
  4. turn on pc
  5. gphoto2 --auto-detect can find the camera
  6. lsusb can find the camera
  7. gphoto2 --capture-image gives: *** Error *** PTP Timeout *** Error *** An error occurred in the io-library('Timeout reading from or writing to the port'): No error description available ERROR: Could not capture image ERROR: Could not capture

If its a camera misbehavior, attach debug output using --debug --debug-logfile=debug.log (if considered useful). "gphoto2 --capture-image --debug --debuglogfiles=debug.log" gives: 0.000697 main (2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST: 0.000795 main (2): gphoto2 2.5.23 0.000817 main (2): gphoto2 has been compiled with the following options: 0.000836 main (2): + gcc (C compiler used) 0.000853 main (2): + popt (mandatory, for handling command-line parameters) 0.000869 main (2): + exif (for displaying EXIF information) 0.000884 main (2): + no cdk (for accessing configuration options) 0.000900 main (2): + no aa (for displaying live previews) 0.000916 main (2): + jpeg (for displaying live previews in JPEG format) 0.000932 main (2): + readline (for easy navigation in the shell) 0.000958 main (2): libgphoto2 2.5.23 0.000978 main (2): libgphoto2 has been compiled with the following options: 0.001004 main (2): + all camlibs 0.001022 main (2): + gcc (C compiler used) 0.001038 main (2): + ltdl (for portable loading of camlibs) 0.001054 main (2): + EXIF (for special handling of EXIF files) 0.001078 main (2): libgphoto2_port 0.12.0 0.001098 main (2): libgphoto2_port has been compiled with the following options: 0.001116 main (2): + iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi 0.001132 main (2): + gcc (C compiler used) 0.001148 main (2): + ltdl (for portable loading of iolibs) 0.001164 main (2): + USB (libusb1, for USB cameras) 0.001180 main (2): + serial (for serial cameras) 0.001196 main (2): + no resmgr (serial port access and locking) 0.001211 main (2): + no ttylock (serial port locking) 0.001227 main (2): + no lockdev (serial port locking) 0.001243 main (2): CAMLIBS env var not set, using compile-time default instead 0.001258 main (2): IOLIBS env var not set, using compile-time default instead 0.001274 main (2): invoked with following arguments: 0.001290 main (2): --capture-image 0.001305 main (2): --debug 0.001321 main (2): --debug-logfile=4.txt 0.001379 load_settings (2): Creating gphoto config directory ('/home/els/.gphoto') 0.001491 load_settings (2): Loading settings from file '/home/els/.gphoto/settings'. 0.001588 main (2): The user has not specified both a model and a port. Try to figure them out. 0.001611 gp_port_info_list_load (2): Using ltdl to load io-drivers from '/usr/lib/libgphoto2_port/0.12.0'... 0.001731 foreach_func (2): Called for filename '/usr/lib/libgphoto2_port/0.12.0/disk'. 0.002137 gp_port_library_list (2): found fstab fsname /dev/sda2 0.002179 gp_port_library_list (2): found fstab fsname /dev/sda1 0.002223 gp_port_library_list (2): found fstab fsname /swapfile 0.002393 gp_port_library_list (2): found mtab fsname proc 0.002417 gp_port_library_list (2): found mtab fsname sys 0.002440 gp_port_library_list (2): found mtab fsname dev 0.002487 gp_port_library_list (2): found mtab fsname run 0.002533 gp_port_library_list (2): found mtab fsname efivarfs 0.002581 gp_port_library_list (2): found mtab fsname /dev/sda2 0.002618 gp_port_library_list (2): found mtab fsname securityfs 0.002641 gp_port_library_list (2): found mtab fsname tmpfs 0.002687 gp_port_library_list (2): found mtab fsname devpts 0.002710 gp_port_library_list (2): found mtab fsname tmpfs 0.002761 gp_port_library_list (2): found mtab fsname cgroup2 0.002784 gp_port_library_list (2): found mtab fsname cgroup 0.002831 gp_port_library_list (2): found mtab fsname pstore 0.002876 gp_port_library_list (2): found mtab fsname none 0.002920 gp_port_library_list (2): found mtab fsname cgroup 0.002998 gp_port_library_list (2): found mtab fsname cgroup 0.003022 gp_port_library_list (2): found mtab fsname cgroup 0.003044 gp_port_library_list (2): found mtab fsname cgroup 0.003066 gp_port_library_list (2): found mtab fsname cgroup 0.003088 gp_port_library_list (2): found mtab fsname cgroup 0.003110 gp_port_library_list (2): found mtab fsname cgroup 0.003131 gp_port_library_list (2): found mtab fsname cgroup 0.003153 gp_port_library_list (2): found mtab fsname cgroup 0.003175 gp_port_library_list (2): found mtab fsname cgroup 0.003197 gp_port_library_list (2): found mtab fsname cgroup 0.003219 gp_port_library_list (2): found mtab fsname systemd-1 0.003241 gp_port_library_list (2): found mtab fsname mqueue 0.003290 gp_port_library_list (2): found mtab fsname hugetlbfs 0.003339 gp_port_library_list (2): found mtab fsname debugfs 0.003384 gp_port_library_list (2): found mtab fsname configfs 0.003436 gp_port_library_list (2): found mtab fsname tmpfs 0.003483 gp_port_library_list (2): found mtab fsname /dev/sda1 0.003524 gp_port_library_list (2): found mtab fsname tmpfs 0.003628 foreach_func (2): Loaded '' ('^disk:') from '/usr/lib/libgphoto2_port/0.12.0/disk'. 0.003648 foreach_func (2): Called for filename '/usr/lib/libgphoto2_port/0.12.0/ptpip'. 0.004020 foreach_func (2): Loaded 'PTP/IP Connection' ('ptpip:') from '/usr/lib/libgphoto2_port/0.12.0/ptpip'. 0.004045 foreach_func (2): Loaded '' ('^ptpip:') from '/usr/lib/libgphoto2_port/0.12.0/ptpip'. 0.004063 foreach_func (2): Called for filename '/usr/lib/libgphoto2_port/0.12.0/serial'. 0.004675 foreach_func (2): Loaded 'Serial Port 0' ('serial:/dev/ttyS0') from '/usr/lib/libgphoto2_port/0.12.0/serial'. 0.004696 foreach_func (2): Loaded 'Serial Port 1' ('serial:/dev/ttyS1') from '/usr/lib/libgphoto2_port/0.12.0/serial'. 0.004715 foreach_func (2): Loaded 'Serial Port 2' ('serial:/dev/ttyS2') from '/usr/lib/libgphoto2_port/0.12.0/serial'. 0.004733 foreach_func (2): Loaded 'Serial Port 3' ('serial:/dev/ttyS3') from '/usr/lib/libgphoto2_port/0.12.0/serial'. 0.004751 foreach_func (2): Loaded 'Serial Port Device' ('serial:') from '/usr/lib/libgphoto2_port/0.12.0/serial'. 0.004769 foreach_func (2): Loaded '' ('^serial:') from '/usr/lib/libgphoto2_port/0.12.0/serial'. 0.004787 foreach_func (2): Called for filename '/usr/lib/libgphoto2_port/0.12.0/usb1'. 0.023427 foreach_func (2): Loaded '' ('^usb:') from '/usr/lib/libgphoto2_port/0.12.0/usb1'. 0.023469 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:003,002') from '/usr/lib/libgphoto2_port/0.12.0/usb1'. 0.023489 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:002,003') from '/usr/lib/libgphoto2_port/0.12.0/usb1'. 0.023506 foreach_func (2): Called for filename '/usr/lib/libgphoto2_port/0.12.0/usbdiskdirect'. 0.024017 foreach_func (2): Called for filename '/usr/lib/libgphoto2_port/0.12.0/usbscsi'. 0.024328 gp_port_info_list_count (2): Counting entries (12 available)... 0.024349 gp_port_info_list_count (2): 8 regular entries available. 0.024388 gp_abilities_list_load_dir (2): Using ltdl to load camera libraries from '/usr/lib/libgphoto2/2.5.23'... 0.024507 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/ax203'. 0.024538 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/canon'. 0.024556 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/digigr8'. 0.024574 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/dimagev'. 0.024591 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/directory'. 0.024633 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/jl2005a'. 0.024652 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/jl2005c'. 0.024670 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/kodak_dc240'. 0.024687 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/mars'. 0.024705 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/pentax'. 0.024723 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/ptp2'. 0.024740 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/sierra'. 0.024758 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/sonix'. 0.024776 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/sq905'. 0.024793 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/st2205'. 0.024811 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/topfield'. 0.024828 foreach_func (2): Found '/usr/lib/libgphoto2/2.5.23/tp6801'. 0.024849 gp_abilities_list_load_dir (2): Found 17 camera drivers. 0.108509 gp_port_info_list_count (2): Counting entries (12 available)... 0.108564 gp_port_info_list_count (2): 8 regular entries available. 0.108582 gp_port_new (2): Creating new device... 0.108607 gp_port_info_list_get_info (2): Getting info of entry 0 (12 available)... 0.108930 gp_port_set_settings (2): Setting settings... 0.108952 gp_port_info_list_get_info (2): Getting info of entry 1 (12 available)... 0.109237 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds. 0.109257 gp_port_set_settings (2): Setting settings... 0.109276 gp_port_info_list_get_info (2): Getting info of entry 2 (12 available)... 0.109529 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds. 0.109548 gp_port_set_settings (2): Setting settings... 0.109567 gp_port_info_list_get_info (2): Getting info of entry 3 (12 available)... 0.109821 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds. 0.109840 gp_port_set_settings (2): Setting settings... 0.109859 gp_port_info_list_get_info (2): Getting info of entry 4 (12 available)... 0.110112 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds. 0.110131 gp_port_set_settings (2): Setting settings... 0.110149 gp_port_info_list_get_info (2): Getting info of entry 5 (12 available)... 0.110401 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds. 0.110420 gp_port_set_settings (2): Setting settings... 0.110438 gp_port_info_list_get_info (2): Getting info of entry 6 (12 available)... 0.123011 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds. 0.123051 gp_port_set_settings (2): Setting settings... 0.123086 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:003,002, (new int=0, conf=-1, alt=-1) port usb:003,002 0.123104 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.123122 gp_abilities_list_detect_usb(2): Auto-detecting USB cameras... 0.124219 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x29a, subclass, 0xffffffff, protocol 0xffffffff)... 0.124677 gp_libusb1_find_device_lib (2): Looking for USB device (vendor 0x54c, product 0xc33)... found. 0.124840 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.124862 gp_abilities_list_detect_usb(2): Found 'Sony Alpha-A7R III (Control)' (0x54c,0xc33) 0.124922 gp_port_info_list_get_info (2): Getting info of entry 7 (12 available)... 0.137833 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds. 0.137875 gp_port_set_settings (2): Setting settings... 0.137912 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:002,003, (new int=0, conf=-1, alt=-1) port usb:002,003 0.137930 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.137974 gp_abilities_list_detect_usb(2): Auto-detecting USB cameras... 0.139030 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x29a, subclass, 0xffffffff, protocol 0xffffffff)... 0.139828 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x6, subclass, 0x1, protocol 0x1)... 0.139907 gp_port_free (2): Freeing port... 0.139928 gp_port_close (2): Closing port... 0.140647 gp_camera_set_abilities (2): Setting abilities ('Sony Alpha-A7R III (Control)')... 0.140686 gp_setting_set (2): Setting key 'model' to value 'Sony Alpha-A7R III (Control)' (gphoto2) 0.140708 save_settings (2): Saving 3 setting(s) to file "/home/els/.gphoto/settings" 0.141044 gp_port_info_list_lookup_path(2): Looking for path 'usb:003,002' (12 entries available)... 0.141065 gp_port_info_list_get_info (2): Getting info of entry 6 (12 available)... 0.141111 gp_camera_set_port_info (2): Setting port info for port 'Universal Serial Bus' at 'usb:003,002'... 0.153577 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds. 0.153618 gp_port_set_settings (2): Setting settings... 0.153654 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:003,002, (new int=0, conf=-1, alt=-1) port usb:003,002 0.153672 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.153692 gp_setting_set (2): Setting key 'port' to value 'usb:003,002' (gphoto2) 0.153713 save_settings (2): Saving 3 setting(s) to file "/home/els/.gphoto/settings" 0.154105 gp_camera_init (2): Initializing camera... 0.154153 gp_libusb1_find_device_lib (2): Looking for USB device (vendor 0x54c, product 0xc33)... found. 0.154286 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.154306 gp_camera_init (2): Loading '/usr/lib/libgphoto2/2.5.23/ptp2'... 0.157052 gp_port_open (2): Opening USB port... 0.157094 gp_libusb1_open (2): () 0.157170 gp_libusb1_open (2): claiming interface 0 0.159691 camera_init (2): maxpacketsize 1024 0.159727 gp_port_set_timeout (2): Setting port timeout to 8000 milliseconds. 0.159755 ptp (2): PTP: Opening session 0.159869 ptp_usb_sendreq (2): Sending PTP_OC 0x1002 (Open session) (0x1) request... 0.159888 gp_port_write (3): Writing 16 = 0x10 bytes to port... 8.160241 gp_libusb1_write libusb1.c:595: 'libusb_bulk_transfer (port->pl->dh, port->settings.usb.outep, (unsigned char*)bytes, size, &curwritten, port->timeout)' failed: Operation timed out (-7) 8.160403 gp_port_write gphoto2-port.c:406: Writing 16 = 0x10 bytes to port failed: Timeout reading from or writing to the port (-10) 8.160504 ptp_usb_sendreq [usb.c:109] (0): PTP_OC 0x1002 sending req failed: Timeout reading from or writing to the port (-10) 8.160680 camera_init library.c:8474: 'ptp_opensession (params, sessionid)' failed: PTP Timeout (0x02fa) 8.160746 ptp (2): PTP: Opening session 8.160837 ptp_usb_sendreq (2): Sending PTP_OC 0x1002 (Open session) (0x1) request... 8.160911 gp_port_write (3): Writing 16 = 0x10 bytes to port... 16.161285 gp_libusb1_write libusb1.c:595: 'libusb_bulk_transfer (port->pl->dh, port->settings.usb.outep, (unsigned char*)bytes, size, &curwritten, port->timeout)' failed: Operation timed out (-7) 16.161484 gp_port_write gphoto2-port.c:406: Writing 16 = 0x10 bytes to port failed: Timeout reading from or writing to the port (-10) 16.161810 ptp_usb_sendreq [usb.c:109] (0): PTP_OC 0x1002 sending req failed: Timeout reading from or writing to the port (-10) 16.161898 camera_init library.c:8474: 'ptp_opensession (params, sessionid)' failed: PTP Timeout (0x02fa) 16.161962 ptp (2): PTP: Opening session 16.162126 ptp_usb_sendreq (2): Sending PTP_OC 0x1002 (Open session) (0x1) request... 16.162196 gp_port_write (3): Writing 16 = 0x10 bytes to port... 24.162563 gp_libusb1_write libusb1.c:595: 'libusb_bulk_transfer (port->pl->dh, port->settings.usb.outep, (unsigned char*)bytes, size, &curwritten, port->timeout)' failed: Operation timed out (-7) 24.162715 gp_port_write gphoto2-port.c:406: Writing 16 = 0x10 bytes to port failed: Timeout reading from or writing to the port (-10) 24.162814 ptp_usb_sendreq [usb.c:109] (0): PTP_OC 0x1002 sending req failed: Timeout reading from or writing to the port (-10) 24.162897 camera_init library.c:8474: 'ptp_opensession (params, sessionid)' failed: PTP Timeout (0x02fa) 24.162972 camera_init library.c:8502: 'ret' failed: 'PTP Timeout' (0x02fa) 24.163055 gp_context_error (0): PTP Timeout 24.182271 gp_port_close (2): Closing port... 24.183430 _close_async_interrupts (2): canceling transfer 0:0x559f81d2cf50 (status 0) 24.183557 _close_async_interrupts (2): canceling transfer 1:0x559f81cfcf60 (status 0) 24.183605 _close_async_interrupts (2): canceling transfer 2:0x559f81d2a8d0 (status 0) 24.183664 _close_async_interrupts (2): canceling transfer 3:0x559f81cf9140 (status 0) 24.183723 _close_async_interrupts (2): canceling transfer 4:0x559f81cf1280 (status 0) 24.183781 _close_async_interrupts (2): canceling transfer 5:0x559f81d27810 (status 0) 24.183855 _close_async_interrupts (2): canceling transfer 6:0x559f81d28070 (status 0) 24.183916 _close_async_interrupts (2): canceling transfer 7:0x559f81d362c0 (status 0) 24.183975 _close_async_interrupts (2): canceling transfer 8:0x559f81cf5130 (status 0) 24.184033 _close_async_interrupts (2): canceling transfer 9:0x559f81cfd7d0 (status 0) 24.184105 _cb_irq (2): 0x559f81d2cf50 with status 3 24.184127 _cb_irq (2): Transfer 0x559f81d2cf50 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184155 _cb_irq (2): 0x559f81cfcf60 with status 3 24.184175 _cb_irq (2): Transfer 0x559f81cfcf60 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184202 _cb_irq (2): 0x559f81d2a8d0 with status 3 24.184222 _cb_irq (2): Transfer 0x559f81d2a8d0 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184248 _cb_irq (2): 0x559f81cf9140 with status 3 24.184268 _cb_irq (2): Transfer 0x559f81cf9140 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184295 _cb_irq (2): 0x559f81cf1280 with status 3 24.184315 _cb_irq (2): Transfer 0x559f81cf1280 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184341 _cb_irq (2): 0x559f81d27810 with status 3 24.184361 _cb_irq (2): Transfer 0x559f81d27810 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184387 _cb_irq (2): 0x559f81d28070 with status 3 24.184407 _cb_irq (2): Transfer 0x559f81d28070 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184433 _cb_irq (2): 0x559f81d362c0 with status 3 24.184453 _cb_irq (2): Transfer 0x559f81d362c0 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184479 _cb_irq (2): 0x559f81cf5130 with status 3 24.184499 _cb_irq (2): Transfer 0x559f81cf5130 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.184526 _cb_irq (2): 0x559f81cfd7d0 with status 3 24.184546 _cb_irq (2): Transfer 0x559f81cfd7d0 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 24.185046 gp_context_error (0): An error occurred in the io-library ('Timeout reading from or writing to the port'): No error description available 24.203019 gp_camera_init (2): Initializing camera... 24.203078 gp_libusb1_find_device_lib (2): Looking for USB device (vendor 0x54c, product 0xc33)... found. 24.203233 gp_libusb1_find_device_lib (2): Detected defaults: config 1, interface 0, altsetting 0, inep 81, outep 02, intep 83, class 06, subclass 01 24.203282 gp_camera_init (2): Loading '/usr/lib/libgphoto2/2.5.23/ptp2'... 24.206038 gp_port_open (2): Opening USB port... 24.206086 gp_libusb1_open (2): () 24.206160 gp_libusb1_open (2): claiming interface 0 24.206434 camera_init (2): maxpacketsize 1024 24.206468 gp_port_set_timeout (2): Setting port timeout to 8000 milliseconds. 24.206496 ptp (2): PTP: Opening session 24.206521 ptp_usb_sendreq (2): Sending PTP_OC 0x1002 (Open session) (0x1) request... 24.206540 gp_port_write (3): Writing 16 = 0x10 bytes to port... 32.206883 gp_libusb1_write libusb1.c:595: 'libusb_bulk_transfer (port->pl->dh, port->settings.usb.outep, (unsigned char*)bytes, size, &curwritten, port->timeout)' failed: Operation timed out (-7) 32.207091 gp_port_write gphoto2-port.c:406: Writing 16 = 0x10 bytes to port failed: Timeout reading from or writing to the port (-10) 32.207477 ptp_usb_sendreq [usb.c:109] (0): PTP_OC 0x1002 sending req failed: Timeout reading from or writing to the port (-10) 32.207578 camera_init library.c:8474: 'ptp_opensession (params, sessionid)' failed: PTP Timeout (0x02fa) 32.207646 ptp (2): PTP: Opening session 32.207733 ptp_usb_sendreq (2): Sending PTP_OC 0x1002 (Open session) (0x1) request... 32.207807 gp_port_write (3): Writing 16 = 0x10 bytes to port... 40.208178 gp_libusb1_write libusb1.c:595: 'libusb_bulk_transfer (port->pl->dh, port->settings.usb.outep, (unsigned char*)bytes, size, &curwritten, port->timeout)' failed: Operation timed out (-7) 40.208331 gp_port_write gphoto2-port.c:406: Writing 16 = 0x10 bytes to port failed: Timeout reading from or writing to the port (-10) 40.208429 ptp_usb_sendreq [usb.c:109] (0): PTP_OC 0x1002 sending req failed: Timeout reading from or writing to the port (-10) 40.208514 camera_init library.c:8474: 'ptp_opensession (params, sessionid)' failed: PTP Timeout (0x02fa) 40.208578 ptp (2): PTP: Opening session 40.208666 ptp_usb_sendreq (2): Sending PTP_OC 0x1002 (Open session) (0x1) request... 40.208737 gp_port_write (3): Writing 16 = 0x10 bytes to port... 48.209114 gp_libusb1_write libusb1.c:595: 'libusb_bulk_transfer (port->pl->dh, port->settings.usb.outep, (unsigned char*)bytes, size, &curwritten, port->timeout)' failed: Operation timed out (-7) 48.209283 gp_port_write gphoto2-port.c:406: Writing 16 = 0x10 bytes to port failed: Timeout reading from or writing to the port (-10) 48.209381 ptp_usb_sendreq [usb.c:109] (0): PTP_OC 0x1002 sending req failed: Timeout reading from or writing to the port (-10) 48.209465 camera_init library.c:8474: 'ptp_opensession (params, sessionid)' failed: PTP Timeout (0x02fa) 48.209539 camera_init library.c:8502: 'ret' failed: 'PTP Timeout' (0x02fa) 48.209620 gp_context_error (0): PTP Timeout 48.229631 gp_port_close (2): Closing port... 48.230731 _close_async_interrupts (2): canceling transfer 0:0x559f81d2cf50 (status 0) 48.230784 _close_async_interrupts (2): canceling transfer 1:0x559f81cf9140 (status 0) 48.230844 _close_async_interrupts (2): canceling transfer 2:0x559f81cf1280 (status 0) 48.230903 _close_async_interrupts (2): canceling transfer 3:0x559f81d27810 (status 0) 48.230961 _close_async_interrupts (2): canceling transfer 4:0x559f81d28070 (status 0) 48.231019 _close_async_interrupts (2): canceling transfer 5:0x559f81d362c0 (status 0) 48.231077 _close_async_interrupts (2): canceling transfer 6:0x559f81cfd7d0 (status 0) 48.231135 _close_async_interrupts (2): canceling transfer 7:0x559f81d28ed0 (status 0) 48.231193 _close_async_interrupts (2): canceling transfer 8:0x559f81cf5130 (status 0) 48.231252 _close_async_interrupts (2): canceling transfer 9:0x559f81d25fe0 (status 0) 48.231323 _cb_irq (2): 0x559f81d2cf50 with status 3 48.231371 _cb_irq (2): Transfer 0x559f81d2cf50 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231398 _cb_irq (2): 0x559f81cf9140 with status 3 48.231417 _cb_irq (2): Transfer 0x559f81cf9140 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231442 _cb_irq (2): 0x559f81cf1280 with status 3 48.231461 _cb_irq (2): Transfer 0x559f81cf1280 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231486 _cb_irq (2): 0x559f81d27810 with status 3 48.231505 _cb_irq (2): Transfer 0x559f81d27810 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231530 _cb_irq (2): 0x559f81d28070 with status 3 48.231549 _cb_irq (2): Transfer 0x559f81d28070 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231574 _cb_irq (2): 0x559f81d362c0 with status 3 48.231593 _cb_irq (2): Transfer 0x559f81d362c0 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231618 _cb_irq (2): 0x559f81cfd7d0 with status 3 48.231636 _cb_irq (2): Transfer 0x559f81cfd7d0 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231661 _cb_irq (2): 0x559f81d28ed0 with status 3 48.231680 _cb_irq (2): Transfer 0x559f81d28ed0 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231705 _cb_irq (2): 0x559f81cf5130 with status 3 48.231724 _cb_irq (2): Transfer 0x559f81cf5130 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.231749 _cb_irq (2): 0x559f81d25fe0 with status 3 48.231768 _cb_irq (2): Transfer 0x559f81d25fe0 should be in LIBUSB_TRANSFER_COMPLETED, but is 3! 48.232265 gp_context_error (0): An error occurred in the io-library ('Timeout reading from or writing to the port'): No error description available 48.242649 gp_camera_free (2): Freeing camera... 48.242679 gp_port_free (2): Freeing port... 48.242697 gp_port_close (2): Closing port... 48.243365 gp_filesystem_reset (2): resetting filesystem 48.243385 gp_filesystem_lru_clear (2): Clearing fscache LRU list... 48.243402 gp_filesystem_lru_clear (2): fscache LRU list already empty 48.243421 delete_all_folders (2): Internally deleting all folders from '/'... 48.243438 lookup_folder (2): Lookup folder '/'... 48.243455 lookup_folder (2): Found! / is 0x559f81cef800 48.243472 recurse_delete_folder (2): Recurse delete folder 0x559f81cef800//

Thanks, seaquel

seaquel avatar Jan 03 '20 01:01 seaquel

The trace itself shows the camera is not reacting (timing out) to even the first commands.

Soemthing might be causing this if it is enabled during boot, but not clear what.

Can you try if "gphoto2 --reset" helps as workaround?

msmeissn avatar Jan 05 '20 08:01 msmeissn

Thanks for your reply.

I tried "gphoto2 --reset" but no difference.

I guess something happened during the boot. But I tried a minimal Linux system (minimal ArchLinux system without X window or other big packages) but no luck. So I don't know which one communicating with the camera and gphoto2 failed to write to the usb port.

One simple solution is to plug out the camera USB cable and in again, then "gphoto2 --capture-image" and any other gphoto2 command works smoothly. Based on this, my workaround is using a USB hub (with a on/off switch) between camera and pc. After the pc and camera boot successfully, I switch off and on the USB hub through a home made small circuit board remotely. The problem is solved without touch any physical button or knob.

seaquel avatar Jan 05 '20 12:01 seaquel

Same problem here, with a Sony Alpha 6400. gphoto2 --reset does not work. Power cycling the camera does work, however. But it seems impossible to get a connection with the camera connected and powered during boot time.

pReya avatar Sep 03 '21 12:09 pReya

In my case gphoto2 --reset did the trick. Powering the camera off and on didn't help.

FullStackAlex avatar Jun 05 '22 18:06 FullStackAlex