gphoto2 icon indicating copy to clipboard operation
gphoto2 copied to clipboard

Canon EOS 5Ds - no shutter counter available in gphoto2

Open Thrill-Kill opened this issue 6 years ago • 21 comments

Hi gphoto support team,

I am struggling to read out the shutter count on my Canon EOS 5Ds Camera. The camera is recognized in Ubuntu and I am even able to capture images etc. But the shutter counter will not start.

Do you have an idea what is wrong? I already tried multiple computers including different USB 2/USB3 ports. Is it a problem that the camera has a USB 3.0 port itself?

You can find the reports attached. Thanks for your help!

Kind regards Dawid

config.txt my-logfile fro shuttercounter command.txt my-logfile.txt summary.txt

Thrill-Kill avatar Jul 03 '17 22:07 Thrill-Kill

d1ac would be the shuttercount value ... while it is reported, it has no content in the trace.

I am not sure this is possible.

msmeissn avatar Sep 06 '17 21:09 msmeissn

anyone find a work around to this? I find this very useful as well.

joelcomp1 avatar Jan 29 '19 23:01 joelcomp1

I looked at the attached logfiles and the d1ac property is reported as empty.

I also looked over the other properties and none show out as containing shuttecount level values.

You can try:

Take a before logfile : gphoto2 --debug --debug-logfile=before.log --list-config

take say 10 pictures switch off camera / switch it back on to make sure it stores the value

Take a after logfile : gphoto2 --debug --debug-logfile=after.log --list-config

and attach both here

msmeissn avatar Jan 31 '19 12:01 msmeissn

Sure so just so you know i have 6 cameras attached to this PC so the debug seems to show all 6. But the one I used was port usb:012,007.

after.log before.log

Took 10 pictures in between. hopefully that helps!

joelcomp1 avatar Feb 02 '19 18:02 joelcomp1

This does not show anything changing in this area.

I did some research, stumbled over some things but cant reproduce it with my 750D.

You could however try:

gphoto2 --set-config opcode=0x905f,0x0017 --debug --debug-logfile=905f-0017.log gphoto2 --set-config opcode=0x905f,0x000d --debug --debug-logfile=907f-000d.log

and attach them here?

msmeissn avatar Feb 03 '19 16:02 msmeissn

sure see attached. 905f-0017.log 907f-000d.log

joelcomp1 avatar Feb 03 '19 18:02 joelcomp1

Hello!

I have the same issue here. The option /main/status/shuttercounter does not even listed on my terminal.

The other commands seems to work ok.

I am using a 77D.

evripidis avatar Feb 13 '19 09:02 evripidis

Hi,

Same issue with Canon EOS 200 D. Attached are before and after logs (please note only 4 pictures apart). before.log after.log

GrzegorzDrozd avatar Jul 09 '21 06:07 GrzegorzDrozd

nothing shines out of the diff between those.

can you try gphoto2 --wait-event=1s --set-config opcode=0x9127,0xd1ac --wait-event=1s --debug --debug-logfile=d1ac.log

and attach d1ac.log here?

msmeissn avatar Jul 09 '21 10:07 msmeissn

[...] You can try:

Take a before logfile : gphoto2 --debug --debug-logfile=before.log --list-config

take say 10 pictures switch off camera / switch it back on to make sure it stores the value

Take a after logfile : gphoto2 --debug --debug-logfile=after.log --list-config

and attach both here

Doing this I found that on a Canon EOS 5D IV the generated logfile has a hex value that changes by the exact amount of pictures taken in between the two log files. In my case on line 1698:

0040 00 00 00 00 07 01 19 63-06 01 00 64 08 00 00 00 .......c...d....

Changed to

0040 00 00 00 00 07 01 19 68-06 01 00 83 08 00 00 00 .......j........

After 5 photos, and to

0040 00 00 00 00 07 01 19 6a-06 01 00 83 08 00 00 00 .......j........

after another 2 photos.

Because I don't expect the shuttercount to be in the 100-millions, but we're still talking about a camera that was used often, my assumption is that the shuttercount is 01 19 6a => 72042 in this case

Having never used gphoto, a Canon camera or anything to do with hex code before I'm not 100% sure about this being the correct number, though it does seem like a logical outcome

NaJager avatar Aug 12 '22 15:08 NaJager

