Old lenses and aperture

Started by SDX, July 28, 2012, 02:53:08 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

SDX

I have a old Sigma 28-105 2.8/4 which hasn't been re-chipped. The problem is that the camera is not able to set the aperture.

This is a quite common problem, but I can't find any precise information about it. Physically there appears to be no difference between old and new lenses. Am I correct when I assume, that the only problem is the communication, the protocol?

I know it would be really hacky, but what do you think: would it be possible to grab the data that is in- and outgoing and manipulate it in order to control the aperture?

SDX

Ok, here is more detailed information about the problem.

First off, the problem appears only on old Sigma lenses. Those lenses have fallen significantly in price since this problem exists. Thats why you can find some really high quality APO lenses for under 100$ on ebay. It would be a big chance for people with low budget (like me) to get good lenses.

The problem itself is simple. According to this guy on flickr, the camera sends 3 bytes via the Dout pin (the 5th from left on the body). This is how they look like on new bodies:

0x07
0x13
<aperture>


Old bodies however send:

0x07
0x12
<aperture>


Yes, you heard it right - it's just one byte. One byte that makes hundreds of dollars difference.
I'm quite new to ML and need to know from some of you guys, if it would be possible to modify the data before it leaves the camera.


ilguercio

As far as i know lens to camera communication is still to be understood.
If this succeeds we could have focus confirmation for manual lenses and support for older lenses, as you say.
Let's wait.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

Alia5

Quote from: ilguercio on July 30, 2012, 11:32:02 PM
Let's wait.

What?! Let's get onto code!

Sadly i'm a pretty crappy developer and don't want to risk my camera with my unbelievable awful coding >.<


But i would also like this... Could get a lot of lenses on an budget :D

ilguercio

Well, a developer should take a closer look at the lens-camera communication.
There are chips that can be glued on lenses so they can transmit exif data and focus confirmation to the camera so it has to be possible somehow.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

Chungdha

I got the same lens congrats, currently using nd filters with it to shoot during the day. Be great if the lens was able to work normal, able to focus plus aperture control. But enjoy the high quality of it.

SDX

I too can't claim to be a excellent programmer, but i would like to give it a try.
I'm not expecting a routine or hidden setting from Canons firmware which could be used.

I have no clue on what handles the communication. Maybe someone who has a bit more knowledge hardware wise could help.

Also, I see a small chance of finding bricks for the protocol in the memory, which would be used by the firmware. Maybe we could manipulate these. A kind of hacky solution which could generate a lot of trouble, but worth a try. Has someone experience on how to investigate the memory? In general it would be quite exiting to take a look on whats going on in there  :)

neo96

Any news on that?
Quote from: ilguercio on July 30, 2012, 11:32:02 PM
As far as i know lens to camera communication is still to be understood.
In this thread there are some guys who understood the protocol pretty good, maybe this helps.
Also they provide information on how to implement a chip that converts the 19 back to an 18, which let's good old Sigmas work again :)

Unfortunately it's a german forum, but if someone is interested in it I could try to translate some parts :)

ilguercio

Well, as i said there is a fw update for the 40 mm STM lens and since it's going to write something inside the lens it can probably be used to learn something, but i don't know.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

neo96

IMHO this won't help us. We need to know where the commands are stored in the camera firmware, so we can change them :)
The other problem is, because the firmware files are binary, we can't really learn something from them. Well at least I can't :D If we had access to the Canon sources, this would be much easier :)

nanomad

The issue is that the Lens->Camera communication is handled by a third party chip (the infamous Tx) over which we have no control
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

neo96

Ok so even the firmware sources wouldn't help. And I think there's no way to "overlay" this thing?

But, as mentioned before, there's a way to modify the old Sigmas so they work properly. I'm thinking about doing that, but I'm not sure yet. It doesn't soud to complicated. Actually it sounds pretty simple. Just program an ATtiny to change 19s to 18s and braze it into the lens's circuit. Maybe I'll give it a try. If so, I'll report about the result here.

SDX

I've already searched in the memory for peaces of the protocol. Found some promising addresses, but nothing that would make me say "That's where the protocol snippets are stored!". Those I found don't have any effect on the actual output. Now that nanomad mentioned that it is handled fully by an external chip, it all makes sense.

I've heard about the "rechipping" of the lenses before. I just checked, I actually do have a few ATtinys here, so that could be done as well. But I'm more interested in a solution for everyone that doesn't require people hack their lens!


1%

What happens when you put the old lens on and take a pic? Error 70? Just doesn't work?

SDX

The camera gives and error when not using default aperture (and that is always wide-open).

From the thread on dslr-forum.de I can determine, that the camera would accept a (18, 18) as response from the lens, even though it used (19, x) to set the aperture. So the lens doesn't even get that far. It properly sends a (12) or (15). Both (12) and (15) aren't understood yet, but I assume that at least one of those is for errors.
Getting ML to ignore those error-messages could already be a step. Since you then don't need to wait until your camera has rebooted just because you didn't pay attention to the aperture value. On the other side, that wouldn't be something we would have to bother with when we could switch between analog and digital aperture value.

Currently I'm wondering if the problem also exists the other way around. Do new lenses expect a (19, x) and can't parse a (18, x)? I have a 600 (without a D), I'll test it next weekend.

nanomad

*Maybe* there's hope. Post the error log here
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

ilguercio

Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

g3gg0

Quote from: neo96 on October 02, 2012, 05:56:09 PM
Any news on that?In this thread there are some guys who understood the protocol pretty good, maybe this helps.
Also they provide information on how to implement a chip that converts the 19 back to an 18, which let's good old Sigmas work again :)

Unfortunately it's a german forum, but if someone is interested in it I could try to translate some parts :)

well, i am german.
that are 50 pages :-/

as far i can tell, they replaced the commands 19 with 18

18 Aperture Analog
19 Aperture Digital
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

neo96

I think the other way round isn't a problem, because old Canon lenses also work with both 18 and 19. The problem only affects Sigma lenses. I'm not sure about Tamron, but I think they licensed the protocol, while Sigma reverse-engineered it.
And reboot isn't a problem also, with my 600D pressing the shutter when getting the error makes the message dissapear.

To fix the problem the camera has to send 18 instead of 19. But as lens communication is done by the Tx Chip (?) ML can't fix that.

Maybe I'll post an error log here next week.

SDX

ilguercio: That is a lib with non-public source. It's meant for scientific projects that want to use EF lenses. Unfortunately we can't use it or learn something from it.

g3gg0: on the last page (50.) someone has collected the current knowledge. If there is a need (from the non-german in here), I could translate it to English.

nanomad: you'll get a log in a few hours, since the lens currently is in use ;)

nanomad

Interesting stuff about the possible communication between the Tx chip and the ARM CPU

http://magiclantern.wikia.com/wiki/SIO3_MREQ
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

SDX

Wow, very cool! Lets hope that the code on the Tx isn't limited to only use digital aperture, but contains a routine for switching between analog and digital.
I can see, that someone already managed to disassemble some Tx code, but apparently not the entire code or bigger peaces. Am I right?

SDX

Here's the log. I tested with aperture value 3.2, in case it should be relevant. http://f.9pixel.net/LOG001.LOG

bart

Maybe not related, but the dedicated moviemode on 550d and 600d is different than the shooting modes. I have a Tokina 400mm f.5.6 that gives err01 on all shooting modes but works  flawless in movie mode. I can make photos in modemode too.

I had the Sigma 400mm f5.6 and you can change aperture in moviemode without error. It doesn't actually change the aperture it appears to stay wide open.

neo96

Yeah that's right, taking pictures in movie mode doesn't give error regardless of aperture setting but anyhow the iris stays open.
And even if it would close, taking pictures in movie mode isn't exactly brilliant :)

So do I understand that right, that if we could understand the Tx, this would be the answer to our problem?