Menu

#913 PTP I/O error with Canon on 2nd command

closed-fixed
None
5
2022-03-25
2012-05-03
Matt H
No

Canon EOS 60D tested with 2.4.11-14 and this happens on all of them.

The first request after the camera is plugged in works fine (--summary, --shell(and all commands in shell session), etc) but after that I only get generic ptp errors.

This is an embedded arm system so there is no gvfs running. Is there anything else that could be locking it?

debug info is attached.

error output
--------------------------
# gphoto2 --summary

*** Error ***
PTP I/O error

*** Error ***
An error occurred in the io-library ('Unspecified error'): No error description available
*** Error (-1: 'Unspecified error') ***

debug file where failure diverges
-----------------------------------------------------
2.092778 ptp(2): PTP: Opening session
2.093184 gphoto2-port(2): Writing 16=0x10 byte(s) to port...
2.093590 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows:
0000 10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00 ................
Fail
2.094403 ptp2/usb_sendreq(2): request code 0x1002 sending req result -35
2.096559 ptp2/camera_init(0): ptp_opensession returns 2ff
2.096840 ptp2/device_reset_request(2): sending reset
2.097122 gphoto2-port(2): Writing message (request=0x66 value=0x0 index=0x0 size=0=0x0)...
2.097372 gphoto2-port(3): No hexdump (NULL buffer)
2.098872 ptp(2): PTP: Opening session

gphoto2 --version
---------------------------
# gphoto2 --version
gphoto2: /usr/lib/libpopt.so.0: no version information available (required by gphoto2)
gphoto2 2.4.14
...
gphoto2 2.4.14 arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb --sysroot=/home/ubuntu/chumby-oe/output-angstrom-.9/sysroots/armv5te-angstrom-linux-gnueabi, popt(m), exif, no cdk, no aa, jpeg, readline
libgphoto2 2.4.14 arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb --sysroot=/home/ubuntu/chumby-oe/output-angstrom-.9/sysroots/armv5te-angstrom-linux-gnueabi, ltdl, EXIF
libgphoto2_port 0.8.0 arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb --sysroot=/home/ubuntu/chumby-oe/output-angstrom-.9/sysroots/armv5te-angstrom-linux-gnueabi, ltdl, USB (libusb1), serial without locking

Kernel version
---------------------
# uname -a
Linux 2.6.28-chumby #1 PREEMPT Fri Nov 5 18:24:54 PDT 2010 armv5tejl GNU/Linux

Discussion

  • Matt H

    Matt H - 2012-05-03

    Debug summary failure lib2.4.14

     
  • Matt H

    Matt H - 2012-05-03

    ran an strace on the two scenarios

    right after the Hex dump in the debug file it gets an ioctl error. gonna try to get ltrace compiled for it next and see if that gets me any further.

    hux dump lines
    --------------
    gettimeofday({1335990094, 590485}, NULL) = 0
    write(2, "8.042283 gphoto2-port(3): "..., 268.042283 gphoto2-port(3): ) = 26
    write(2, "Hexdump of 16 = 0x10 bytes follow"..., 108Hexdump of 16 = 0x10 bytes follows:
    0000 10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00 ................
    ) = 108
    write(2, "\n"..., 1
    )

    successful first run, after hex dump
    --------------------------
    gettimeofday({1335990073, 178458}, NULL) = 0
    ioctl(3, USBDEVFS_SUBMITURB, 0xbeb1ec90) = 0
    ioctl(3, USBDEVFS_REAPURBNDELAY, 0xbeb1ec74) = 0
    gettimeofday({1335990073, 182740}, NULL) = 0
    write(2, "8.841716 ptp2/ptp_usb_getresp(2):"..., 348.841716 ptp2/ptp_usb_getresp(2): ) = 34
    write(2, "reading response"..., 16reading response) = 16
    write(2, "\n"..., 1
    ) = 1

    failure second run, after hex dump
    -----------------------
    gettimeofday({1335990094, 596736}, NULL) = 0
    ioctl(3, USBDEVFS_SUBMITURB, 0xbefecc90) = -1 ENOENT (No such file or directory)
    gettimeofday({1335990094, 599204}, NULL) = 0
    write(2, "8.051002 ptp2/usb_sendreq(2): "..., 308.051002 ptp2/usb_sendreq(2): ) = 30
    write(2, "request code 0x1002 sending req r"..., 42request code 0x1002 sending req result -35) = 42
    write(2, "\n"..., 1
    ) = 1

     
  • Marcus Meissner

    Marcus Meissner - 2012-05-03
    • assigned_to: nobody --> marcusmeissner
     
  • Marcus Meissner

    Marcus Meissner - 2012-05-03

    the initial command here failed on the second session, with a write timeout.

    we see this occasionaly but so far have not pinpointed it down :/

     
  • Matt H

    Matt H - 2012-05-03

    Thanks for the quick response but unpinpointed occasionals are not overly encouraging. :/

    i have continued digging and found an identical bug in libusb on the same kernel i have (2.6.28) but for x86_64.
    http://marc.info/?l=linux-usb&m=123087780315068&w=2

    So it looks like it is a libusb error.
    I'm going to update libusb to 1.0.9 and if that doesnt work I'll assume it's an old kernel problem and wait to revisit this once I update the kernel.

    Thanks Marcus,
    Matt

     
  • Marcus Meissner

    Marcus Meissner - 2012-05-03

    is this different on a non-arm workstation with Linux?

     
  • Marcus Meissner

    Marcus Meissner - 2012-05-03

    interesting tidbit with the libusb bug.

    the bug is architecture independend I think

     
  • Matt H

    Matt H - 2012-05-03

    I have had no problems with it on the Ubuntu virtual machine I'm running. (version 2.4.11)

    Updating libusb didn't help so I'm just gonna wait until I get a new kernel on there.

    I'm leaning towards it being an issue with libusb/old kernel for now though.

    Thanks.

     
  • Anonymous

    Anonymous - 2012-10-11

    Hi, I am having the same problem on an Acer Aspire One V5-571G with the canon 1100D camera on Ubuntu 12.04.1 is there any updates or workarounds to this?

     
  • Marcus Meissner

    Marcus Meissner - 2012-10-11
    • status: open --> pending
     
  • Marcus Meissner

    Marcus Meissner - 2012-10-11

    acer aspire one is not a ARM platform, yes?

    feel free to open a new bug, but check if gvfs is dead first.

     
  • Marcus Meissner

    Marcus Meissner - 2013-05-12
    • status: pending --> closed-fixed
    • Group: --> do_not_use_this_camlib/canon
     
  • Marcus Meissner

    Marcus Meissner - 2013-05-12

    finally fizxed in 2.5.2 ... i hope. Sorry for taking so long.

     
  • Talaron Delphine

    Well...
    I use a Nikon D800 and this issue occurs.
    First try is good, picture is taken and downloaded, second attempt messes.

    Installation:
    Raspberry Pi / Raspbian 10 (latest)
    gphoto2 2.5.28.1 (from github)
    libgphoto2 2.5.22 (from github)
    libgphoto2_port 0.12.0

    Erreur
    PTP I/O Error

    On the upper the screen of the camera, a progressbar is infinitely progressing and restarting as if it is looking for a connection to the RPI. It totally freezes the camera, I need to remove the battery for restart.

     
  • Marcus Meissner

    Marcus Meissner - 2022-03-25

    Please open a new ticket, preferable in https://github.com/gphoto/libgphoto2/issues

     
  • Marcus Meissner

    Marcus Meissner - 2022-03-25
    • discussion: enabled --> disabled