NikonBase.CS D3000

Post Reply
Andrewiski
Posts: 6
Joined: Thu Jan 02, 2014 1:28 am

NikonBase.CS D3000

Post by Andrewiski » Fri Jan 03, 2014 10:52 pm

I am using a D3000 so maybe this camera behaves differently then the others but here is what I am seeing. If I connect to the camera using device manager and then take a picture is ee that the _stilImageDevice_Devicevent gets raised. void _stillImageDevice_DeviceEvent(object sender, PortableDeviceEventArgs e)        {            if (e.EventType.EventGuid == PortableDeviceGuids.WPD_EVENT_DEVICE_REMOVED)            {                _timer.Stop();                StillImageDevice.Disconnect();                StillImageDevice.IsConnected = false;                IsConnected = false;                OnCameraDisconnected(this, new DisconnectCameraEventArgs { StillImageDevice = StillImageDevice });            }            else            {                Thread thread = new Thread(getEvent);                thread.Start();            }        } If I explore the event vars I can see the filename etc of the picture that was taken etc. this in turn starts a background thread to call getEvent.  private void getEvent(object state)        {            try            {                if (_eventIsbusy)                    return;                _eventIsbusy = true;                //DeviceReady();                MTPDataResponse response = ExecuteReadDataEx(CONST_CMD_GetEvent);                 if (response.Data == null || response.Data.Length == 0)                {                    Log.Debug("Get event error :" + response.ErrorCode.ToString("X"));                    SlowDownEventTimer();                    _eventIsbusy = false;                    return;                }.....................   truncated On the D3000 ExecuteReadDataEx(CONST_CMD_GetEvent); always seems to return response.Data.Length == 0. Is there something funny with this camera or is that how it works on all the other cameras.  Before I go hacking away at your code just wanted to make sure it was something with this model camera as i don't have access to another to test with. What is wierd is there are no firmware updates and I see it isn't supported by the Nikon Command and Control almost like the functionality was dropped or changed as its there lower end camera or something. Any thoughts on this. ThanksAndy Andy 

NikonBase.CS D3000

Advertisment
 

mikepelton
Posts: 8
Joined: Wed Oct 01, 2014 2:15 pm

Maybe a D3000 issue

Post by mikepelton » Fri Oct 17, 2014 2:03 pm

Hi Andy, was playing in this piece of code a few moments ago myself, and that "bad response" you're seeing is definitely supposed to be an exception - I've only seen it (on a D800) by pressing the release button too many times too rapidly.If you drill back through Duka's code you'll see that each camera has its own foibles  - he's built a very comprehensive hierarchy of classes to handle small variations across the range, so there may be something specific to the way the D3000 expects to receive that command or returns a response to it.Not much help I know, but you're definitely seeing an unexpected result. CheersMike

Post Reply