This is a continuation of several posts that relate to my experiences sniffing the communication protocol between my Canon XSi camera and 580ex flash. The previous posts are:
https://billgrundmann.wordpress.com/2009/03/16/sniffing-canons-ettl-protocol/
https://billgrundmann.wordpress.com/2009/03/10/ettl-continued/
https://billgrundmann.wordpress.com/2009/03/04/ettl-interface/
I have now achieved stability of results. The messages between the camera and flash are now consistent from sample to sample. The program had significant modifications from my starting program, but now it works.
Here is the program: ettl_program_1 This program requires some additional hardware support to perform the level shifting and logic threshold as described in my first post.
Here is a sample of the raw messages seen for some random settings of the camera and flash: putty log After reduction (elimination of already seen messages) and some amount of analysis the ordered messages reduce to:
0xff – 0x8c 0x8c
zoom: 49 0xbd 0x00 0x31 0x99 0xff – 0xaa 0x59 0x00 0xff 0x8c
0xb5 0x4c – 0xcc 0x8c
camera mode: 0xb9 0x80 – 0x00 0x8c
zoom: 49 0xbd 0x00 0x31 – 0x18 0x69 0x46
0xfb 0xff – 0x02 0x8c
0xf9 0xff – 0x74 0x8c
0xb3 0x13 0x46 0x2f – 0x00 0x00 0x00 0x00
0xf5 0xff 0xff 0xff 0xff – 0x53 0x49 0x5c 0x0f 0x00
0xbe 0x20 – 0x8c 0x8c
ISO: 1600 – 0xbb 0x58 0xff 0xff – 0x00 0x00 0x8c 0x8c
0xf9 0xff – 0x55 0x8c
ISO: 1600 – 0xbb 0x58 0xff – 0x00 0x00 0x8c
Aperture: F/5.6 – 0xb7 0x30 – 0x8c 0x8c
Shutter: 1/60 – 0xb8 0x68 – 0x8c 0x8c
0xb4 0x1d – 0x8c 0x8c
0xb3 0x13 0x46 0x2f 0xff – 0x00 0x00 0x00 0x00 0x8c
0xb4 0x1d 0xff – 0x8c 0x8c 0x8c
0xf9 0xff – 0x75 0x8c
zoom: 49 0xbd 0x00 0x31 – 0x18 0x69 0x32
Shutter: 1/60 – 0xb8 0x68 0xff – 0x8c 0x8c 0x8c
0xb4 0x03 – 0x8c 0x8c
0xf2 0xff – 0xa0 0x8c
Set flash intensity: 0xa0 – 0xb0 0xa0 – 0x8c 0x8c
0xb1 0x04 – 0x8c 0x8c
0xb4 0x23 0xff – 0x8c 0x80 0x8c
0xb3 0x33 0x46 0x2f – 0x00 0x00 0x00 0x00
0xf8 0xff – 0x5e 0x8c
Set flash intensity: 0x63 – 0xb0 0x63 – 0x8c 0x8c
0xf2 0xff – 0xc0 0x8c
0xb3 0x37 0x46 0x2f – 0x00 0x00 0x00 0x00
0xb4 0x3d 0xff 0xff 0xff 0xff 0xff 0xff – 0x8c 0x63 0xaa 0x1a 0x09 0x86 0x06 0x8c
Aperture: unknown @ 0x00 – 0xb7 0x00 0xff – 0x8c 0x8c 0x8c
Shutter: 1/40 – 0xb8 0x63 – 0x8c 0x8c
0xb4 0x1d – 0x8c 0x8c
I’ve also spent some time analyzing when AF focus, preflash and actual flash events occur during these messages.
Preflash message: 0xb4 0x23 0xff – 0x8c 0x80 0x8c The preflash occurs between the 0x23 and 0xff bytes. CLK drops to signal-ground (not actual camera ground) for about 83msec. D2 pulses after the end of CLK. The actual preflash itself is about 35msec after CLK drops.
Flash message: 0xb4 0x3d 0xff 0xff 0xff 0xff 0xff 0xff – 0x8c 0x63 0xaa 0x1a 0x09 0x86 0x06 0x8c The flash occurs right after the 0x3d byte. CLK drops all the way to camera ground. The actual flash occurs after the “X” pin drops.
AF assists message: 0xb3 0x13 0x46 0x2f 0xff – 0x00 0x00 0x00 0x00 0x8c The assist lamp happens right after the 0x2f byte of data. I’m not quite sure yet whether it is just timed or if there is another pin interaction.
Now to look at changing different parameters of the camera and flash and see their effect on the messages.
Stay tuned…
Tags: Arduino, canon, ettl, Speedlite 580ex, xsi
March 18, 2009 at 12:43 pm |
Ha!
This is a goldmine for me! Since I’m dreaming of building a wireless radio link between a camera and a flash utilizing the E-TTL.
Keep on digging and beware some spam from me! 😉
March 18, 2009 at 5:44 pm |
Well done Bill keep it coming 🙂
What were the causes of instability in your original readings? Was it just tweaking the levels?
Stephen…
March 18, 2009 at 6:01 pm |
Instability was due to timing, or rather taking too much time to process a bit. That’s why I had to go to a packed 16-bit value. I found Arduino software always shifts 16-bit, even if it is declared 8-bits and multiple bit shifts are put in a loop. I originally had separate queues for for D1 and D2 bytes – it wasn’t stable. Plus, I was trying to use interrupts on every positive edge of CLK. There is just too much overhead to allow that. So, I had to go to a single interrupt and stay in the interrupt routine to finish the whole byte. In addition, it took me awhile to figure out how to get around the problem of the extra clock during pre-flash and flash – that’s why the funny looking loop waiting for clock to drop.
bill..
March 18, 2009 at 6:47 pm |
[…] https://billgrundmann.wordpress.com/2009/03/18/sniffing-canons-ettl-protocol-2/  No TweetBacks yet. (Be the first to Tweet this post) « Eagle3D + Sketchup Updates | […]
March 19, 2009 at 12:27 pm |
[…] Bill Grundmann’s Blog Programming, thoughts and experiments « Sniffing Canon’s ETTL protocol […]
August 22, 2009 at 7:11 am |
Is there a complete list of E-TTL and E-TTL II commands?
I am wondering if it is possible to use a E-TTL flash with a E-TTL II camera. The commands could be “translated” by a attiny microprocessor.
October 8, 2009 at 7:22 pm |
Look on my Bio page.
December 4, 2009 at 4:13 pm |
Keep in mind that Canon changed its protocols ever so slightly in the new cameras/flashes… My Sigma EF500 was unusable until I had its firmware updated to fit the 50D’s command set vs the Digital Rebel XT’s.
The flash worked fine on the Digital Rebel XT, but when I pressed the shutter button halfway down to focus, it would be sent into an endless loop of the flash zooming in/out.
Just something to keep in mind if/when you find your commands aren’t quite the same as someone else’s. 🙂
BTW, GREAT work! I just stumbled across your site while looking for the IR protocol for the Master/Slave that the flash emits/receives.
February 18, 2011 at 12:57 pm |
Great work! I’m also interested in making a wireless (Radio) link between 580ex flashes using arduinos. I’m considering taking a different path to that goal though, rather than hack into the ettl protocol I wonder how hard it may be to capture the preflash using one arduino and sending it realtime via radio to another arduino thats wired to the other flashes IR sensor. (simular to the radiopoppers).