gphoto / gphoto2

The gphoto2 commandline tool for accessing and controlling digital cameras.
GNU General Public License v2.0
716 stars 116 forks source link

gphoto2 reports "Unspecified error" on raspberry pi #384

Open Nears opened 3 years ago

Nears commented 3 years ago

I am trying to setup gphoto2 on my raspberry pi to connect to my Z5 (corrected, Z4 was a typo) via wifi. To do so I used the latest code base from git and compiled the lib as well as the tool.

`$ gphoto2 --version gphoto2 2.5.26.1

Copyright (c) 2000-2020 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.26.1 gcc, popt(m), exif, no cdk, no aa, jpeg, no readline libgphoto2 2.5.26.1 standard camlibs (SKIPPING lumix), gcc, ltdl, EXIF libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking ` Then I try to connect to my cam (Nikon Z5) but I do get the following log:

$ env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port ptpip:192.168.0.50 --summary --camera="Nikon Z5"

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

0.000247 main (2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST: 0.000622 main (2): gphoto2 2.5.26.1 0.000760 main (2): gphoto2 has been compiled with the following options: 0.000871 main (2): + gcc (C compiler used) 0.000973 main (2): + popt (mandatory, for handling command-line parameters) 0.001076 main (2): + exif (for displaying EXIF information) 0.001177 main (2): + no cdk (for accessing configuration options) 0.001278 main (2): + no aa (for displaying live previews) 0.001378 main (2): + jpeg (for displaying live previews in JPEG format) 0.001477 main (2): + no readline (for easy navigation in the shell) 0.001595 main (2): libgphoto2 2.5.26.1 0.001713 main (2): libgphoto2 has been compiled with the following options: 0.001833 main (2): + standard camlib set SKIPPING SOME (ax203 canon digigr8 dimagev directory docupen jl2005a jl2005c kodak_dc240 mars pentax ptp2 ricoh_g3 sierra sonix sq905 st2205 topfield tp6801 SKIPPING lumix) 0.001941 main (2): + gcc (C compiler used) 0.002039 main (2): + ltdl (for portable loading of camlibs) 0.002287 main (2): + EXIF (for special handling of EXIF files) 0.002457 main (2): libgphoto2_port 0.12.0 0.002589 main (2): libgphoto2_port has been compiled with the following options: 0.002697 main (2): + iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi 0.002796 main (2): + gcc (C compiler used) 0.002897 main (2): + ltdl (for portable loading of iolibs) 0.002996 main (2): + EXIF (for vusb) 0.003097 main (2): + USB (libusb1, for USB cameras) 0.003197 main (2): + serial (for serial cameras) 0.003294 main (2): + no resmgr (serial port access and locking) 0.003514 main (2): + no ttylock (serial port locking) 0.003630 main (2): + no lockdev (serial port locking) 0.003739 main (2): CAMLIBS env var not set, using compile-time default instead 0.003841 main (2): IOLIBS env var not set, using compile-time default instead 0.003940 main (2): invoked with following arguments: 0.004041 main (2): --debug 0.004139 main (2): --debug-logfile=my-logfile.txt 0.004239 main (2): --port 0.004336 main (2): ptpip:192.168.0.50 0.004431 main (2): --summary 0.004528 main (2): --camera=Nikon Z5 0.004844 main (2): Processing 'port' option ('ptpip:192.168.0.50')... 0.005097 gp_port_info_list_load (2): Using ltdl to load io-drivers from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0'... 0.006348 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/disk'. 0.008835 gp_port_library_list (2): found fstab fsname proc 0.009098 gp_port_library_list (2): found fstab fsname PARTUUID=738a4d67-01 0.009393 gp_port_library_list (2): found fstab fsname PARTUUID=738a4d67-02 0.010191 gp_port_library_list (2): found mtab fsname /dev/root 0.010464 gp_port_library_list (2): found mtab fsname devtmpfs 0.010632 gp_port_library_list (2): found mtab fsname sysfs 0.010788 gp_port_library_list (2): found mtab fsname proc 0.010951 gp_port_library_list (2): found mtab fsname securityfs 0.011111 gp_port_library_list (2): found mtab fsname tmpfs 0.011631 gp_port_library_list (2): found mtab fsname devpts 0.011815 gp_port_library_list (2): found mtab fsname tmpfs 0.012068 gp_port_library_list (2): found mtab fsname tmpfs 0.012599 gp_port_library_list (2): found mtab fsname tmpfs 0.012947 gp_port_library_list (2): found mtab fsname cgroup2 0.013108 gp_port_library_list (2): found mtab fsname cgroup 0.013255 gp_port_library_list (2): found mtab fsname none 0.013490 gp_port_library_list (2): found mtab fsname cgroup 0.013644 gp_port_library_list (2): found mtab fsname cgroup 0.014025 gp_port_library_list (2): found mtab fsname cgroup 0.014192 gp_port_library_list (2): found mtab fsname cgroup 0.014339 gp_port_library_list (2): found mtab fsname cgroup 0.014481 gp_port_library_list (2): found mtab fsname cgroup 0.014622 gp_port_library_list (2): found mtab fsname cgroup 0.014762 gp_port_library_list (2): found mtab fsname debugfs 0.015014 gp_port_library_list (2): found mtab fsname systemd-1 0.015171 gp_port_library_list (2): found mtab fsname sunrpc 0.015438 gp_port_library_list (2): found mtab fsname mqueue 0.015592 gp_port_library_list (2): found mtab fsname configfs 0.015878 gp_port_library_list (2): found mtab fsname /dev/mmcblk0p1 0.016120 gp_port_library_list (2): found mtab fsname /etc/nas.autofs 0.016283 gp_port_library_list (2): found mtab fsname tmpfs 0.016984 foreach_func (2): Loaded '' ('^disk:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/disk'. 0.017150 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.019025 foreach_func (2): Loaded 'PTP/IP Connection' ('ptpip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.019211 foreach_func (2): Loaded '' ('^ptpip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.019941 foreach_func (2): Loaded 'IP Connection' ('ip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.020053 foreach_func (2): Loaded '' ('^ip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.020158 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.023580 foreach_func (2): Loaded 'Serial Port Device' ('serial:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.023791 foreach_func (2): Loaded '' ('^serial:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.023898 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.073554 foreach_func (2): Loaded '' ('^usb:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.073775 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:001,004') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.073883 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:001,003') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.073987 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usbdiskdirect'. 0.076487 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usbscsi'. 0.078735 gp_port_info_list_count (2): Counting entries (10 available)... 0.078924 gp_port_info_list_count (2): 5 regular entries available. 0.079053 gp_port_info_list_lookup_path(2): Looking for path 'ptpip:192.168.0.50' (10 entries available)... 0.079193 gp_port_info_list_lookup_path(2): Starting regex search for 'ptpip:192.168.0.50'... 0.079298 gp_port_info_list_lookup_path(2): Trying '^disk:'... 0.079735 gp_port_info_list_lookup_path(2): re_match failed (-1) 0.079868 gp_port_info_list_lookup_path(2): Trying '^ptpip:'... 0.080481 gp_port_info_list_get_info (2): Getting info of entry 5 (11 available)... 0.080681 gp_camera_set_port_info (2): Setting port info for port 'Generic Port' at 'ptpip:192.168.0.50'... 0.083785 gp_port_set_settings (2): Setting settings... 0.084091 load_settings (2): Creating gphoto config directory ('/home/pi/.gphoto') 0.084657 load_settings (2): Loading settings from file '/home/pi/.gphoto/settings'. 0.085069 gp_setting_set (2): Setting key 'port' to value 'ptpip:192.168.0.50' (gphoto2) 0.085253 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.086893 main (2): Processing 'model' option ('Nikon Z5')... 0.087303 gp_abilities_list_load_dir (2): Using ltdl to load camera libraries from '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1'... 0.088478 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ax203'. 0.088698 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/canon'. 0.088820 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/digigr8'. 0.088923 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/dimagev'. 0.089029 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/directory'. 0.089134 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/docupen'. 0.089241 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/jl2005a'. 0.089348 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/jl2005c'. 0.089457 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/kodak_dc240'. 0.089556 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/mars'. 0.089663 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/pentax'. 0.089770 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ptp2'. 0.089875 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ricoh_g3'. 0.089984 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sierra'. 0.090091 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sonix'. 0.090200 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sq905'. 0.090302 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/st2205'. 0.090403 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/topfield'. 0.090505 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/tp6801'. 0.090650 gp_abilities_list_load_dir (2): Found 19 camera drivers. 0.640800 gp_camera_set_abilities (2): Setting abilities ('Nikon Z5')... 0.641053 gp_setting_set (2): Setting key 'model' to value 'Nikon Z5' (gphoto2) 0.641182 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.646614 gp_camera_init (2): Initializing camera... 0.647239 gp_camera_init (2): Loading '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ptp2'... 0.677162 gp_port_open (2): Opening port... 0.678476 ptp_ptpip_connect (2): connecting to ptpip:192.168.0.50. 0.769262 ptp_ptpip_init_command_request(3): ptpip/init_cmd data: (hexdump of 48 bytes) 0000 30 00 00 00 01 00 00 00-cc 6b b6 4e 4e 6f d9 ab 0........k.NNo.. 0010 08 ed 9e fc a4 84 21 3a-72 00 70 00 69 00 31 00 ......!:r.p.i.1. 0020 2d 00 74 00 65 00 73 00-74 00 00 00 00 00 01 00 -.t.e.s.t.......

0.770132 ptp_ptpip_init_command_request ptpip.c:481: return 48 / len 48 0.798508 ptp_ptpip_generic_read (3): ptpip/generic_read header: (hexdump of 8 bytes) 0000 0c 00 00 00 05 00 00 00- ........

0.798918 ptp_ptpip_generic_read (3): ptpip/generic_read data: (hexdump of 4 bytes) 0000 01 00 00 00 - ....

0.799054 ptp_ptpip_init_command_ack ptpip.c:506: bad type returned 5 0.800097 camera_init library.c:9366: Failed to connect. 0.800299 gp_port_close (2): Closing port... 0.803496 gp_context_error (0): An error occurred in the io-library ('Unspecified error'): No error description available 0.815756 gp_camera_free (2): Freeing camera... 0.816006 gp_port_free (2): Freeing port... 0.816124 gp_port_close (2): Closing port... 0.816596 gp_filesystem_reset (2): resetting filesystem 0.816737 gp_filesystem_lru_clear (2): Clearing fscache LRU list... 0.816835 gp_filesystem_lru_clear (2): fscache LRU list already empty 0.816932 delete_all_folders (2): Internally deleting all folders from '/'... 0.817032 lookup_folder (2): Lookup folder '/'... 0.817130 lookup_folder (2): Found! / is 0x1da3460 0.817225 recurse_delete_folder (2): Recurse delete folder 0x1da3460// 0.817323 delete_all_files (2): Delete all files in folder 0x1da3460// `

Any idea what I am doing wrong? Was gphoto2 really tested with the Z5 as it is listed as supported camera? Thanks for any help - I am also willing to support on more further debugging if I do get some guidance.

msmeissn commented 3 years ago

error 5 means that the GUID (a 16 byte identifier) did not match.

Usually if the camera has pre-stored connections

What camera is it? Nikon has no Z4?

Nears commented 3 years ago

Oh, I am sorry, this was a typo, I have the Z5

Nears commented 3 years ago

I think Nikon has added some more pairing functionality to the Z5 (and maybe other models).

  1. As far is I observed the pairing mechanism with the Nikon tools ("Wireless Transmitter Utility") on my PC, there is a handshake between the PC and the Cam. There is a PIN shown on the cam which you need to set on your PC while pairing. But there tools is not operating well on my PC so I am looking for a better solution.

  2. Before using gphoto2 I stumbled accross airnef (https://www.testcams.com/airnef/) and did some experiments with it. I also observed a GUID issue here, which I was able to solve by tracing the network trafic with wireshark. Unfortunatelly I am then ending up with a access denied issue afterwards. See also my post here: https://www.dpreview.com/forums/post/64670078

Thanks for any help

msmeissn commented 3 years ago

the gphoto2 guid is in .gphoto/settings

sample line:

ptp2_ip=guid=00:00:00:00:00:00:00:00:ff:ff:08:00:27:71:9a:de

but perhapos try the stnadard GUID that nikon WU-1 adapters use (00112233....):

in your post your trace shows: 0000: 01 00 00 00 00 11 22 33 - 44 55 66 77 88 99 00 00 ......"3 - DUfw.... 0010: 00 00 00 00 61 00 69 00 - 72 00 6e 00 65 00 66 00 ....a.i. - r.n.e.f. 0020: 00 00 00 00 01 00 ......

The GUID would be:

ptp2_ip=guid=00:11:22:33:44:55:66:77:88:99:00:00:00:00:00:00

Nears commented 3 years ago

Thanks for the feedback. The GUI 00:11:22:... is the default of airnef, I was not successfull with this. But what I tried to describe in my other post is, that I did traced the paring with the Z5 and the Nikon "Wireless Transmitter Utility" Tool. During this pairing the GUID is exchanged and I used this GUID as new GUID in airnef. With this modification I was able to connect to the cam, but when I try to download some pictires I do get an access denied error from airnef and the connection is closed.

In addition to your post I tried to do the same manipulation of the GUID in the settings file and used the GUID from my previous pairing trace, but it looks like gphoto is not making use if the given GUID but is overwriting it again, see the log of

'env LANG=C gphoto2 --debug --debug-logfile=my-logfile-no-para.txt --summary'

`0.000256 main (2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST: 0.004187 main (2): gphoto2 2.5.26.1 0.004447 main (2): gphoto2 has been compiled with the following options: 0.004562 main (2): + gcc (C compiler used) 0.004659 main (2): + popt (mandatory, for handling command-line parameters) 0.004754 main (2): + exif (for displaying EXIF information) 0.004845 main (2): + no cdk (for accessing configuration options) 0.004936 main (2): + no aa (for displaying live previews) 0.005023 main (2): + jpeg (for displaying live previews in JPEG format) 0.005112 main (2): + no readline (for easy navigation in the shell) 0.005222 main (2): libgphoto2 2.5.26.1 0.005328 main (2): libgphoto2 has been compiled with the following options: 0.005437 main (2): + standard camlib set SKIPPING SOME (ax203 canon digigr8 dimagev directory docupen jl2005a jl2005c kodak_dc240 mars pentax ptp2 ricoh_g3 sierra sonix sq905 st2205 topfield tp6801 SKIPPING lumix) 0.005533 main (2): + gcc (C compiler used) 0.005626 main (2): + ltdl (for portable loading of camlibs) 0.005714 main (2): + EXIF (for special handling of EXIF files) 0.005825 main (2): libgphoto2_port 0.12.0 0.005937 main (2): libgphoto2_port has been compiled with the following options: 0.006034 main (2): + iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi 0.006126 main (2): + gcc (C compiler used) 0.006213 main (2): + ltdl (for portable loading of iolibs) 0.006301 main (2): + EXIF (for vusb) 0.006393 main (2): + USB (libusb1, for USB cameras) 0.006481 main (2): + serial (for serial cameras) 0.006571 main (2): + no resmgr (serial port access and locking) 0.006660 main (2): + no ttylock (serial port locking) 0.006749 main (2): + no lockdev (serial port locking) 0.007371 main (2): CAMLIBS env var not set, using compile-time default instead 0.007552 main (2): IOLIBS env var not set, using compile-time default instead 0.007648 main (2): invoked with following arguments: 0.007745 main (2): --debug 0.007836 main (2): --debug-logfile=my-logfile-no-para.txt 0.007925 main (2): --summary 0.008287 load_settings (2): Creating gphoto config directory ('/home/pi/.gphoto') 0.009076 load_settings (2): Loading settings from file '/home/pi/.gphoto/settings'. 0.011337 main (2): The user has not specified both a model and a port. Try to figure them out. 0.011585 gp_port_info_list_load (2): Using ltdl to load io-drivers from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0'... 0.012905 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/disk'. 0.015357 gp_port_library_list (2): found fstab fsname proc 0.015668 gp_port_library_list (2): found fstab fsname PARTUUID=738a4d67-01 0.015956 gp_port_library_list (2): found fstab fsname PARTUUID=738a4d67-02 0.016760 gp_port_library_list (2): found mtab fsname /dev/root 0.017020 gp_port_library_list (2): found mtab fsname devtmpfs 0.017177 gp_port_library_list (2): found mtab fsname sysfs 0.017320 gp_port_library_list (2): found mtab fsname proc 0.017464 gp_port_library_list (2): found mtab fsname securityfs 0.017608 gp_port_library_list (2): found mtab fsname tmpfs 0.017864 gp_port_library_list (2): found mtab fsname devpts 0.018143 gp_port_library_list (2): found mtab fsname tmpfs 0.018396 gp_port_library_list (2): found mtab fsname tmpfs 0.018652 gp_port_library_list (2): found mtab fsname tmpfs 0.018937 gp_port_library_list (2): found mtab fsname cgroup2 0.019086 gp_port_library_list (2): found mtab fsname cgroup 0.019222 gp_port_library_list (2): found mtab fsname none 0.019442 gp_port_library_list (2): found mtab fsname cgroup 0.019590 gp_port_library_list (2): found mtab fsname cgroup 0.019954 gp_port_library_list (2): found mtab fsname cgroup 0.020113 gp_port_library_list (2): found mtab fsname cgroup 0.020252 gp_port_library_list (2): found mtab fsname cgroup 0.020387 gp_port_library_list (2): found mtab fsname cgroup 0.020521 gp_port_library_list (2): found mtab fsname cgroup 0.020655 gp_port_library_list (2): found mtab fsname systemd-1 0.020792 gp_port_library_list (2): found mtab fsname debugfs 0.021032 gp_port_library_list (2): found mtab fsname sunrpc 0.021294 gp_port_library_list (2): found mtab fsname mqueue 0.021445 gp_port_library_list (2): found mtab fsname configfs 0.021725 gp_port_library_list (2): found mtab fsname /dev/mmcblk0p1 0.021961 gp_port_library_list (2): found mtab fsname /etc/nas.autofs 0.022120 gp_port_library_list (2): found mtab fsname tmpfs 0.023091 foreach_func (2): Loaded '' ('^disk:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/disk'. 0.023351 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.025694 foreach_func (2): Loaded 'PTP/IP Connection' ('ptpip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.025887 foreach_func (2): Loaded '' ('^ptpip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.025990 foreach_func (2): Loaded 'IP Connection' ('ip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.026093 foreach_func (2): Loaded '' ('^ip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.026191 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.029170 foreach_func (2): Loaded 'Serial Port Device' ('serial:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.029357 foreach_func (2): Loaded '' ('^serial:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.029462 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.084199 foreach_func (2): Loaded '' ('^usb:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.084420 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:001,004') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.084527 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:001,003') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.084628 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usbdiskdirect'. 0.087013 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usbscsi'. 0.089349 gp_port_info_list_count (2): Counting entries (10 available)... 0.089539 gp_port_info_list_count (2): 5 regular entries available. 0.089785 gp_abilities_list_load_dir (2): Using ltdl to load camera libraries from '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1'... 0.090954 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ax203'. 0.091171 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/canon'. 0.091290 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/digigr8'. 0.091393 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/dimagev'. 0.091610 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/directory'. 0.091717 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/docupen'. 0.091822 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/jl2005a'. 0.091930 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/jl2005c'. 0.092036 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/kodak_dc240'. 0.092138 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/mars'. 0.092508 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/pentax'. 0.092661 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ptp2'. 0.092768 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ricoh_g3'. 0.092875 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sierra'. 0.092977 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sonix'. 0.093082 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sq905'. 0.093187 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/st2205'. 0.093294 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/topfield'. 0.093402 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/tp6801'. 0.093594 gp_abilities_list_load_dir (2): Found 19 camera drivers. 0.658071 gp_port_info_list_count (2): Counting entries (10 available)... 0.658321 gp_port_info_list_count (2): 5 regular entries available. 0.658416 gp_port_new (2): Creating new device... 0.658559 gp_port_info_list_get_info (2): Getting info of entry 0 (10 available)... 0.660338 gp_port_set_settings (2): Setting settings... 0.660566 gp_port_info_list_get_info (2): Getting info of entry 1 (10 available)... 0.662641 gp_port_set_settings (2): Setting settings... 0.662864 gp_port_info_list_get_info (2): Getting info of entry 2 (10 available)... 0.664964 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds. 0.665149 gp_port_set_settings (2): Setting settings... 0.665276 gp_port_info_list_get_info (2): Getting info of entry 3 (10 available)... 0.709917 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds. 0.710122 gp_port_set_settings (2): Setting settings... 0.710264 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:001,004, (new int=0, conf=-1, alt=-1) port usb:001,004 0.710367 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.710462 gp_abilities_list_detect_usb(2): Auto-detecting USB cameras... 0.727207 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x29a, subclass, 0xffffffff, protocol 0xffffffff)... 0.739731 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x6, subclass, 0x1, protocol 0x1)... 0.740850 gp_port_info_list_get_info (2): Getting info of entry 4 (10 available)... 0.791083 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds. 0.791355 gp_port_set_settings (2): Setting settings... 0.791554 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:001,003, (new int=0, conf=-1, alt=-1) port usb:001,003 0.791660 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.791759 gp_abilities_list_detect_usb(2): Auto-detecting USB cameras... 0.808571 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x29a, subclass, 0xffffffff, protocol 0xffffffff)... 0.822588 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x6, subclass, 0x1, protocol 0x1)... 0.823931 gp_port_free (2): Freeing port... 0.824096 gp_port_close (2): Closing port... 0.826950 gp_camera_set_abilities (2): Setting abilities ('Nikon Z5')... 0.827181 gp_setting_set (2): Setting key 'model' to value 'Nikon Z5' (gphoto2) 0.827309 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.830949 gp_port_info_list_lookup_path(2): Looking for path 'ptpip:192.168.0.50' (10 entries available)... 0.831161 gp_port_info_list_lookup_path(2): Starting regex search for 'ptpip:192.168.0.50'... 0.831329 gp_port_info_list_lookup_path(2): Trying '^disk:'... 0.831961 gp_port_info_list_lookup_path(2): re_match failed (-1) 0.832098 gp_port_info_list_lookup_path(2): Trying '^ptpip:'... 0.832768 gp_port_info_list_get_info (2): Getting info of entry 5 (11 available)... 0.832982 gp_camera_set_port_info (2): Setting port info for port 'Generic Port' at 'ptpip:192.168.0.50'... 0.834655 gp_port_set_settings (2): Setting settings... 0.834869 gp_setting_set (2): Setting key 'port' to value 'ptpip:192.168.0.50' (gphoto2) 0.834996 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.838042 gp_camera_init (2): Initializing camera... 0.838217 gp_camera_init (2): Loading '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ptp2'... 0.869207 gp_port_open (2): Opening port... 0.870418 ptp_ptpip_connect (2): connecting to ptpip:192.168.0.50. 0.977018 gp_setting_set (2): Setting key 'guid' to value 'f2:ff:ae:9d:c1:d6:7a:55:1b:36:6b:e2:77:d5:a8:15' (ptp2_ip) 0.977251 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.978770 ptp_ptpip_init_command_request(3): ptpip/init_cmd data: (hexdump of 48 bytes) 0000 30 00 00 00 01 00 00 00-f2 ff ae 9d c1 d6 7a 55 0.............zU 0010 1b 36 6b e2 77 d5 a8 15-72 00 70 00 69 00 31 00 .6k.w...r.p.i.1. 0020 2d 00 74 00 65 00 73 00-74 00 00 00 00 00 01 00 -.t.e.s.t.......

0.979681 ptp_ptpip_init_command_request ptpip.c:481: return 48 / len 48 1.001593 ptp_ptpip_generic_read (3): ptpip/generic_read header: (hexdump of 8 bytes) 0000 0c 00 00 00 05 00 00 00- ........

1.001859 ptp_ptpip_generic_read (3): ptpip/generic_read data: (hexdump of 4 bytes) 0000 01 00 00 00 - ....

1.001976 ptp_ptpip_init_command_ack ptpip.c:506: bad type returned 5 1.002950 camera_init library.c:9366: Failed to connect. 1.003147 gp_port_close (2): Closing port... 1.014424 gp_camera_free (2): Freeing camera... 1.014654 gp_port_free (2): Freeing port... 1.014753 gp_port_close (2): Closing port... 1.015224 gp_filesystem_reset (2): resetting filesystem 1.015493 gp_filesystem_lru_clear (2): Clearing fscache LRU list... 1.015591 gp_filesystem_lru_clear (2): fscache LRU list already empty 1.015690 delete_all_folders (2): Internally deleting all folders from '/'... 1.015788 lookup_folder (2): Lookup folder '/'... 1.015882 lookup_folder (2): Found! / is 0x1bd0460 1.015976 recurse_delete_folder (2): Recurse delete folder 0x1bd0460// 1.016073 delete_all_files (2): Delete all files in folder 0x1bd0460// `

msmeissn commented 3 years ago

On Wed, Jan 06, 2021 at 10:54:57AM -0800, nears wrote:

Thanks for the feedback. The GUI 00:11:22:... is the default of airnef, I was not successfull with this. But what I tried to describe in my other post is, that I did traced the paring with the Z5 and the Nikon "Wireless Transmitter Utility" Tool. During this pairing the GUID is exchanged and I used this GUID as new GUID in airnef. With this modification I was able to connect to the cam, but when I try to download some pictires I do get an access denied error from airnef and the connection is closed.

In addition to your post I tried to do the same manipulation of the GUID in the settings file and used the GUID from my previous pairing trace, but it looks like gphoto is not making use if the given GUID but is overwriting it again, see the log of

'env LANG=C gphoto2 --debug --debug-logfile=my-logfile-no-para.txt --summary'

Here it reads it:

0.870418 ptp_ptpip_connect (2): connecting to ptpip:192.168.0.50. 0.977018 gp_setting_set (2): Setting key 'guid' to value 'f2:ff:ae:9d:c1:d6:7a:55:1b:36:6b:e2:77:d5:a8:15' (ptp2_ip) 0.977251 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.978770 ptp_ptpip_init_command_request(3): ptpip/init_cmd data: (hexdump of 48 bytes) 0000 30 00 00 00 01 00 00 00-f2 ff ae 9d c1 d6 7a 55 0.............zU 0010 1b 36 6b e2 77 d5 a8 15-72 00 70 00 69 00 31 00 .6k.w...r.p.i.1. 0020 2d 00 74 00 65 00 73 00-74 00 00 00 00 00 01 00 -.t.e.s.t.......

and it seems to send it, i see the hexcode in the data.

The camera might have changed it again, or pass it via another channel like upnp?

Ciao, Marcus

Nears commented 3 years ago

Yes, I see that it reads the config file, but the GUID beeing mentioned is not the one which I configured in the settings file. Even if IP and Camara name are valid from the settings file.

In addtion to that, I am also wondering about the string "r.p.i.1.-t.e.s.t" this is my raspberry pi's name on which I am running the gphoto at the moment but not the system on which I was pairing my Z5 with my PC (Windows). So for me it looks like gphoto is calculating it's own GUID and host name from the system it is running on, it is not picking it from the settings file.

After the call of gphoto the settings file is overwritten by the "new" GUID and my manual added one is gone.

Nears commented 3 years ago

Any hints how I could proceed with this? Or is there a clear statemant that Z5 is not (yet) supported by gphoto?

msmeissn commented 3 years ago

Just to be clear, Z5 over USB works.

rpi-test is your pis name, it is sent in the request, but it should not matter actually (I would hope).

We need to find out the GUID :/ Can you try the GUID 00:11:22:33:44:55:66:77:88:99:00:00:00:00:00

Nears commented 3 years ago

Sorry, I think we missunderstood us, the GUID 00:11:22:33:44:55:66:77:88:99:00:00:00:00:00 is the one take from airnef with which I failed. Even if I set it in the settings file it is not used.

The valid GUID which I retrieved with a trace in wireshare while paring my PC (Win) with the Nikon Z5 is 38b0182c47c29145a252cd3c07a8d426, but even if I set this GUID in the settings file it is not picked by gphoto for the connection attempt.

msmeissn commented 3 years ago

can you show a debug of this connection attempt? is the camera reporting anything on its dispolay?

Nears commented 3 years ago

Hi, the camara itself is not showing anything, it is "waiting" for an wifi connection to be established. I played around a little bitte and for some other reasons I did a reboot of my PI after I set my own GUID to the settings file. After the reboot of the PI I did a new attempt of with gphoto and now the GUID was used as set in the settings file. Never the less the connection itself still faild, see log:

0.000346 main (2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST: 0.000724 main (2): gphoto2 2.5.26.1 0.000855 main (2): gphoto2 has been compiled with the following options: 0.000961 main (2): + gcc (C compiler used) 0.001054 main (2): + popt (mandatory, for handling command-line parameters) 0.001145 main (2): + exif (for displaying EXIF information) 0.001240 main (2): + no cdk (for accessing configuration options) 0.001329 main (2): + no aa (for displaying live previews) 0.001416 main (2): + jpeg (for displaying live previews in JPEG format) 0.001507 main (2): + no readline (for easy navigation in the shell) 0.001613 main (2): libgphoto2 2.5.26.1 0.001719 main (2): libgphoto2 has been compiled with the following options: 0.001822 main (2): + standard camlib set SKIPPING SOME (ax203 canon digigr8 dimagev directory docupen jl2005a jl2005c kodak_dc240 mars pentax ptp2 ricoh_g3 sierra sonix sq905 st2205 topfield tp6801 SKIPPING lumix) 0.001918 main (2): + gcc (C compiler used) 0.002137 main (2): + ltdl (for portable loading of camlibs) 0.002245 main (2): + EXIF (for special handling of EXIF files) 0.002359 main (2): libgphoto2_port 0.12.0 0.002654 main (2): libgphoto2_port has been compiled with the following options: 0.002758 main (2): + iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi 0.002852 main (2): + gcc (C compiler used) 0.002940 main (2): + ltdl (for portable loading of iolibs) 0.003031 main (2): + EXIF (for vusb) 0.003124 main (2): + USB (libusb1, for USB cameras) 0.003218 main (2): + serial (for serial cameras) 0.003758 main (2): + no resmgr (serial port access and locking) 0.003873 main (2): + no ttylock (serial port locking) 0.004016 main (2): + no lockdev (serial port locking) 0.004170 main (2): CAMLIBS env var not set, using compile-time default instead 0.004269 main (2): IOLIBS env var not set, using compile-time default instead 0.004362 main (2): invoked with following arguments: 0.004458 main (2): --debug 0.004896 main (2): --debug-logfile=gphoto2.txt 0.004997 main (2): --summary 0.005360 load_settings (2): Creating gphoto config directory ('/home/pi/.gphoto') 0.005988 load_settings (2): Loading settings from file '/home/pi/.gphoto/settings'. 0.008170 main (2): The user has not specified both a model and a port. Try to figure them out. 0.008406 gp_port_info_list_load (2): Using ltdl to load io-drivers from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0'... 0.009582 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/disk'. 0.012061 gp_port_library_list (2): found fstab fsname proc 0.012363 gp_port_library_list (2): found fstab fsname PARTUUID=738a4d67-01 0.012960 gp_port_library_list (2): found fstab fsname PARTUUID=738a4d67-02 0.013789 gp_port_library_list (2): found mtab fsname /dev/root 0.014041 gp_port_library_list (2): found mtab fsname devtmpfs 0.014191 gp_port_library_list (2): found mtab fsname sysfs 0.014332 gp_port_library_list (2): found mtab fsname proc 0.014471 gp_port_library_list (2): found mtab fsname securityfs 0.014610 gp_port_library_list (2): found mtab fsname tmpfs 0.014856 gp_port_library_list (2): found mtab fsname devpts 0.015124 gp_port_library_list (2): found mtab fsname tmpfs 0.015613 gp_port_library_list (2): found mtab fsname tmpfs 0.015907 gp_port_library_list (2): found mtab fsname tmpfs 0.016209 gp_port_library_list (2): found mtab fsname cgroup2 0.016365 gp_port_library_list (2): found mtab fsname cgroup 0.016501 gp_port_library_list (2): found mtab fsname none 0.016726 gp_port_library_list (2): found mtab fsname cgroup 0.016872 gp_port_library_list (2): found mtab fsname cgroup 0.017445 gp_port_library_list (2): found mtab fsname cgroup 0.017629 gp_port_library_list (2): found mtab fsname cgroup 0.017770 gp_port_library_list (2): found mtab fsname cgroup 0.017906 gp_port_library_list (2): found mtab fsname cgroup 0.018040 gp_port_library_list (2): found mtab fsname cgroup 0.018173 gp_port_library_list (2): found mtab fsname systemd-1 0.018312 gp_port_library_list (2): found mtab fsname sunrpc 0.018572 gp_port_library_list (2): found mtab fsname debugfs 0.018817 gp_port_library_list (2): found mtab fsname mqueue 0.018965 gp_port_library_list (2): found mtab fsname configfs 0.019245 gp_port_library_list (2): found mtab fsname /dev/mmcblk0p1 0.019478 gp_port_library_list (2): found mtab fsname /etc/nas.autofs 0.019633 gp_port_library_list (2): found mtab fsname tmpfs 0.020424 foreach_func (2): Loaded '' ('^disk:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/disk'. 0.020596 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.022704 foreach_func (2): Loaded 'PTP/IP Connection' ('ptpip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.022917 foreach_func (2): Loaded '' ('^ptpip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.023022 foreach_func (2): Loaded 'IP Connection' ('ip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.023125 foreach_func (2): Loaded '' ('^ip:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/ptpip'. 0.023226 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.026773 foreach_func (2): Loaded 'Serial Port Device' ('serial:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.026966 foreach_func (2): Loaded '' ('^serial:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/serial'. 0.027067 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.078635 foreach_func (2): Loaded '' ('^usb:') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.078850 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:001,004') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.078956 foreach_func (2): Loaded 'Universal Serial Bus' ('usb:001,003') from '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usb1'. 0.079051 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usbdiskdirect'. 0.081387 foreach_func (2): Called for filename '/usr/lib/arm-linux-gnueabihf/libgphoto2_port/0.12.0/usbscsi'. 0.085648 gp_port_info_list_count (2): Counting entries (10 available)... 0.085860 gp_port_info_list_count (2): 5 regular entries available. 0.086114 gp_abilities_list_load_dir (2): Using ltdl to load camera libraries from '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1'... 0.087257 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ax203'. 0.087475 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/canon'. 0.087590 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/digigr8'. 0.087693 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/dimagev'. 0.087905 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/directory'. 0.088014 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/docupen'. 0.088121 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/jl2005a'. 0.088228 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/jl2005c'. 0.088336 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/kodak_dc240'. 0.088437 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/mars'. 0.088539 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/pentax'. 0.088644 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ptp2'. 0.088749 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ricoh_g3'. 0.088853 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sierra'. 0.088957 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sonix'. 0.089058 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/sq905'. 0.089164 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/st2205'. 0.089270 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/topfield'. 0.089374 foreach_func (2): Found '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/tp6801'. 0.089553 gp_abilities_list_load_dir (2): Found 19 camera drivers. 0.654332 gp_port_info_list_count (2): Counting entries (10 available)... 0.654588 gp_port_info_list_count (2): 5 regular entries available. 0.654683 gp_port_new (2): Creating new device... 0.654829 gp_port_info_list_get_info (2): Getting info of entry 0 (10 available)... 0.656551 gp_port_set_settings (2): Setting settings... 0.656771 gp_port_info_list_get_info (2): Getting info of entry 1 (10 available)... 0.658614 gp_port_set_settings (2): Setting settings... 0.658802 gp_port_info_list_get_info (2): Getting info of entry 2 (10 available)... 0.661234 gp_port_set_timeout (2): Setting port timeout to 500 milliseconds. 0.661423 gp_port_set_settings (2): Setting settings... 0.661550 gp_port_info_list_get_info (2): Getting info of entry 3 (10 available)... 0.708987 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds. 0.709187 gp_port_set_settings (2): Setting settings... 0.709330 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:001,004, (new int=0, conf=-1, alt=-1) port usb:001,004 0.709435 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.709533 gp_abilities_list_detect_usb(2): Auto-detecting USB cameras... 0.726130 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x29a, subclass, 0xffffffff, protocol 0xffffffff)... 0.738478 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x6, subclass, 0x1, protocol 0x1)... 0.739564 gp_port_info_list_get_info (2): Getting info of entry 4 (10 available)... 0.789264 gp_port_set_timeout (2): Setting port timeout to 5000 milliseconds. 0.789465 gp_port_set_settings (2): Setting settings... 0.789611 gp_libusb1_update (2): (old int=0, conf=-1, alt=-1) port usb:001,003, (new int=0, conf=-1, alt=-1) port usb:001,003 0.789710 gp_libusb1_update (2): lowlevel libusb1 port not yet opened, no need for libusb changes 0.789808 gp_abilities_list_detect_usb(2): Auto-detecting USB cameras... 0.806231 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x29a, subclass, 0xffffffff, protocol 0xffffffff)... 0.818776 gp_libusb1_find_device_by_class_lib(2): Looking for USB device (class 0x6, subclass, 0x1, protocol 0x1)... 0.819920 gp_port_free (2): Freeing port... 0.820430 gp_port_close (2): Closing port... 0.825083 gp_camera_set_abilities (2): Setting abilities ('Nikon Z5')... 0.825335 gp_setting_set (2): Setting key 'model' to value 'Nikon Z5' (gphoto2) 0.825461 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.827315 gp_port_info_list_lookup_path(2): Looking for path 'ptpip:192.168.0.50' (10 entries available)... 0.827514 gp_port_info_list_lookup_path(2): Starting regex search for 'ptpip:192.168.0.50'... 0.827692 gp_port_info_list_lookup_path(2): Trying '^disk:'... 0.828244 gp_port_info_list_lookup_path(2): re_match failed (-1) 0.828384 gp_port_info_list_lookup_path(2): Trying '^ptpip:'... 0.829109 gp_port_info_list_get_info (2): Getting info of entry 5 (11 available)... 0.829301 gp_camera_set_port_info (2): Setting port info for port 'Generic Port' at 'ptpip:192.168.0.50'... 0.830907 gp_port_set_settings (2): Setting settings... 0.831115 gp_setting_set (2): Setting key 'port' to value 'ptpip:192.168.0.50' (gphoto2) 0.831238 save_settings (2): Saving 3 setting(s) to file "/home/pi/.gphoto/settings" 0.833251 gp_camera_init (2): Initializing camera... 0.833455 gp_camera_init (2): Loading '/usr/lib/arm-linux-gnueabihf/libgphoto2/2.5.26.1/ptp2'... 0.864220 gp_port_open (2): Opening port... 0.865388 ptp_ptpip_connect (2): connecting to ptpip:192.168.0.50. 0.947179 ptp_ptpip_init_command_request(3): ptpip/init_cmd data: (hexdump of 48 bytes) 0000 30 00 00 00 01 00 00 00-45 91 c2 47 2c 18 b0 38 0.......E..G,..8 0010 26 d4 a8 07 3c cd 52 a2-72 00 70 00 69 00 31 00 &...<.R.r.p.i.1. 0020 2d 00 74 00 65 00 73 00-74 00 00 00 00 00 01 00 -.t.e.s.t.......

0.948078 ptp_ptpip_init_command_request ptpip.c:481: return 48 / len 48 0.969990 ptp_ptpip_generic_read (3): ptpip/generic_read header: (hexdump of 8 bytes) 0000 0c 00 00 00 05 00 00 00- ........

0.970253 ptp_ptpip_generic_read (3): ptpip/generic_read data: (hexdump of 4 bytes) 0000 01 00 00 00 - ....

0.970371 ptp_ptpip_init_command_ack ptpip.c:506: bad type returned 5 0.971370 camera_init library.c:9366: Failed to connect. 0.971563 gp_port_close (2): Closing port... 0.982322 gp_camera_free (2): Freeing camera... 0.982661 gp_port_free (2): Freeing port... 0.982758 gp_port_close (2): Closing port... 0.983219 gp_filesystem_reset (2): resetting filesystem 0.983359 gp_filesystem_lru_clear (2): Clearing fscache LRU list... 0.983928 gp_filesystem_lru_clear (2): fscache LRU list already empty 0.984092 delete_all_folders (2): Internally deleting all folders from '/'... 0.984190 lookup_folder (2): Lookup folder '/'... 0.984286 lookup_folder (2): Found! / is 0x1b0460 0.984381 recurse_delete_folder (2): Recurse delete folder 0x1b0460// 0.984475 delete_all_files (2): Delete all files in folder 0x1b0460//

But for me it looks like the error beeing reported is the same as the one before, am I right? With airnef I observed that not only the GUID, but also to hostsname was relevant while connecting. Is there an option to set the hostname was well in gphoto?

Nears commented 3 years ago

Do you see any chance to get this solved or pushed further?

luzpaz commented 1 year ago

can you show a debug of this connection attempt? is the camera reporting anything on its dispolay?

@msmeissn, response is https://github.com/gphoto/gphoto2/issues/384#issuecomment-757961686

msmeissn commented 1 year ago

PTP IP response 5 is basically "permission denied", so the GUID we sent is not the one the camera expects.