Samsung NX Protocol – Boot Sequence (1)

This post will describe how Samsung NX body communicates with its NX lens when the power is up.

Below logic analyzer capture shows the entire steps when NX camera power is up with NX 30/F2.0 lens.

(1) Echo Request/Response
(2) Lens General Info. Request/Response
(3) Lens Specific Property Request/Response
(4) Lens Aperture Ring Position Initialization.

For Step (1), (2) : CLK generates sync. signal as 250 KHz.
For Step (3) and later: CLK generates sync. signal as 2 MHz.

Now I will explain more detail for each step.

 

The very first communication : ECHO 

This request/response between the camera and lens is the very first communication when the camera power is up.

Boot-1-Echo

Since it is first one, I explain the step in detail.

  • The camera sends 0x03 0xAA 0x55 to lens through DCL (Pin 3) 
  • About 60us later, the lens change LDR (Pin 5) from HIGH to LOW – which means lens has data to send to the body.
  • About 40us later, the body starts providing sync. signal on CLK (Pin 1)
  • Then lens sends 0x03 0xAA 0x55 to body according to the CLK signal through DLC (Pin 2)
  • Once all data has been sent, the lens change back LDR (Pin 5) state as HIGH.

From now on, I will just describe only data between the camera and lens.

 

Step 2 : Lens General Info. Request/Response

Following shots shows beginning part of the step.

Boot-2-GetLensGeneralInfo

  • The body sends 0x03 0x10 0x01 to the lens.
  • If everything is normal, the lens sends following info. back to the body.
    • Byte 1 : Entire data packet size in byte.
    • Byte 2 – 3 : 0x20 0x01 – means the lens processed the request nomally.
      (it names as “OK”)
    • Block 1 : Header (??)
    • Block 2 : Support Operations Indices
    • Block 3 : Support Event Indices
    • Block 4 : Support Property Indices
    • Block 5 : Support Specific Data Indices
    • Block 6 : Support Status Indices
    • Block 7 : Lens Manufacturer
    • Block 8 : Lens Model
    • Block 9 : Lens Firmware
    • Block 10 : Lens Serial Number

 

Step 2: Block 1 : Header (???)

  • Size : 11 Bytes

I names this block as “Header”. I couldn’t understand accurately, but, it has same values regardless any NX cameras and lenses. Only last byte has different values, but it is not an lens ID number for sure.

Below charts are the values for some combinations of NX cameras and lenses.

Header

 

Step 2: Block 2 : Support Operation Indices

  • Byte 1-3 : 0x00 0x00 0x00  always
  • Byte 4 : Number of support operations
  • Rest : Index values which consist of 2 bytes as many as defined in Byte 4

I figured out this block is about Support Operations, but the meaning of each values is not identified. I guess the meaning of the values can be understand by only the body internally. There is no data back-and-forth about the definitions.

 

[ Support Operation Block values ]
[ Support Operation Block values ]

Step 2: Block 3 : Support Event Indices

  • Byte 1-3 : 0x00 0x00 0x00  always
  • Byte 4 : Number of support events
  • Rest of block: Index values which consist of 2 bytes as many as defined in Byte 4

I figured out this block is about Support Events, but the meaning of each values is not identified.

[ Support Event Table]
[ Support Event Table]

Step 2: Block 4 : Support Property Indices

  • Byte 1-3 : 0x00 0x00 0x00  always
  • Byte 4 : Number of support properties
  • Rest of block : Index values which consist of 2 bytes as many as defined in Byte 4

I figured out this block is about Support Properties. The indices are used to additional inquiries by the body in Step 3 : Lens Specific Property Request/Response.

[ Support Property Table ]
[ Support Property Table ]

Step 2: Block 5 : Support Specific Data Indices

  • Byte 1-3 : 0x00 0x00 0x00  always
  • Byte 4 : Number of support specific data
  • Rest of block : Index values which consist of 2 bytes as many as defined in Byte 4

I figured out this block is about Support Specific Data, but the meaning of each values is not identified.

[ Support Specific Data Table ]
[ Support Specific Data Table ]

Step 2: Block 6 : Support Status Indices

  • Byte 1-3 : 0x00 0x00 0x00  always
  • Byte 4 : Number of support status data
  • Rest of block : Index values which consist of 2 bytes as many as defined in Byte 4

I figured out this block is about Support Status Data, but the meaning of each values is not identified.

[ Support Status Table ]
[ Support Status Table ]

Step 2: Block 7 : Lens Manufacturer

  • Byte 1 : Data size of the block
  • Rest of block : Manufacturer string
[ Lens Manufacturer ]
[ Lens Manufacturer ]

Step 2: Block 8 : Lens Model

  • Byte 1 : Data size of the block
  • Rest of block : Lens model string
[ Lens Model ]
[ Lens Model ]

Step 2: Block 9 : Lens Firmware

  • Byte 1 : Data size of the block
  • Rest of block : Lens firmware string
[ Lens Firmware ]
[ Lens Firmware ]

Step 2: Block 10 : Lens Serial Number

  • Byte 1 : Data size of the block
  • Rest of block : Lens serial number string

This block contains the lens serial number.