[go: nahoru, domu]

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

Nikon 1 S1 capture hangs #845

Open
aluckycode opened this issue Oct 2, 2022 · 8 comments
Open

Nikon 1 S1 capture hangs #845

aluckycode opened this issue Oct 2, 2022 · 8 comments
Assignees
Labels
Nikon tagging Nikon reports

Comments

@aluckycode
Copy link
aluckycode commented Oct 2, 2022

I could not get --capture-image-and-download work on the Nikon 1 S1, but by looking at the J1 and V1 issues I was able to make it work by modifying some code in library,c

@@ -514,6 +514,7 @@ fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) {

                        /* V1 and J1 are a less reliable then the newer 1 versions, no changecamera mode, no getevent, no initiatecapturerecinsdram */
                        if (    !strcmp(params->deviceinfo.Model,"V1") ||
+                               !strcmp(params->deviceinfo.Model,"S1") ||
                                !strcmp(params->deviceinfo.Model,"J1")
                        ) {
                                /* on V1 and J1 even the 90c7 getevents does not work */
@@ -528,6 +529,13 @@ fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) {
                                                GP_LOG_D("On Nikon V1: disable NIKON_InitiateCaptureRecInSdram as its unreliable");
                                                di->OperationsSupported[i] = PTP_OC_InitiateCapture; /* overwrite */
                                        }
+                                       if (!strcmp(params->deviceinfo.Model,"S1") &&
+                                            (di->OperationsSupported[i] == PTP_OC_NIKON_InitiateCaptureRecInMedia))
+                                       {
+
+                                               GP_LOG_D("On Nikon S1: disable NIKON_InitiateCaptureRecInMedia as its unreliable");
+                                               di->OperationsSupported[i] = PTP_OC_InitiateCapture; /* overwrite */
+                                       }
                                }

I do not know if this is the best way to fix the problem but it seems to work for me for basic capture. I did see errors in the log for InitiatecaptureRecInMedia before this change.

Does Bulb mode work in any one of the Nikon 1 series through gphoto2/libgphoto2 ? I do see an action for bulb

/main/actions/bulb
Label: Bulb Mode
Readonly: 0
Type: TOGGLE
Current: 2
END
@msmeissn msmeissn self-assigned this Oct 3, 2022
@msmeissn msmeissn added the Nikon tagging Nikon reports label Oct 3, 2022
@msmeissn
Copy link
Contributor
msmeissn commented Oct 3, 2022

can you also attach the s1.log from

gphoto2 --summary --debug --debug-logfile=s1.log

@msmeissn
Copy link
Contributor
msmeissn commented Oct 3, 2022

i put in your fixed code, also try to get my hands on a S1.
(The whiole area of code is really hacky there.)

@aluckycode
Copy link
Author

can you also attach the s1.log from

gphoto2 --summary --debug --debug-logfile=s1.log

s1.log

This is for firmware version 1.2

@aluckycode
Copy link
Author

Looking at the open issues it is possible that J5 (#816) and J3 (#803) have the same problem. My guess based on what I saw on the S1 is that the J3 has older firmware and once updated will show the same problems as the S1 and J5.

@msmeissn
Copy link
Contributor
msmeissn commented Oct 8, 2022

did you have an sd card inserted
if I insert an SD card the before code works as-is.

@msmeissn
Copy link
Contributor
msmeissn commented Oct 8, 2022

I now own a:
Model: S1
Version: Ver.1.1003

I see you have
Model: S1
device version: Ver.1.2004
e.g. newer firmware.

@aluckycode
Copy link
Author

did you have an sd card inserted if I insert an SD card the before code works as-is.

Yes I have an SD card inserted.

@aluckycode
Copy link
Author
aluckycode commented Oct 8, 2022

I now own a: Model: S1 Version: Ver.1.1003

I see you have Model: S1 device version: Ver.1.2004 e.g. newer firmware.

The camera came with 1.0 firmware and capture worked with the old gphoto2. The
shutterspeed2 settings did not make it to the picture though. I could read and write them
with correct values, just that the camera did not use the value.

So I upgraded the firmware from the Nikon site which is 1.2. It was then the capture stopped working.
Not sure which firmware would have been easier to fix, but I wish I had some way to try out the older firmware.
So if you can extract the firmware from the camera before you upgrade and hold on to it, it would be good.

Can 1.1003 do bulb captures?

clrpackages pushed a commit to clearlinux-pkgs/libgphoto2 that referenced this issue Sep 28, 2023
…on 2.5.31

Antonio Ceballos Roa (1):
      updated spanish

Ben Govero (6):
      merged some canon eos pieces from https://github.com/NorthOfYou/libgphoto2
      Nikon put_viewfinder down should do a busy check
      merge over new Sony compression, jpeg quality, save format, save size
      Added Nikon AF-F focus mode value
      Added the 1dx mark ii image format choices
      Added special imageformat handling for the 1DX iii

Daniel (1):
      Fix SHUTTER_SPEED_1_6_SEC (#877)

Daniel Schulte (1):
      camlibs/ptp2: Add support for Panasonic cameras in camera_trigger_capture (#822)

Dmitry D. Chernov (1):
      Fix empty PTP strings not being null-terminated in parse_9301_value() (#830)

Ed Maste (1):
      Update CI FreeBSD image to latest supported release (#915)

Fabio T (1):
      added friulian translation

Gergely Erdélyi (1):
      Add support for Fujifilm X-H2 (#861)

Hans Ulrich Niedermann (23):
      camlib build var cleanup
      gh workflow: actually upgrade the system
      gh workflow: work around libgd-dev dependency problem
      gh workflow: remove apt-get dist-upgrade
      Use LIBGD_* with $(...) instead of @...@
      Use LIBWS232_* with $(...) instead of @...@
      bs: forbid unexapanded LT_ macros in configure
      Find working URL for "Writing shared libraries"
      "Writing shared libraries" URL is available again
      Using _LDFLAGS for libs is wrong, use _LDADD
      Use per-program "noinst_PROGRAMS +=" line
      gh workflow: Update to actions/checkout@v3
      Define main function as "int main(void)" (with void)
      ci: Update indentation and quote names
      ci: Add global LC_ALL and COMMON_CONFIGURE_FLAGS
      ci: Prepare for portable concurrent make
      ci: Update step names
      ci: Prepare for OS specific build flags
      ci: Rename CI build
      ci: Add comment pointing to actionlint
      ci: Add CI build for macOS
      ci: Add Cirrus CI build for FreeBSD
      SECURITY.md: Link to Github private vulnerability reporting

Ingvar Stepanyan (7):
      Fix `GP_UNKNOWN_EVENT` leaks in examples (#833)
      Remove printf leftover (#836)
      Zero-fill CameraFileInfo (#838)
      Fix couple of leaks in virtual camera (#839)
      Allow customizing vcamera directory at runtime (#840)
      Unify & fix file reading in vcamera (#841)
      Fix building virtual camera on macOS (#843)

Kris Slyka (1):
      Fix camera crash caused by digigr8 camlib

Laurent Clévy (1):
      Create canon-eos-discovery.md (#884)

Li kunyu (3):
      Optimize some code statements (#844)
      docupen: Remove redundant semicolons
      serial: Add check after malloc allocation (#878)

Marcus Meissner (121):
      2.5.30.1 development snapshot
      added eos 850d alias
      from gphoto/libgphoto2#792
      added nikon z30
      use the same flags for the 1500D and 2000D, fixes gphoto/libgphoto2#812
      added pentax kp in ptp mode
      olc info ver instead of curoff in check§
      added a "testolc" option to help with EOS OLC size detection
      fix bitmask
      statred to work on new olcsize handling
      merged the v11 olc info we have in 1 github issue
      more debugging output in olc code
      added m6 mark 2 entry, also added powershot sx720hs entry, and some notes on eos 750d/eos 5ds
      note that m10 is also type 8
      updates for EOS 100D
      fixed a too small loop bound value. fixes gphoto/libgphoto2#820
      fixed incorrect size to printf , fixes https://github.com/gphoto/libgphoto2/security/code-scanning/27
      fixes gphoto/libgphoto2#821.
      added olc infos
      extra dist for the olc info document
      added EOS R10
      added eos r5 c
      report only fstype, not fsname ... otherwise might like pths or UUIDs in logfiles
      added another trace to EOS R
      fixed the non-fuzz camera detection in vusb
      fixed an endless loop due to the DCIM being a '' name
      Rewrite the OLC handling logic to be table driven, as we now have too many choices.
      init position_new as an exit condition
      added canon eos r7 gphoto/libgphoto2#832
      added eos r7 debug
      report storereadonly instead of generalerror, as generalerror is ignored in our ptp stack.
      repotr PTP_RC_StoreNotAvailable during capture if we have no image
      remove duplicate code, add some comments
      use the correct error handling method (C_PTP instead of CR)
      remove noisy warning in non-fuzz mode. fixes gphoto/libgphoto2#842
      some Canons have an enum from 0-3 for the battery level instead of going from 0 to 100.
      Hide all the fuzzing code behind a ifdef FUZZING
      filter out more commands on the Nikon S1. gphoto/libgphoto2#845
      use a local PTP event queue in nikon capture to avoid checking interrupts on any event,
      free storedevents after use
      added NEWS
      Wrap unsafe libltdl calls with locking (#848)
      always build gpi_vsnprintf, as we use it unconditionally in libgphoto2
      add a --disable-debug test too
      try to fix 4 codeql warnings
      fix some CodeQL warnings
      try to fix codeql integer expansion warning
      fixed missing arguments in 2 debug functions, spotted by codeql
      convert malloc (overflowing mult) to calloc(x,y) that handles this internally
      convert a malloc(w*h) to calloc(w,h) to avoid overflow issues, found by codeql
      sony manual focus is actually INT16, not UINT16. gphoto/libgphoto2#793
      added gopro hero11 black
      nikon z6 2 workaround, it reports a devicepropchanged 0x501c event, but the property is not avauilable
      added some more z6-2 debug
      if we fail to spot a direction, use single stepping instead.
      added sigma fp l
      fixed 2.5.30.1 dev entry
      updated NEWS to current state
      added canon eos r6 2
      name it R6m2
      canon eos: if half press succeeds, and full press fails, roll back half-press again
      fix WSACleanup condition
      added a missing return code check for ptp_fuji_getdeviceinfo (Coverity)
      fixed ptp_debug parameters (Coverity)
      make it clear we only use 32bit of time_t (Coverity)
      use unsigned long for time_t usage (Coverity)
      avoid uninitialized variable when setting non standard values (Coverity)
      switch debug print of a time_t based variable to long int (Coverity)
      handle time_t as long (Coverity)
      added x-t5
      aded z30 dsate
      fixed one superflous argument to debug (Coverity)
      added some apparent missijng include unistd.h to make it build for mingw/llvm . fixes gphoto/libgphoto2#890
      break out of the setter loop if we reached the correct state
      remove incorrect superflous exit code. is handled below
      mark when the put function already set the value in the camera,
      added sony ilce-1 , gphoto/libgphoto2#892
      use uint32_t instead of unsigned int
      added Ricoh GR IIIx
      make it default fuzz ptp ... so --enable-vusb will give us a camera
      synthesize a capturecomplete event for panasonic cameras, as they dont send on on their own
      allow trigger capture for panasonic
      disable checking on the 0x80 flag as success, mightz not be correct
      more debug in ptp_sigma_fp_getcapturestatus
      added ILCE-7M3 to the sony wait logic.
      added sonly ilce 7m3 debug
      decoce mirrorlock up state for EOS, as mirrorstatus for config. gphoto/libgphoto2#913
      allow writing to mirrorup state
      decode 1 more EOS mirror prop as uitn32.
      renamed mirrorupstatus to mirrorup on EOS; it seems this is the settable option
      rename mirrorup -> mirrorlock, disable writeability of status props
      added PTP_DPC_CANON_EOS_StroboDispState with 32bit
      also decode EOS_LvCFilterKind as 32bit
      added somre more uint32 ones
      aded gopro hero11 black mini
      also adjust liveview size to be 32bit
      added nikon z8
      decode nikon autoiso
      fixed liveview size being 32bit now
      enable OLYMPUS OM-1 for capture
      also allow OMSYSTEM as OLYMPUS equivalent
      updatgd news
      on newer EOS, OLC shutterspeed is at byte offset 7
      merge over some knowledge from git@github.com:NorthOfYou/libgphoto2.git on newer sony cameras
      mark some more props as uint32 for now
      fix typo
      moved to other section
      merged from libmtp
      another mtp id
      updated
      year is 2023
      add sony mode 300 detection and initialization (from NorthOfYou fork)
      added georgian
      added friulian
      added sony a7s mark 3 aka ILCE-7SM3
      increment the wait for the new sony to 3 seconds again. better debuggin
      updated NEWS
      disable uuilock/unlocking around pcchdd capacity setting.
      do not uilock around pcchdcpacity, as this breaks EOS 2000D/1500D for some reason
      synced music-plaers.h from libmtp
      2.5.31 release

Mark Watson (3):
      Add 2 new settings metadata for Sony A7R3 (#872)
      Only format log messages when a log function is registered for given log level. (#871)
      Add properties to control Sony focus assist magnification, useful for remotely dialing in focus using live view / preview. (#883)

Omri Sarig (1):
      Fix pointer issues in local PTP event queue in Nikon capture (#849)

Ryan Heimbuch (1):
      added fuji focuspoints, focuspoint and zoompos values

Sebastian Rasmussen (2):
      updated svensk
      updated swedish

Temuri Doghonadze (2):
      added georgian translation
      added georgian

paolodepetrillo (1):
      Fix string overflow in camera_summary (#910)
icheered pushed a commit to icheered/libgphoto2-testing that referenced this issue Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nikon tagging Nikon reports
Projects
None yet
Development

No branches or pull requests

2 participants