w0jtek
Posts: 1
Joined: Thu Mar 09, 2017 1:01 pm

gphoto2 - camera connection

Thu Mar 09, 2017 1:08 pm

Hi,

I'm using gphoto2 on raspberry pi device and control the camera remotely, over ssh connection. Unfortunately, something went wrong and I can't take pictures anymore.

Code: Select all

gphoto2 --auto-detect
shows nothing

Code: Select all

gphoto2 --summary
shows:

Code: Select all

[email protected]:~ $ gphoto2 --auto-detect 
*** Error: No camera found. ***                                                

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 --summary

Please make sure there is sufficient quoting around the arguments.
Assuming that the camera hasn't turned off - is it possible to "reset" the usb connection without unplugging the cable manually?
Can I check if the camera is still on?
Any suggestions?
Thank you in advance!

Code: Select all

[email protected]:/ $ gphoto2 --auto-detect --debug
0.000326 main                        (2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING L
IST:
0.000408 main                        (2): gphoto2 2.5.11
0.000439 main                        (2): gphoto2 has been compiled with the following options:
0.000462 main                        (2):  + gcc (C compiler used)
0.000472 main                        (2):  + popt (mandatory, for handling command-line parameters)
0.000485 main                        (2):  + exif (for displaying EXIF information)
0.000497 main                        (2):  + no cdk (for accessing configuration options)
0.000509 main                        (2):  + no aa (for displaying live previews)
0.000523 main                        (2):  + no jpeg (for displaying live previews in JPEG format)
0.000535 main                        (2):  + no readline (for easy navigation in the shell)
0.000559 main                        (2): libgphoto2 2.5.12
0.000578 main                        (2): libgphoto2 has been compiled with the following options:
0.000590 main                        (2):  + all camlibs
0.000601 main                        (2):  + gcc (C compiler used)
0.000613 main                        (2):  + ltdl (for portable loading of camlibs)
0.000624 main                        (2):  + EXIF (for special handling of EXIF files)
0.000640 main                        (2): libgphoto2_port 0.12.0
0.000659 main                        (2): libgphoto2_port has been compiled with the following options:
0.000673 main                        (2):  + gcc (C compiler used)
0.000685 main                        (2):  + ltdl (for portable loading of camlibs)
0.000697 main                        (2):  + USB (libusb0, for USB cameras)
0.000709 main                        (2):  + serial (for serial cameras)
0.000720 main                        (2):  + no resmgr (serial port access and locking)
0.000732 main                        (2):  + no ttylock (serial port locking)
0.000743 main                        (2):  + no lockdev (serial port locking)
0.000755 main                        (2): CAMLIBS env var not set, using compile-time default instead
0.000767 main                        (2): IOLIBS env var not set, using compile-time default instead
0.000781 main                        (2): invoked with following arguments:
0.000792 main                        (2):   --auto-detect
0.000803 main                        (2):   --debug
0.000863 load_settings               (2): Creating gphoto config directory ('/home/pi/.gphoto')
0.001001 load_settings               (2): Loading settings from file '/home/pi/.gphoto/settings'.
0.001512 gp_port_info_list_load      (2): Using ltdl to load io-drivers from '/usr/local/lib/libgphoto2_port/0.12.0'...
0.001766 foreach_func                (2): Called for filename '/usr/local/lib/libgphoto2_port/0.12.0/disk'.
0.002335 gp_port_library_list        (2): found fstab fsname proc
0.002374 gp_port_library_list        (2): found fstab fsname /dev/mmcblk0p1
0.002420 gp_port_library_list        (2): found fstab fsname /dev/mmcblk0p2
0.002648 gp_port_library_list        (2): found mtab fsname /dev/root
0.002678 gp_port_library_list        (2): found mtab fsname devtmpfs
0.002698 gp_port_library_list        (2): found mtab fsname sysfs
0.002716 gp_port_library_list        (2): found mtab fsname proc
0.002732 gp_port_library_list        (2): found mtab fsname tmpfs
0.002770 gp_port_library_list        (2): found mtab fsname devpts
0.002789 gp_port_library_list        (2): found mtab fsname tmpfs
0.002823 gp_port_library_list        (2): found mtab fsname tmpfs
0.002858 gp_port_library_list        (2): found mtab fsname tmpfs
0.104591 recurse_delete_folder       (2): Recurse delete folder 0x1fdab40//

User avatar
topguy
Posts: 5894
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: gphoto2 - camera connection

Fri Mar 10, 2017 12:27 pm

The commands "lsusb" and "dmesg" are important when trying to debug this kind of situations.
Assuming that the camera hasn't turned off - is it possible to "reset" the usb connection without unplugging the cable manually?
Not that I'm aware of.. It may be a possibility to un-load and re-load the USB-modules in the kernel, but probably that could mess up all the other things that use USB ( ethernet for example ).
Rebooting the Pi should normally work, unless the camera itself is stuck.

Return to “HATs and other add-ons”