Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

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

closed-fixed
None
5
2013-05-12
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

1 2 > >> (Page 1 of 2)
  • 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

     
    • assigned_to: nobody --> marcusmeissner
     
  • 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

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

     
  • 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
    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?

     
    • status: open --> pending
     
1 2 > >> (Page 1 of 2)