Open outdoorbits opened 7 months ago
No progress yet? I'm having a similar/the same problem:
I don't have this issue with GoPro H 12 and libgphoto2-2.5.30 (which doesn't recognize that model).
I have this issue with libgphoto2-2.5.31 (which recognizes the H11/H12 model). However, when specifying the option --camera='USB PTP Class Camera' to gphoto2, the problem does not show up. This camera model is what the earlier version defaulted to.
Hint:
In case of a (usbid-)matched camera model libgphoto2 seems to write to a non-functioning (on gopro) usb interface/endpoint. This comment in libgphoto2-2.5.31/libgphoto2_port/libusb1/libusb1.c@1174 (gp_libusb1_find_device_lib) / Use the first config, interface and altsetting we find / might describe the cause. The gopro usb config lists several interfaces, but the first (0x82) returns a ENOENT error when writing to it. Writing to the 0x84 interface works as intended.
Fail (gopro model):
INTERFACE DESCRIPTOR (0.0): class Communications and CDC Control (2=USB_CLASS_COMM)
bNumEndpoints: 1
ENDPOINT DESCRIPTOR
bEndpointAddress: 0x82 IN Endpoint:2
bmAttributes: 0x03
.... ..11 = Transfertype: Interrupt-Transfer (0x3)
OK (PTP class):
INTERFACE DESCRIPTOR (2.0): class Imaging (6=USB_CLASS_STILL_IMAGE)
bNumEndpoints: 3
[...]
ENDPOINT DESCRIPTOR
bEndpointAddress: 0x84 IN Endpoint:4
bmAttributes: 0x03
.... ..11 = Transfertype: Interrupt-Transfer (0x3)
Not fully aware of the program's logic, but I think that for the autodetect/PTP class case it checks for an appropriate interface class, while for the usbid-match case it omits such check.
Reading a GoPro seems to be not possible any more under bookworm. With the same hardware, the same thing works under bullseye. The results of "gphoto2 --version", "gphoto2 --auto-detect" and "gphoto2 --summary" are listed below. Except for "--auto-detect", all other commands tested under bookworm, such as "--get-all-files" also failed with the same error message. I can rule out problems with the power supply (powered hub). Thank you for your help!
bookworm @ Pi 4 and Pi 5
> gphoto2 --version
> gphoto2 --auto-detect
> gphoto2 --port=usb:002,003 --summary
> env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port=usb:002,003 --summary
bullseye @ Pi 4
> gphoto2 --version
> gphoto2 --auto-detect
> gphoto2 --port=usb:002,003 --summary