Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoPro Hero 10/Raspberry Pi: Error only in bookworm #972

Open
outdoorbits opened this issue Apr 8, 2024 · 1 comment
Open

GoPro Hero 10/Raspberry Pi: Error only in bookworm #972

outdoorbits opened this issue Apr 8, 2024 · 1 comment

Comments

@outdoorbits
Copy link

outdoorbits commented Apr 8, 2024

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 2.5.28

Copyright (c) 2000-2021 Marcus Meissner and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.28         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.30         standard camlibs, gcc, no ltdl, EXIF
libgphoto2_port 0.12.1         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking

> gphoto2 --auto-detect

Model                          Port                                            
----------------------------------------------------------
GoPro HERO10 Black             usb:002,003     

> gphoto2 --port=usb:002,003 --summary

*** Error ***              
PTP General Error

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

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 <[email protected]>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port=usb:002,003 --summary

Please make sure there is sufficient quoting around the arguments.

> env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port=usb:002,003 --summary

*** Error ***              
PTP General Error

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

> gphoto2 --version

gphoto2         2.5.27         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.27         standard camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking

> gphoto2 --auto-detect

Model                          Port                                            
----------------------------------------------------------
USB PTP Class Camera           usb:002,003

> gphoto2 --port=usb:002,003 --summary

Camera summary:                                                                
Manufacturer: GoPro
Model: HERO10 BLACK
  Version: H21.01.01.60.00
  Serial Number: ...
@mijoost
Copy link

mijoost commented Jul 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants