gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
989 stars 316 forks source link

Nikon Z6ii build in wifi - Access Denied #976

Open uwes-ufo opened 2 months ago

uwes-ufo commented 2 months ago

This is not a bug. I would like to use the integrated WiFi on my Nikon Z6_2.

Unfortunately, the PTP_OC_GetObjectInfo (1008) command returns a PTP_RC_AccessDenied (200F). The camera clears AccessDenied as soon as I mark an image for upload and the PTP_OC_NIKON_AdvancedTransfer (9010) command is sent. However, command 9010 blocks if no image is selected to upload.

Does anyone know a better way to disable "AccessDenied"?

msmeissn commented 2 months ago

I know that NIKON_AdvancedTransfer exists, but its currently not hooked up in libgphoto2. I also checked the Z6_2 SDK, it does not list it as valid command. So I cant say what it does. It seems it was / is used by CoolPix Wifi.

is it not enabling browsing for all pictures via the regular PTP methods? Have not tested thsi on my Z6 for a while though.

uwes-ufo commented 2 months ago

The access lock is active after the wifi connection is established. In both infrastructure and base station modes. (Not in smart device mode, however.)

This means that it is initially not possible to browse through the file system.

The PTP_OC_GetPartialObject (101b) command is also affected by the lock. However, the command PTP_OC_NIKON_GetPartialObjectEx (9431) does not. This could be a solution for downloading the images. Then there is 9361 in conjunction with PTP_OC_NIKON_GetObjectsMetaData (9434) as a poor replacement for 1008. But it doesn't work for images in the SDRAM. Finally, you would have to have a replacement for PTP_OC_GetThumb (100a): This could perhaps be 9530...

All in all, it would be easier to solve the access block.