• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mvisonneau / openshuttercounter / 33182126219
37%

Build:
DEFAULT BRANCH: main
Ran 28 Aug 2026 02:52PM UTC
Jobs 1
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Aug 2026 02:00PM UTC coverage: 36.5%. Remained the same
33182126219

push

github

mvisonneau
feat: read camera shutter actuation counts over USB

Reads the shutter and mirror actuation counters straight off a camera
over USB, on Linux, macOS and Windows, with no libgphoto2 and no vendor
SDK.

Cameras that still answer the standard PTP shutter counter property are
read that way, whatever the make. Canon removed that property on DIGIC 6
and newer bodies, which is why every free tool comes up empty on a 5D
Mark IV; on those the counters are read over the factory command channel
that reaches the memory of the MPU, the microcontroller driving the
shutter and mirror. Both opcodes carrying that channel require a data
phase, and missing it is what made the channel look closed for years.

  pkg/manufacturers  what a camera maker has to provide to be readable
  pkg/manufacturers/canon  Canon's factory channel and model list
  pkg/ptp            PTP over USB, enough to send vendor opcodes
  pkg/usb            usbfs on Linux, libusb via purego on macOS, the
                     still image device interface on Windows; no cgo,
                     no driver replacement on any of them
  pkg/trace          recording a conversation with a camera, and
                     reading it back
  pkg/pcap           reading USB captures, for traces from elsewhere

The framing is not written from a description. Every payload the code
builds is asserted byte for byte against what a camera has been observed
to accept, because a malformed payload puts a Canon body into Err 70.
Commands that write factory state are refused outright rather than left
unimplemented, and a test asserts the refusal.

Running with --trace records everything exchanged with the camera to a
file. Two traces taken an exact number of frames apart are enough for
anyone to confirm support for a body nobody has tried yet, which needs
no capture tooling and no hardware but their own.

Confirmed on an EOS 5D Mark IV, firmware 1.2.1. The Go implementation
has not yet been run against a camera; the macOS a... (continued)

657 of 1800 new or added lines in 21 files covered. (36.5%)

657 of 1800 relevant lines covered (36.5%)

2.65 hits per line

Uncovered Changes

Lines Coverage ∆ File
211
3.21
0.0% pkg/usb/usb_linux.go
126
11.27
0.0% internal/cmd/utils.go
122
12.86
0.0% internal/cmd/decode.go
96
0.0
0.0% pkg/manufacturers/canon/reader.go
87
0.0
0.0% internal/cmd/list.go
83
8.79
0.0% internal/cmd/read.go
80
0.0
0.0% internal/cli/cli.go
52
0.0
0.0% pkg/manufacturers/canon/session.go
51
71.51
0.0% pkg/ptp/device.go
40
0.0
0.0% internal/logs/logs.go
37
24.49
0.0% pkg/manufacturers/canon/counters.go
32
75.76
0.0% pkg/trace/trace.go
32
0.0
0.0% pkg/usb/usb.go
30
81.48
0.0% pkg/pcap/pcap.go
27
76.11
0.0% pkg/usb/descriptor.go
18
80.65
0.0% pkg/manufacturers/canon/factory.go
6
85.0
0.0% pkg/ptp/container.go
5
72.22
0.0% pkg/manufacturers/canon/models.go
4
0.0
0.0% cmd/openshuttercounter/main.go
4
0.0
0.0% pkg/usb/numeric.go
Jobs
ID Job ID Ran Files Coverage
1 33182126219.1 28 Aug 2026 02:52PM UTC 21
36.5
GitHub Action Run
Source Files on build 33182126219
  • Tree
  • List 21
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d72c0a13 on github
  • Prev Build on main (#33177802101)
  • Next Build on main (#33183200521)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc