Lens firmware, serial communication, Dandelion, etc...

Wifi, USB, GPS, Grips, Mics, Ext Power, Lens, Flash

Re: Lens firmware, serial communication, Dandelion, etc...

Postby coderat » Fri May 03, 2013 5:59 am

You are right. I just avoid to use logic analyser, because it is too expensive for me, even to rent.
Oscilloscope is nice tool :)
coderat
Core Developer
 
Posts: 2283
Joined: Fri Apr 26, 2013 10:21 am
Been thanked: 450 times

Re: Lens firmware, serial communication, Dandelion, etc...

Postby leegong » Fri May 03, 2013 7:15 am

coderat wrote:You are right. I just avoid to use logic analyser, because it is too expensive for me, even to rent.
Oscilloscope is nice tool :)

Yes , hard sniffering is really very important for lens hacking indeed , i don't know whether
oscilloscope could record waveform of the signals over there .
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

Re: Lens firmware, serial communication, Dandelion, etc...

Postby coderat » Fri May 03, 2013 5:22 pm

leegong wrote:Yes , hard sniffering is really very important for lens hacking indeed , i don't know whether
oscilloscope could record waveform of the signals over there .


only data bytes that could fit on screen :)
But you can tweak on time axis scale and adapt trigger point: I mean that serial bytes would be easy to read :lol:
How fast could be the clock?

Regards,
coderat
coderat
Core Developer
 
Posts: 2283
Joined: Fri Apr 26, 2013 10:21 am
Been thanked: 450 times

Re: Lens firmware, serial communication, Dandelion, etc...

Postby coderat » Sat May 04, 2013 9:31 am

Russian guy who produces dandelion is:
http://filmprocess.ru/
http://filmprocess.ru/nikon_spec.htm
He said he discussed it in forum before. From there I see there are several more commands in Lens interface that you didn't identify:
$XX get confirmation status of focus
$YY tell lens EV step 1/2 or 1/3
$ZZ apperture set
EDIT:
$TT set focus confirmation point offset at least -20...+20, may be wider
$SS get focus confirmation point offset

I expect last to be set in Lens each time Body detects lens with specific ID was mounted. This setting is not permanent. Cam could not program Lens EEPROM, probably because it doesn't provide write-voltage-level.
coderat
Core Developer
 
Posts: 2283
Joined: Fri Apr 26, 2013 10:21 am
Been thanked: 450 times

Re: Lens firmware, serial communication, Dandelion, etc...

Postby leegong » Sat May 04, 2013 9:37 am

coderat wrote:How fast could be the clock?

No idea about it , just guess that the maxium braudrate might be no more than several hundreds BPS .
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

Re: Lens firmware, serial communication, Dandelion, etc...

Postby leegong » Sat May 04, 2013 10:59 am

coderat wrote:Russian guy who produces dandelion is:
http://filmprocess.ru/
http://filmprocess.ru/nikon_spec.htm
He said he discussed it in forum before. From there I see there are several more commands in Lens interface that you didn't identify:
$XX get confirmation status of focus
$YY tell lens EV step 1/2 or 1/3
$ZZ apperture set
EDIT:
$TT set focus confirmation point offset at least -20...+20, may be wider
$SS get focus confirmation point offset

I expect last to be set in Lens each time Body detects lens with specific ID was mounted. This setting is not permanent. Cam could not program Lens EEPROM, probably because it doesn't provide write-voltage-level.

Do you mind giving me more info about $XX ,$YY,$ZZ,$TT,$SS ?
It is not so difficult to make a patch that identifies specific Lens ID then applies specific focus offset , i even think it's implemented
in the current FirmWare , just have to find out then activate it .
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

Re: Lens firmware, serial communication, Dandelion, etc...

Postby coderat » Sat May 04, 2013 11:07 am

leegong wrote:Do you mind giving me more info about $XX ,$YY,$ZZ,$TT,$SS ?
It is not so difficult to make a patch that identifies specific LEns ID then applies specific focus offset , i even think it's implemented
in the current FirmWare , just have to find out then activate it .


@leegong: sorry I don't have yet :(

I am still reading some forums there, as soon as I get numbers I will share them. At the moment seems like the information was deleted...
Well, they want to make some money.
coderat
Core Developer
 
Posts: 2283
Joined: Fri Apr 26, 2013 10:21 am
Been thanked: 450 times

Re: Lens firmware, serial communication, Dandelion, etc...

Postby ubmtdc » Tue May 07, 2013 10:40 am

Maybe it is a good idea to share the information you found to see what is still open...

Have you read the information in the french thread from a german guy (especially byte positions 0x0d, 0x10 and 0x19)?

"Hi,

I've found this intersting forum because of the link to my website. (LensID information) [2]
Since I don't know much french I try in english, I hope some can read it ;-)
I maintaing a big list called extended LensID, it's use is to identify various CPU lenses exact
and to differenciate between Nikkors and 3rd party lenses. This can't always be done by focal length,
take the 12-24/4 as an example.
Seems to some new research on Nikon CPUs and lens data transferred to the camera.
I did some research some time ago with the varous patent info published by Nikon.
I also read some lens data with the help of an oscilloscope to find the LensID and fix
information that classifies a lens. This is mainly info that doesn't change with TC's and zooming.
This info and even more is recorded in EXIF makernote tags, and now used by some poplar EXIF readers.
The info I use is coded at addresses (0x12 to 0x18) the the bytes have following meaning:
ADR    NAME              DESC
0x12   LensID            An unique ID to identify a Nikkor lens (misused by some 3rd party lenses)
0x13   AppStops          The number of aperture stops a lens has, coded in 1/12th steps
0x14   FocLengthShort    Focal length on the short (wide) zoom end, coding can be found in [1]
0x15   FocLengthLong     same for the long (tele) end
0x16   MaxAppShort       Max apperture value on the wide side, coding see [1]
0x17   MaxAppLong        same for the long (tele) end
0x18   MCU_Version       This byte identifies the CPU chip. One chip was used for up to 4 lenses in
                                       the beginning of the AF aera. The lens is selected by bridges on the flex board.                     
Actual focal length is transmitted in 0x10 and the effective apperture is at 0x19.
With 'D' lenses the distance information is transmitted in byte 0x0D, coding also in [1]
I you have a look on the table containing the lensdata posted at this site [3], you find this correlation. (image below)
If you want to make 'P' chips you have to collect much more data and examine the data of 'P' lenses.
Then you have to find a suitable uC, a PIC with SPI may do the job, but I don't know.
The hardest part is to get your uC connected. Contact blocks are not easy to get ...
I hope I could help you a bit. Maybe you have some lenses missing on my list [2], so pleas help
me to fill the gaps.
  Robert

[1] http://members.aol.com/khancock/pilot/nbuddy/
[2] http://www.rottmerhusen.com/objektives/ … party.html
[3] http://www.nikonpassion.com/modules/sma … ?itemid=83"

Furthermore there was a picture somewhere in a forum which might be interesting. It can be found here:
http://imageshack.us/a/img801/9399/indexphpvs.jpg
ubmtdc
 
Posts: 10
Joined: Fri Mar 29, 2013 10:30 am
Been thanked: 0 time

Re: Lens firmware, serial communication, Dandelion, etc...

Postby ubmtdc » Tue May 07, 2013 10:41 am

coderat wrote:
I am still reading some forums there, as soon as I get numbers I will share them. At the moment seems like the information was deleted...
Well, they want to make some money.


Do you have some links for us?
ubmtdc
 
Posts: 10
Joined: Fri Mar 29, 2013 10:30 am
Been thanked: 0 time

Re: Lens firmware, serial communication, Dandelion, etc...

Postby ubmtdc » Tue May 07, 2013 10:58 am

I prepared an XLS sheet with some data in it (Hope it helps a little bit... Maybe you can fill in your findings):
Code: Select all
  1. No              3.3 - 4.5 / 35 - 70                                     Robert                  ExifTools MakerNotes   

  2.                 3.3 35mm        4 60mm          4.5 70mm        3.8 50mm                        No.     Description

  3. 0xFF    34      0x22    34      0x22    34      0x22    34      0x22    ProtocolStart          

  4. 0x00    37      0x25    30      0x1E    26      0x1A    31      0x1F   

  5. 0x01    42      0x2A    49      0x31    52      0x34    47      0x2F    ActAperture            

  6. 0x02    69      0x45    118     0x76    77      0x4D    68      0x44   

  7. 0x03    1       0x01    255     0xFF    255     0xFF    0       0x00   

  8. 0x04    196     0xC4    223     0xDF    207     0xCF    229     0xE5   

  9. 0x05    252     0xFC    251     0xFB    251     0xFB    251     0xFB   

  10. 0x06    23      0x17    27      0x1B    29      0x1D    27      0x1B   

  11. 0x07    26      0x1A    4       0x04    134     0x86    8       0x08   

  12. 0x08    0       0x00    0       0x00    0       0x00    0       0x00   

  13. 0x09    0       0x00    0       0x00    0       0x00    0       0x00    ?              

  14. 0x0A    53      0x35    53      0x35    53      0x35    53      0x35    LensType?               4       ExitPupilPosition

  15. 0x0B    32      0x20    32      0x20    32      0x20    32      0x20    LensType?               5       AFAperture

  16. 0x0C    32      0x20    32      0x20    32      0x20    32      0x20    LensType?               8       FocusPosition

  17. 0x0D    8       0x08    5       0x05    7       0x07    1       0x01    ActDistance             9       FocusDistance

  18. 0x0E    0       0x00    0       0x00    0       0x00    0       0x00    ?              

  19. 0x0F    0       0x00    0       0x00    0       0x00    0       0x00    ?              

  20. 0x10    68      0x44    83      0x53    92      0x5C    81      0x51    ActFocalLength          10      FocalLength

  21. 0x11    42      0x2A    49      0x31    52      0x34    47      0x2F    ActAperture            

  22. 0x12    29      0x1D    29      0x1D    29      0x1D    29      0x1D    LensId                  11      LensIDNumber

  23. 0x13    66      0x42    66      0x42    66      0x42    66      0x42    AppStops                12      LensFStops

  24. 0x14    68      0x44    68      0x44    68      0x44    68      0x44    FocalLengthShort        13      MinFocalLength

  25. 0x15    92      0x5C    92      0x5C    92      0x5C    92      0x5C    FocalLengthLong         14      MaxFocalLength

  26. 0x16    42      0x2A    42      0x2A    42      0x2A    42      0x2A    MaxApertureShort        15      MaxApertureAtMinFocal

  27. 0x17    52      0x34    52      0x34    52      0x34    52      0x34    MaxApertureLong         16      MaxApertureAtMaxFocal

  28. 0x18    18      0x12    18      0x12    18      0x12    18      0x12    MCU_Version             17      MCUVersion

  29. 0x19    42      0x2A    49      0x31    52      0x34    47      0x2F    ActAperture             18      EffectiveMaxAperture

  30. 0x1A    255     0xFF    255     0xFF    255     0xFF    255     0xFF                                    ProtocolStop

ubmtdc
 
Posts: 10
Joined: Fri Mar 29, 2013 10:30 am
Been thanked: 0 time

PreviousNext

Return to External Hacks

Who is online

Users browsing this forum: No registered users and 1 guest

cron