Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
06-19-2016, 01:10 PM - 1 Like   #1
Forum Member




Join Date: Sep 2014
Posts: 78
Pentax lens-body communication protocol

Well, it is about to be possible to be repaired old sigma/pentax lenses with dead electronics. These lenses are quite old and as far as I know they are based on the F series AF protocol. Sigma/Pentax doesn't provide any parts for them so what i can do is to make and program a custom micro controller. For that purpose I need to know the exchange protocol or at least some basic parts of it.

As an example I will take a fixed FL lens because it is easier without the zoom ring and a little bit less data is sent.

I did some reverse engineering and I already read the exchanged 19 bytes. 16 are used but the content seems unreadable. I tried to decode them on different ways (nrz...) but no luck. Probably the bits are scrambled or the info is coded. If I know the protocol or part of the protocol I could decode it. The best will be to know the protocol structure and how the data is encoded (if it really is)

As a general structure of a FX FL lens, there is an input from the distance ring and data output to the body synchronously with the clock. The 'A' setting is not important here. So the general structure and the lens pins are clear.

Just to mention here that I don't afraid that I will not know the delta step for the focus mechanism on a particular lens. It can be read from another working copy or could be found on some other way

As you see I already have some knowledge and please don't post here links to bdimitrov.de or other pages without info about the exchange protocol I also checked some of the Pentax patents but i couldn't reconstruct the data structure from there.

If I have that info I will buy some old lenses and will start experimenting. Also it will generate more interest from people to the Pentax equipment.

Cheers

06-19-2016, 03:26 PM   #2
Loyal Site Supporter
TomTom's Avatar

Join Date: Apr 2014
Location: Dallas, Texas
Photos: Gallery | Albums
Posts: 475
I like the sound of that. I have a Sigma EX DG 105/2.8 that CRIS has deemed unrepairable because the failing main controller board needs to be replaced and the board is no longer available.

Do you suppose Leitax could shed any light on the issue, or are they merely concerned with the physical mount with regard to Pentax?
06-19-2016, 03:35 PM   #3
Pentaxian
dcshooter's Avatar

Join Date: Jan 2011
Location: Washington DC
Photos: Gallery | Albums
Posts: 4,602
Leitax.com doesn't even mechanically couple the aperture lever. They do zero with the electronics signalling.

---------- Post added 06-19-16 at 03:36 PM ----------

Bolivar Dimitrov has published some stuff on the pinout on his Web page, but it is all pretty basic.
06-19-2016, 04:05 PM   #4
Loyal Site Supporter
TomTom's Avatar

Join Date: Apr 2014
Location: Dallas, Texas
Photos: Gallery | Albums
Posts: 475
QuoteOriginally posted by dcshooter Quote
Leitax.com doesn't even mechanically couple the aperture lever. They do zero with the electronics signalling.
I didn't know that. Thank you, B.

06-19-2016, 04:40 PM   #5
Forum Member




Join Date: Sep 2014
Posts: 78
Original Poster
My exchange protocol issue is not exactly related to the electronics. it is just some information about the structure of the data which is exchanged. If I know at least the most important fields as a location and size in the data frame, I'm pretty sure that I can make and program the electronics and the camera will start focusing the lens. It will be a great fun but currently I don't have any idea where that info can be read.
So the electronics itself is not an issue. Only one part of the software which will run on a microcontroller is not clear yet)
06-19-2016, 11:56 PM   #6
Pentaxian
Not a Number's Avatar

Join Date: Mar 2012
Location: Venice, CA
Posts: 4,258
QuoteOriginally posted by snimcho Quote
it is just some information about the structure of the data which is exchanged.
That information has not been published. You'll have to do what Sigma does and reverse-engineer it. It is probably proprietary and Ricoh won't be very happy if you publish it. All that's said about it is that it is a serial data stream.
06-20-2016, 03:48 AM   #7
Forum Member




Join Date: Sep 2014
Posts: 78
Original Poster
QuoteOriginally posted by Not a Number Quote
That information has not been published. You'll have to do what Sigma does and reverse-engineer it. It is probably proprietary and Ricoh won't be very happy if you publish it. All that's said about it is that it is a serial data stream.
It is true that the information has not been published but it is also true that the information is 30 years old. The protocol, the data structure and the lens pins has been changed many times since 1986 and Ricoh owns Pentax since 2011. Anyway it may be proprietary information.

These things may be also proprietary information for canon and nikon but you can find some information in the net about them. Canon are also famous with the firmware hacks which brings even more features to the people.

I also think that the more open and free a system is the longer it lives. And while these small tricks may not be quite useful for a pro photographer, there are many people which like to play a little bit with their equipment. Why leave them go to Canon?

About Sigma and their reverse-engineering, I'm afraid that in case the data stream is encoded, the needed information can be bought officially or unofficially. If I have to do it only by reverse-engineering it will take some time and there will be parts from the protocol which will remain unclear. So I think that Sigma have paid to Pentax for that info probably near year 1990.
That's what I think but are you somehow sure that Sigma does it by reverse-engineering only?
06-20-2016, 04:50 PM   #8
Loyal Site Supporter
clackers's Avatar

Join Date: Jul 2013
Location: Melbourne
Photos: Albums
Posts: 9,014
QuoteOriginally posted by snimcho Quote
. So I think that Sigma have paid to Pentax for that info probably near year 1990.
You have proof of this, Snimcho?





06-21-2016, 12:40 AM   #9
Forum Member




Join Date: Sep 2014
Posts: 78
Original Poster
QuoteOriginally posted by clackers Quote
You have proof of this, Snimcho?
No, it is what I think has happened. As I have wrote above: "If I have to do it only by reverse-engineering it will take some time and there will be parts from the protocol which will remain unclear." Also I'm afraid that the data stream is encoded somehow
06-21-2016, 05:19 AM   #10
Pentaxian
dcshooter's Avatar

Join Date: Jan 2011
Location: Washington DC
Photos: Gallery | Albums
Posts: 4,602
Seeing as sigma has been notorious for making lenses that are -not- 100% compatible with various manufacturers' AF specs, I'd argue that the reverse engineering scenario is strengthened, not weakened.
06-21-2016, 07:54 AM   #11
Forum Member




Join Date: Sep 2014
Posts: 78
Original Poster
QuoteOriginally posted by dcshooter Quote
Seeing as sigma has been notorious for making lenses that are -not- 100% compatible with various manufacturers' AF specs, I'd argue that the reverse engineering scenario is strengthened, not weakened.
That's a good point. Thanks. Probably my analyze abilities are not enough. So I can add here some real data from the camera-lens communication stream. May be someone could help with decoding.
I have to prepare it as pictures and tables.
06-21-2016, 08:09 AM   #12
Pentaxian
Not a Number's Avatar

Join Date: Mar 2012
Location: Venice, CA
Posts: 4,258
As I tried to suggest before if Ricoh, Hoya, Pentax or Asahi Optical wanted the protocols to be published they would have published it or it would otherwise be available.

Merely because intellectual property is 30 years old doesn't make it open source or public domain. There are thousands of movies, books, songs and images thirty years old or older that are still under copyright and intellectual property laws.

If you think Sigma paid or pays for license for these protocols what makes you think you can reverse engineer them and post or share them freely?

If Ricoh licenses this technology to other lens makers what makes you think you can share the technology freely?

If the information is not freely available there is probably a good reason.
06-22-2016, 12:43 PM   #13
Forum Member




Join Date: Sep 2014
Posts: 78
Original Poster
Not much technical information here. Seems like I have to look somewhere else

-----------------------------------
Snimcho
My Flickr

Last edited by snimcho; 06-22-2016 at 01:07 PM.
06-22-2016, 01:36 PM   #14
Loyal Site Supporter
TomTom's Avatar

Join Date: Apr 2014
Location: Dallas, Texas
Photos: Gallery | Albums
Posts: 475
QuoteOriginally posted by snimcho Quote
Not much technical information here. Seems like I have to look somewhere else

-----------------------------------
Snimcho
My Flickr
I'm sorry that you couldn't find help here but I hope that you will report back on your progress. Hope that you can soon find what you need.
06-23-2016, 08:08 AM - 2 Likes   #15
Forum Member




Join Date: Apr 2014
Posts: 54
Part of the EXIF Pentax MakerNotes reflect the data exchanged between the body and the lens.

The first type of communication between Pentax lenses and bodies is electric, not electronic. These are the ones mentioned in bdimitrov's site Features and Operation of the Ka Mount
Then, electronic communication has been added.

The 16 bytes you are mentioning are probably the first version of electronic communication between Pentax bodies and lenses. These bytes are named LC0...LC15 in ExifTool source, the reference for these names being a set of patents.
The signification of some of these bytes is well known, but most of it is unknown.

I have contributed to the understanding of the LC2 byte. As you can see in the comments in the source of ExifTool, early Sigma lenses did not use an appropriate value for LC2 (they always reported a minimal focus distance of 0.50m), but recent Sigma lenses are OK.

I have tried to collect other LC values for various lenses. This work is not part of ExifTool because it is unfinished. Here are some findings:
Some LC values are constant for a given lens, some depend on the focal length for zooms, some depend on more parameters than only focal length. All zooms have 16 possible focal lengths, e.g. the DA* 60-250 focal lengths are 60, 67.5, 75, 80, 87.5, 97.5, 107.5, 117.5, 127.5, 140, 152.5, 170, 180, 200, 220, 250.
Most LC values can only take a few possible values. E.g. have have seen for LC15 only 0x03, 0x1b, 0x3b, 0xfb and 0xe3 (the last one for a DA 16-50 at 42.5mm, but I suspect an error in the transmission of the value by the lens, there seems to be no error correction in the transmission).
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
data, fl, info, lens, lenses, pentax, pentax service, repair, service, structure, warranty
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
K-Mount digital pin protocol, power supply mjedlick Pentax SLR Lens Discussion 10 06-26-2016 01:09 PM
Question What's the protocol for buying on PF? donlass Site Suggestions and Help 15 01-20-2016 12:39 PM
Newest Pentax 1.4 TC WR and Sigma f2.8 17-50 communication problems jgnfld Troubleshooting and Beginner Help 5 08-07-2015 11:28 AM
Lens/Camera communication mikemike Pentax DSLR Discussion 6 04-05-2013 11:57 AM
Pentax USA Communication Rant Wethphotography Photographic Technique 7 06-01-2007 06:18 PM



All times are GMT -7. The time now is 07:07 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top