-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Canon EOS R5m2 | Canon EOS R5 Mark II #1028
Comments
This is weird. It times out while waiting for the Response packet of a I noticed you were working with a fairly up to date code base. Can you quickly test if |
I will do any test you want. I just have to wait to get the camera back |
This brings my original ptp_unpack_EOS_ImageFormat() documentation up-to-date with new M1/M2 and new 0/1 compression info added with 5Ds, 1DXm2 and R5m2. It also fixes the problem that led to a double entry of e.g. `RAW` in the imageformat config output visible in gphoto#1028 and also in the 1DX sample here: https://github.com/gphoto/libgphoto2/blob/5b7f7c168dd3e86f43b590a7456883e1dec11709/camlibs/ptp2/cameras/canon-eos-1dx.txt#L255-L269
This brings my original ptp_unpack_EOS_ImageFormat() documentation up-to-date with new M1/M2 and new 0/1 compression info added with 5Ds, 1DXm2 and R5m2. It also fixes the problem that led to a double entry of e.g. `RAW` in the imageformat config output visible in #1028 and also in the 1DX sample here: https://github.com/gphoto/libgphoto2/blob/5b7f7c168dd3e86f43b590a7456883e1dec11709/camlibs/ptp2/cameras/canon-eos-1dx.txt#L255-L269
I just testet a small set of actions on the camera with different commits and branches but I wasn't able to get a picture from the camera. I'll upload the logs to a git repository and link it here later Edit: Here is the repository for the logs based on the commit |
Thanks for the effort. I conclude that
My first guess is: this is a bug in the firmware of the camera. It just so happens that Canon released a 1.0.1 firmware update yesterday. Could you maybe try updating it and then perform another |
If the firmware upgrade is not an option or does not help, please see if the following 2 lines added exactly here does fix it for you. if (operation == PTP_OC_CANON_EOS_GetDeviceInfoEx && !strcmp(params->deviceinfo.Model,"Canon EOS R5m2"))
return 0; |
can i also ask to check if hardware is affected, like switch to a different usb port, use a different cable? |
Thanks for all your suggestions. I have updated the camera to FW: 1.0.1 but there was no big change in the behavior In the next step I patched the ptp.h and testet it with the different commits --> this was a little success! :-) Now the camera informations from for example --list-all-config appears immediately and not after 3m20s It's still not possible for me to do --capture-and-download and --capture-tethered I have tried three different USB cabel to be sure If I can further assist you, I'd be happy to do so |
Ahh, bummer. That would have been too easy ;).
So far so good. The hanging, now disabled call is actually not really necessary for the devices operation.
The capture command now fails with busy when sending the "Full press button" command after the library went into a 2s timeout waiting for some feedback about successful auto-focusing. Could you please set your lens / settings to manual focus, just to see if that changes things? |
I tested it with manual focus, after a --capture-preview the camera is still in busy mode |
Looks like we are slowly making progress... ;). The log-file indicates that there is no SD-Card in the camera. Just to rule out more potential pitfalls: can you please insert an SD-Card? Then please set the mode dial to 'M', the exposure time to 1/60 and execute the following command: gphoto2 --set-config capturetarget=1 --trigger-capture --wait-event=1s |
Now the image is triggered and will be saved on the SD-Card but not downloaded by gphoto2 --get-all-files also doesn't work |
I had closer look at the log files you added and unfortunately, I'm out of ideas now. Comparing with my R8, I see the following differences
While the first 2 might potentially be explained by a random change in the firmware now requiring some new command or setting before executing the respective operation, the 3rd one can't be explained that way as it simply seems to be in violation of the PTP specification to do that. If @msmeissn has no other ideas, then the only next option I see would be to setup a USB packet-sniffer on Windows and collect a trace of a working PTP session from the EOS utility and compare the differences. That is a lot of work, at least it was 10 years ago. :-/ |
it looks weird that commands fail, and usually it would mean hardware or firmware issues. so, yes, check if it works on windows, and if yes, try to get a packettrace (using USBPcap for instance) |
Thanks for the info I have added a raw USB trace. I have started the trace, opened the Canon EOS Utility, selected remote capture, took a picture, close the utility I hope this'll help a bit |
One thing i see is it calls 0x9170, the GetObjectInfo64 call ... We are not doing that so far. There is 0x9087 which I do not know the name for yet. and 0x917d whuich I also do not know. |
I spend all afternoon manually parsing the dumped data (reminded me of the good old times, when I did this for the 5Dm2 ;)). I'm not fully done, yet. But I think I found the key to maybe get the download going after capture: a new EOS event Not clear yet why we ran into the busy issue when the in auto-focus mode. @karlkopf was that USB trace with manual or auto-focus? Can you make a second remote-capture trace with the setting reversed? |
I think a name in the disassembly of Canon EOS driver kit. |
(need to do another round of disassembly on the current EOS driver, last tiome was a while ago I think) |
Yesterday it was done with manual focus, shutter time 1/60 Now I have done three traces, manual focus, auto focus and auto focus fail. When the auto focus fail you can't capture an image with the eos utility --> status busy |
@karlkopf thanks for the new trace data. I'll have a look at it later. Can you do me the favor and pull current HEAD and run these commands with manual focus and 1/60?:
I improved the event logging to help with finding the differences between EOSUtility and gphoto2 faster. This also includes the one-liner fix, so it should do something out of the box. If you feel bored, doing the first with auto-focus would also be of interest. |
@axxel |
gphoto/libgphoto2#1028 c760c460ebd6f5eed7d831010910775f83e171ea
@karlkopf Thanks for all the new data. Unfortunately, the new event Random idea: you are not living in Berlin by any chance? That would maybe open the possibility for us meeting in person and having your camera being connected to my PC and thereby speeding up this trial-and-error processes substantially. |
Here is my current "manual" parsing of the original USB message trace:
|
Disassembly brings new defines: +#define PTP_EC_CANON_EOS_ObjectAddedEx64LFN 0xc1b6 |
more opcodes added, the two we see are: |
Skimmed this thread only, so don't know if it's already implemented. We have a few new events (defines already added). These events has new data structure (but similar). The difference is in file name field. What I checked:
|
event from R5m2, only tested in wifi mode
|
*Name of the camera
Canon EOS R5 Mark II
USB IDs
Bus 002 Device 005: ID 04a9:3314 Canon, Inc. Canon Digital Camera
lsusb -v
camera summary output
Camera summary:
Manufacturer: Canon.Inc
Model: Canon EOS R5m2
Version: 3-1.0.0
Serial Number: 61d2b9efcb43a2a698e44599417a693
Vendor Extension ID: 0xb (1.0)
Vendor Extension Description:
Capture Formats: JPEG Unknown(b108) Unknown(b10b) Unknown(b982) Unknown(b109)
Display Formats: Association/Directory, Script, DPOF, MS AVI, MS Wave, JPEG, Unknown(b103), Unknown(bf02), Defined Type, Unknown(b105), Unknown(b982), Unknown(b10a), Unknown(b10b), Unknown(b109)
Device Capabilities:
File Download, File Deletion, File Upload
No Image Capture, No Open Capture, Canon EOS Capture, Canon EOS Capture 2
Canon Wifi support
Storage Devices Summary:
Device Property Summary:
Friendly Device Name (d402 ro str): 'Canon EOS R5m2'
Perceived Device Type (d407 ro u32): 1
Session Initiator Info (d406 rw str): 'Unknown Initiator'
[Unknown Property] (d303 ro u8 ): 1
Battery Level (5001 ro u8 ): Enumeration [100,0,75,0,50] value: 9% (9)
camera configuration output
gphoto2 --list-all-config > list-all-config.txt
and attach list-all-config.txt here
list-all-config
test capture
test if capture perhaps already works:
gphoto2 --capture-image-and-download
gphoto2 --capture-preview
gphoto2 --capture-tethered
At the moment it's not possible for me to capture pictures from the camera
capture-image-and-download_logfile.log
capture-preview_logfile.log
capture-tethered_logfile.log
list-all-config.txt
list-all-config_logfile.log
summary_logfile.log
The text was updated successfully, but these errors were encountered: