FC.SDK
1.3.371
dotnet add package FC.SDK --version 1.3.371
NuGet\Install-Package FC.SDK -Version 1.3.371
<PackageReference Include="FC.SDK" Version="1.3.371" />
<PackageVersion Include="FC.SDK" Version="1.3.371" />
<PackageReference Include="FC.SDK" />
paket add FC.SDK --version 1.3.371
#r "nuget: FC.SDK, 1.3.371"
#:package FC.SDK@1.3.371
#addin nuget:?package=FC.SDK&version=1.3.371
#tool nuget:?package=FC.SDK&version=1.3.371
FC.SDK — Free Canon SDK
Canon EOS camera control via PTP over USB and WiFi — pure managed C#, no EDSDK binary required.
Why
Canon's EDSDK is closed-source, non-redistributable, and Windows-only. FC.SDK implements the same camera control capabilities using the PTP protocol (reverse-engineered by the libgphoto2 project), working over USB and WiFi on any platform.
Transports
| Transport | Platform | Driver swap? | Notes |
|---|---|---|---|
| WPD (Windows Portable Devices) | Windows | None — plug & play | Uses stock MTP driver, AOT compatible |
| USB (LibUsbDotNet) | Linux/macOS/Windows | WinUSB on Windows | Cross-platform, lowest latency |
| PTP/IP (WiFi) | All | None | TCP port 15740, no cable needed |
Usage
using FC.SDK;
using FC.SDK.Canon;
// Connect via WPD (Windows, zero-install)
await using var camera = CanonCamera.ConnectWpd(deviceId);
await camera.OpenSessionAsync();
Console.WriteLine($"{camera.Model} — serial {camera.SerialNumber}, battery {camera.BatteryLevelPercent}%");
// Typed settings — no magic uint32s
await camera.SetISOAsync(EdsISOSpeed.ISO_800);
await camera.SetShutterSpeedAsync(EdsTv.Tv_1_125);
await camera.SetApertureAsync(EdsAv.Av_2_8);
// Snap and download (auto-detects CR2, CR3, JPG)
await camera.SetSaveToAsync(EdsSaveTo.Host);
camera.ObjectAdded += async (s, e) =>
{
var (_, fileName) = await camera.GetObjectFileNameAsync(e.ObjectHandle);
await using var fs = File.Create(fileName ?? "capture.cr2");
await camera.DownloadAsync(e.ObjectHandle, fs);
await camera.TransferCompleteAsync(e.ObjectHandle);
};
camera.StartEventPolling();
await camera.TakePictureAsync();
// Bulb exposure (mode dial must be on B)
await camera.SetMirrorLockupAsync(EdsMirrorUpSetting.On);
await camera.BulbStartAsync();
await Task.Delay(TimeSpan.FromSeconds(120));
await camera.BulbEndAsync();
// Live view + manual focus
await camera.StartLiveViewAsync();
var (error, jpeg) = await camera.GetLiveViewFrameAsync();
await camera.DriveLensAsync(EdsDriveLensStep.NearSmall);
await camera.StopLiveViewAsync();
Architecture
CanonCamera (public async API)
CanonPtpSession (Canon vendor opcodes 0x9xxx)
PtpSession (transaction management, half-duplex lock)
IPtpTransport (WPD / USB / PTP-IP)
Feature Matrix
| Feature | FC.SDK | Canon.EDSDK (.NET) | Canon EDSDK.dll (native) |
|---|---|---|---|
| Take picture | yes | yes | yes |
| Bulb exposure | yes | yes | yes |
| Download CR2/CR3/JPEG | yes | yes | yes |
| Live view (MJPEG) | yes | yes | yes |
| Manual focus (DriveLens) | yes | yes | yes |
| Read/write ISO, Tv, Av | yes | yes | yes |
| Event polling (GetEvent) | yes | yes | yes |
| Mirror lockup control | yes | yes | yes |
| WPD (zero-install, Windows) | yes | no (wraps EDSDK.dll) | internally, not exposed |
| USB (LibUsbDotNet, cross-plat) | yes | no | Windows only |
| WiFi (PTP/IP) | yes | no | yes |
| Linux / macOS | yes (USB, WiFi) | no | no |
| NativeAOT compatible | yes | yes | n/a |
| Redistributable | MIT | LGPL | no (Canon license) |
| Requires vendor binary | no | yes (EDSDK.dll) | yes (EDSDK.dll) |
| Requires driver swap (Zadig) | WPD: no, USB: yes | n/a | no |
Canon.EDSDK (SharpAstro/Canon.EDSDK) is a .NET binding around Canon's native EDSDK.dll. It requires the vendor binary and only runs on Windows. FC.SDK reimplements the PTP protocol directly and needs no vendor DLLs.
Supported Cameras
Tested with Canon EOS 6D. Should work with any Canon EOS body that supports PTP — the Canon vendor opcodes are shared across the EOS lineup.
AOT Compatible
The entire library including the WPD transport is NativeAOT compatible — no dynamic, no reflection, all COM interop via [GeneratedComInterface].
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- LibUsbDotNet (>= 2.2.75)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FC.SDK:
| Package | Downloads |
|---|---|
|
TianWen.Lib
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.371 | 0 | 4/9/2026 |
| 1.2.361 | 0 | 4/9/2026 |
| 1.2.351 | 0 | 4/9/2026 |
| 1.2.341 | 0 | 4/9/2026 |
| 1.0.331 | 0 | 4/9/2026 |
| 1.0.321 | 3 | 4/8/2026 |
| 1.0.311 | 3 | 4/8/2026 |
| 1.0.301 | 20 | 4/8/2026 |
| 1.0.291 | 27 | 4/8/2026 |
| 1.0.281 | 19 | 4/8/2026 |
| 1.0.271 | 18 | 4/8/2026 |
| 1.0.261 | 23 | 4/8/2026 |
| 1.0.251 | 22 | 4/8/2026 |
| 1.0.241 | 25 | 4/8/2026 |
| 1.0.231 | 17 | 4/8/2026 |
| 1.0.221 | 30 | 4/8/2026 |
| 1.0.211 | 22 | 4/8/2026 |
| 1.0.201 | 28 | 4/8/2026 |
| 1.0.191 | 27 | 4/8/2026 |
| 1.0.181 | 29 | 4/8/2026 |