Jump to content

Canada's top-tier Telescopes & Accessories
Be as specific as possible when reporting issues and *ALWAYS* include the full version number of the application you are using and your exact *CAMERA MODEL*
PLEASE READ ==> If you get a StructureMap or EdsInitializeSDK() error please RE-INSTALL before posting in the forum <==
  • 0
deansj

Recovery from SDK Error

Question

I am trying to troubleshoot recurring failed imaging sessions.  I am using BYN 2.0.10 on Windows 10 with a Nikon D5300.  The log shows a time-out when attempting to save images to PC+Camera.  Things seem to be fine if save to Camera only is selected, suggesting to me that I have a data transfer issue.  I am using a quality powered USB cable and an upowered hub connected to two devices, neither requiring power over USB.

15:00:31  Licensed to xxxxxxx
15:01:00  Attempting to connect camera...
15:05:04  Imaging session started.
15:05:11  Imaging session completed successfully
15:05:37  Imaging session started.
15:06:49  Imaging session completed successfully
15:07:03  Imaging session started.
15:07:17  NIKON SDK ERROR: [kNkMAIDResult_CameraNotFound] (kNkMAIDCommand_CapStart, 20, kNkMAIDDataType_Null, 0)
15:08:01  Copy to clipboard
15:08:08  Imaging session cancelled
15:08:08  Image download timeout, process terminated after 59 seconds
15:08:18  NIKON SDK ERROR: [kNkMAIDResult_SessionFailure] (kNkMAIDCommand_Open, 1, kNkMAIDDataType_ObjectPtr, 490138596)
15:09:20  NIKON SDK ERROR: [kNkMAIDResult_SessionFailure] (kNkMAIDCommand_Open, 1, kNkMAIDDataType_ObjectPtr, 490124660)
15:10:21  NIKON SDK ERROR: [kNkMAIDResult_SessionFailure] (kNkMAIDCommand_Open, 1, kNkMAIDDataType_ObjectPtr, 490103080)

 

While I am trying to trace down the issue, a key problem is being unable to escape this condition.  The Abort command fails and the application retains a "Busy" status.  If I attempt to close the program, a prompt indicates a capture session is running and asks if I am sure I want to quit.  When I say to quit, the application appears frozen.  I need to invoke Task Manager to terminate the program, however sometimes even the Task Manager cannot be invoked, requiring a hard power recycle.

Is there another way to exit the program?  Is the SDK error communication related?

Thanks in advance.

Share this post


Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 0

By chance do you have Long Exposure Noise Reduction enabled in the camera? If so, disable it. This issue could also be caused by a flaky cable.

If BYN calls into the SDK and the SDK never returns then BYN will appear unresponsive. In that case you can either wait for it to recover on its own or kill it with the Windows Task Manager.

Share this post


Link to post
Share on other sites
  • 0

This is a core Nikon SDK failure, the camera seems to to be stuck and not able to provide an image.

The above snippet is NOT a log file, there is not much I can do that.  Please provide more detail.

What are you doing leading to this error?

Does it always fail?  

Does it work for a few images then fail?

Please try saving to CAMERA only, not CAMERA+PC and see if this makes a difference.

 

 

Share this post


Link to post
Share on other sites
  • 0

Replying to both queries above: 

Long Exposure NR is OFF as are most Nikon features.  Exposure delay is .5 seconds to reduce possible camera vibration.  

A retest failed after attempting a SINGLE image capture a single light and record it to PC + Camera.  I aborted the session successfully, reconnected the camera and successfully captured a single image to Camera only, and then successfully captured a single image to PC + Camera so the results are not consistent. 

To eliminate possible issues, I have removed the unpowered USB hub and have directly connected the D5300 to the powered USB cable.

Two log files are attached for reference.

Again, my thanks.

logfile-[20200120-16h30m28s850]-[8220]-2020-01-20.txt logfile-[20200120-16h02m17s453]-[7144]-2020-01-20.txt

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, deansj said:

I have removed the unpowered USB hub and have directly connected the D5300 to the powered USB cable.

Please elaborate.  A "Powered USB Cable" is usually an extended length cable with a USB Repeater/Booster embedded either in the center or end of the length.  Is this what you describe??  If so, is it high-quality (ie: StarTech)??  Realize that the Power supplied to such an Extender Cable is used solely for the Repeater and does not get shared to Downstream Devices.

As you are reporting an Intermittent Communication issue, a strong suggestion is to start by testing whit ONLY the NIKON-supplied USB Cable (to begin with).

Share this post


Link to post
Share on other sites
  • 0

Several models of Nikon cameras seem unable to save images to both the PC and the Camera. Try PC only. This is the "normal" operating mode.

I would also suggest that you never use an unpowered hub for connecting your astro gear. A powered hub ensures that every device gets all the power that it needs.

I am confused about how/where you are specifying the .5 second delay that you mentioned. None of the timing values (Delay, Mirror lock, or Pause) allow choosing a value less than one second. Of those only Mirror lock is intended to put a delay between the mirror up time and the start of the exposure. However, according to the Supported cameras grid, BYN does not support Mirror lock for any Nikon cameras. The Delay setting is only used once, at the start of an imaging plan. The Pause is a delay between exposures, but occurs outside of the mirror up/shutter open sequence. 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, deansj said:

Replying to both queries above: 

Long Exposure NR is OFF as are most Nikon features.  Exposure delay is .5 seconds to reduce possible camera vibration.  

A retest failed after attempting a SINGLE image capture a single light and record it to PC + Camera.  I aborted the session successfully, reconnected the camera and successfully captured a single image to Camera only, and then successfully captured a single image to PC + Camera so the results are not consistent. 

To eliminate possible issues, I have removed the unpowered USB hub and have directly connected the D5300 to the powered USB cable.

Two log files are attached for reference.

Again, my thanks.

logfile-[20200120-16h30m28s850]-[8220]-2020-01-20.txt 30.48 kB · 0 downloads logfile-[20200120-16h02m17s453]-[7144]-2020-01-20.txt 103.12 kB · 0 downloads

When you get a Nikon SDK error it's not sufficient to simply close the app and try again.  In order to make sure the camera is set back to a known state it is necessary to remove the battery fro about 30 seconds to completly power cycle the camera.  This could be the cause for the inconsistency.

Going forwards, make sure to save to PC only and if it fails again send me that log file.

Regards,

Share this post


Link to post
Share on other sites
  • 0

Replying to the above posts:

s3igell: The cable I am using should be up to the task.  It is a StarTech.com 15m USB 2.0 Active Extension Cable - M/F - 15 meter USB 2.0 Repeater Cable Cord - USB A Male to USB A Female - 15 m, Black (USB2AAEXT15M)   Granted it is 15 m and does not have a mid-length device, nor is it what is indicated as a preferred 2X 7m lengths.  However it is used for this purpose by others and I have yet to identify an specific concerns about it.  I will ask what the purpose of a powered hub is if neither of the connected devices are powered over USB?  At least that is my working assumption: the scope is separately 12v powered; the camera is separately powered.  Is the serial-usb converter not powered from the scope?  Regardless, I will test further with only the supplied Nikon USB short cable.

Astroman: I will certainly move to PC only given your comment and test further.  Anything more is redundant and might be problematic for the D5300.  Thanks for the guidance here.  Re the delay, I am using the D5300 function to delay the exposure to occur .5 seconds after the shutter rises.  I see it reflected in the log as a 500 ms delay, and I can here it working for each exposure.  Whether it dampens any vibration is speculative but I have seen it suggested if there is apparent motion in an exposure that is otherwise not explained.  It is accessed via Nikon's menu as follows: <Menu> <Custom Settings Menu> <d Shooting/Display> <d5 Exposure delay mode = ON>

Admin: I will observe the battery removal step after any future failures and certainly move to Camera only.  I would never have thought to do this.  I will do further testing and report.

'All support is appreciated.  Thank you.

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, deansj said:

The cable I am using should be up to the task.  It is a StarTech.com 15m USB 2.0 Active Extension Cable - M/F - 15 meter USB 2.0 Repeater Cable Cord - USB A Male to USB A Female - 15 m, Black (USB2AAEXT15M)   Granted it is 15 m and does not have a mid-length device, nor is it what is indicated as a preferred 2X 7m lengths.  However it is used for this purpose by others and I have yet to identify an specific concerns about it. 

That is the thing, it is not up to the task.  It is 3 times longer than what the underlying protocol was technically designed for. Granted, StarTech is a good brand, but at 45 feet there is simply not enough signal to maintain the full 480 Mbit/s data transfer IMO.  It might be good for a while under light load, but as soon there just enough data on the wire some data will get lost and then all bets are off, the active repeater is simply unable to amplify the weak signal at 480 Mbit/s. This is a physical limitation of the USB2 capability, no amount of cable quality can reconstruct lost signal.

Regards

Share this post


Link to post
Share on other sites
  • 0

To corroborate my statement above, I looked at your log file and they confirm what I was thinking.  The camera is loosing USB connectivity and it fires a disconnect event.  Immediately after the camera fires its disconnect event BYN started to report SDK errors.  Looking at the time stamp there is only 11 milliseconds between the disconnect event and the errors.

2020-01-20 16:09:05,356 [12] INFO  - Camera action fired: 'MaestroDisconnect'
2020-01-20 16:09:05,367 [NikonScheduler worker thread] INFO  - NIKON SDK ERROR: [kNkMAIDResult_CameraNotFound] (kNkMAIDCommand_CapStart, 20, kNkMAIDDataType_Null, 0)
2020-01-20 16:09:05,367 [NikonScheduler worker thread] ERROR - [kNkMAIDResult_CameraNotFound] (kNkMAIDCommand_CapStart, 20, kNkMAIDDataType_Null, 0)
2020-01-20 16:09:05,368 [NikonScheduler worker thread] ERROR -    at BinaryRivers.Camera.Nikon.Wrapper.NikonObject.CallEntryPoint(IntPtr pObject, eNkMAIDCommand ulCommand, UInt32 ulParam, eNkMAIDDataType ulDataType, Int32 data, IntPtr pfnComplete, IntPtr refComplete)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonObject.CallEntryPoint(eNkMAIDCommand ulCommand, UInt32 ulParam, eNkMAIDDataType ulDataType, Int32 data, IntPtr pfnComplete, IntPtr refComplete)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonObject.CallEntryPointAsync(eNkMAIDCommand ulCommand, UInt32 ulParam, eNkMAIDDataType ulDataType, Int32 data)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonDevice.DataItemAcquire(NikonObject data)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonDevice.HandleAddChild(UInt32 id)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonDevice.HandleEvent(NikonObject obj, eNkMAIDEvent currentEvent, UInt32 data)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonBase._object_Event(NikonObject sender, IntPtr refClient, eNkMAIDEvent ulEvent, UInt32 data)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonObject.EventProc(IntPtr refClient, eNkMAIDEvent ulEvent, UInt32 data)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonObject.CallEntryPoint(IntPtr pObject, eNkMAIDCommand ulCommand, UInt32 ulParam, eNkMAIDDataType ulDataType, Int32 data, IntPtr pfnComplete, IntPtr refComplete)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonObject.CallEntryPoint(eNkMAIDCommand ulCommand, UInt32 ulParam, eNkMAIDDataType ulDataType, Int32 data, IntPtr pfnComplete, IntPtr refComplete)
   at BinaryRivers.Camera.Nikon.Wrapper.NikonManager.Async()
 

Share this post


Link to post
Share on other sites
  • 0

Update:

Saving to PC only is now employed with good results.

SOME UNEXPECTED TEST RESULTS:

On my Lenovo AMD PC, capturing 10 light frames (ISO 1600 .25 seconds) results in consistent failure using powered USB cable consistently on just one USB 2.0 port configured as Standard OpenHCD USB Host Controller.

Same PC, same powered cable, I get no failures on a USB 3.0 port.  This despite the fact that the Startech cable is USB 2.0 and (I suspect) the Nikon USB out is USB 2.0  This USB  3.0 Port is confgured as Standard Enhanced PCI to USB Host Controller

Notes:

The same results occur with or without the Startech cable powered or unpowered over the 15 meter length!

Time to download 10 images to PC only: 1:30 to 1:40 over powered AND unpowered Startech cable.

Time to download 10 images to PC only using delivered Nikon USB cable: 1:40

Time to download 10 images to Camera only: 0:50.

Conclusions:

Cable length and powered did not factor in.

Camera only image save is much more faster (with obvious drawback)

USB port capability is key

Comments welcome.

John

Share this post


Link to post
Share on other sites
  • 0

My take on this, with the above results, tend to gravitate towards the usb2 host controller... perhaps the usb2 host is the one being over-saturated with data causing with the disconnect.

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, deansj said:

(I suspect) the Nikon USB out is USB 2.0

Per Nikon (https://www.nikonusa.com/en/nikon-products/product/mirrorless-cameras/z-6.html#tab-ProductDetail-ProductTabs-TechSpecs) the Z6 is a Superspeed USB3 using a Type-C Port.  So, the StarTech Cable was forcing a USB2 Compatibility-Speed downgrade.

Edited by s3igell
Crossed up threads

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

This site uses cookies to offer your a better browsing experience. You can adjust your cookie settings. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies, our Privacy Policy, and our Terms of Use