can you specify some more lines of this hexdump before the quoted lines?

msmeissn avatar Aug 20 '22 08:08 msmeissn

0.115338 gp_port_read (3): Reading 84 = 0x54 bytes from port... 0.115499 gp_port_read (3): Read 84 = 0x54 bytes from port: (hexdump of 84 bytes) 0000 ff 1f 00 00 01 00 01 01-a0 10 00 88 00 00 60 20 .............. 0010 00 01 01 00 00 04 01 04-e5 00 00 00 00 00 00 01 ................ 0020 01 fd 00 00 00 00 01 00-00 00 00 00 00 00 00 00 ................ 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 0040 00 00 00 00 07 01 19 6a-06 01 00 83 08 00 00 00 .......j........ 0050 00 00 00 00 - ....`

NaJager avatar Aug 20 '22 09:08 NaJager

can you quote also the 2 hexblocks before this hexblock?

msmeissn avatar Aug 20 '22 09:08 msmeissn

The two blocks above are about 700 lines total, so I'll just give you the whole file. From line 1698 up should be what you were asking for after.log

NaJager avatar Aug 20 '22 09:08 NaJager

usually little endian is used. so 01066a if you want to be sure, you can take 170 pictures so it wraps into the next byte to see which is incremented.

Can you do gphoto2 --wait-event=20s --debug --debug-logfile=xx.og

and half press the shutter button, turn the lens a bit, so it gets more events to untangle the OLC info?

Can check that later.

msmeissn avatar Aug 20 '22 09:08 msmeissn

It incremented to 01 1a 36, which seems about right to me Here's the log file: 5DMIVlog.log

NaJager avatar Aug 20 '22 12:08 NaJager

thanks! the OLCInfo is a binary blob with a careful handcrafted and reverse engineered parser... and its close to the end of the blob, so it might take a bit to do it right.

gphoto2 --wait-event=100 should report some OLC infos already, but i doubt it givesthe right one here, the offsets later are probably not ok

msmeissn avatar Aug 21 '22 18:08 msmeissn

can you also do the following:

gphoto2 --wait-event=1s --set-config opcode=0x913d,0x1000 --wait-event=1s --debug --debug-logfile=0x1000.log gphoto2 --wait-event=1s --set-config opcode=0x913d,0x0800 --wait-event=1s --debug --debug-logfile=0x0800.log gphoto2 --wait-event=1s --set-config opcode=0x913d,0x0400 --wait-event=1s --debug --debug-logfile=0x0400.log gphoto2 --wait-event=1s --set-config opcode=0x913d,0x0200 --wait-event=1s --debug --debug-logfile=0x0200.log gphoto2 --wait-event=1s --set-config opcode=0x913d,0x0100 --wait-event=1s --debug --debug-logfile=0x0100.log gphoto2 --wait-event=1s --set-config opcode=0x913d,0x0080 --wait-event=1s --debug --debug-logfile=0x0080.log

and attach the logfiles?

If you want, you can also step down to 0x0001

msmeissn avatar Aug 21 '22 18:08 msmeissn

i just added to current libgphoto2 GIT a option to do this in one run

gphoto2 --set-config testolc=1 --debug --debug-info=olc.log

if you can send the olc.log ?

msmeissn avatar Aug 23 '22 14:08 msmeissn

ah sorry, missed your previous comment. no specific need.

in the 0x1000 block is the shuttercount stuff I think 1.059027 ptp (2): event 0: EOS event OLCInfoChanged (size 24) 1.059040 ptp (2): 0: 14 /* 4 byte size */ 1.059049 ptp (2): 1: 00 1.059058 ptp (2): 2: 00 1.059067 ptp (2): 3: 00

1.059076 ptp (2): 4: 00 /* 4 byte type mask */ 1.059085 ptp (2): 5: 10 1.059094 ptp (2): 6: 00 1.059104 ptp (2): 7: 00

1.059110 ptp (2): 8: 07 /* content starts here */ 1.059116 ptp (2): 9: 01 1.059122 ptp (2): 10: 1a 1.059128 ptp (2): 11: 36 1.059134 ptp (2): 12: 06 1.059140 ptp (2): 13: 01 1.059146 ptp (2): 14: 00 1.059152 ptp (2): 15: 64

msmeissn avatar Aug 23 '22 15:08 msmeissn