Skip to content

Help with Canon EDSDK: Error 0x61 during photo transfer! #8

@Wackelpudding3000

Description

@Wackelpudding3000

Hello GitHub Community,

I am working on a project where I aim to capture images with a Canon camera and transfer them to my PC using the Canon EDSDK. However, I am encountering a persistent issue: Error Code 0x61 appears whenever I try to transfer a captured image from the camera to the PC.

You can download the Python script as a ZIP file here:
https://github.com/user-attachments/files/18269265/camtest.zip

  1. Error Description:

    • The camera is correctly detected and initialized.
    • The photo is successfully captured.
    • When attempting to download the image using EdsDownload, the error 0x61 is returned.
  2. Steps Taken:

    • Set the storage target to "Host" using EdsSetPropertyData.
    • Configured host capacity using EdsSetCapacity.
    • Verified all functions return success until the image transfer step.
  3. Environment:

    • Language: Python with ctypes (bindings for Canon EDSDK)
    • Operating System: Windows 10
    • Camera: Canon EOS 1300D
    • Canon EDSDK Version: latest
  4. Failing Method:

    result = self.edsdk.EdsDownload(dirItem, 0xFFFFFFFF, stream)
  5. Attempts to Fix:

    • Tested different storage targets (e.g., camera storage instead of host).
    • Adjusted capacity values.
    • Added debugging and logging to identify potential issues.

Despite these efforts, the error persists. It seems the issue may lie in the camera configuration or how the image object is referenced.

Goal:
Enable the camera to successfully transfer a captured image to the PC.


Steps to Transfer Photos (Based on Canon EDSDK Manual):

1. Initialize the SDK:

  • Use EdsInitializeSDK to start the SDK.
  • Load the EDSDK library and verify initialization success.

2. Detect the Camera:

  • Call EdsGetCameraList to retrieve the list of connected cameras.
  • Check the number of cameras using EdsGetChildCount.
  • Use EdsGetChildAtIndex to select a camera from the list.

3. Open the Camera Session:

  • Open the camera session with EdsOpenSession.

4. Configure the Camera:

  • Set the camera's storage options to "Host" using EdsSetPropertyData:
    EdsSetPropertyData(camera, kEdsPropID_SaveTo, 0, sizeof(kEdsSaveTo_Host), &kEdsSaveTo_Host);
    
  • Specify host capacity using EdsSetCapacity.

5. Trigger the Camera:

  • Use EdsSendCommand to capture an image:
    EdsSendCommand(camera, kEdsCameraCommand_TakePicture, 0);
    

6. Retrieve the Image:

  • Access the captured image using EdsGetChildAtIndex to get a directory item (e.g., the most recent image).

7. Transfer the Image to the PC:

  • Create a file stream with EdsCreateFileStream to specify the destination path on the host.
  • Transfer the image using EdsDownload:
    EdsDownload(dirItem, 0xFFFFFFFF, stream);
    
  • Confirm the download completion with EdsDownloadComplete.

8. Close the Session and Terminate the SDK:

  • Close the camera session using EdsCloseSession.
  • Terminate the SDK using EdsTerminateSDK.

Common Issues:

  • Error 0x61: Occurs if the storage target or capacity is incorrectly set.
  • No Camera Detected: Check connections and drivers.
  • Download Failure: Ensure the directory item is correctly referenced.

What might be causing this error, and are there specific areas I should investigate to resolve the issue? Any help would be greatly appreciated. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions