cdb module

Command Data Block (CDB) is a data structure used in SCSI (Small Computer System Interface) and other storage protocols to encapsulate commands sent to storage devices. It contains information about the command being executed, such as the operation code, parameters, and data transfer direction. CDBs are essential for communication between a host system and storage devices, enabling efficient data transfer and control operations.

cmd_0000h_query_status_cmd(port, ...)

Send CMD 0000h Query Status

cmd_0000h_query_status_reply(port, cdb_instance)

Read the module response to CMD 0000h Query Status

cmd_0001h_enter_password_cmd(port, ...)

Send CMD 0001h Enter Password

cmd_0001h_enter_password_reply(port, ...)

Read the module response to CMD 0001h Enter Password

cmd_0002h_change_password_cmd(port, ...)

Send CMD 0002h Change Password

cmd_0002h_change_password_reply(port, ...)

Read the module response to CMD 0002h Change Password

cmd_0004h_abort_processing_cmd(port, ...)

Send CMD 0004h Abort Processing

cmd_0004h_abort_processing_reply(port, ...)

Read the module response to CMD 0004h Abort Processing

cmd_0040h_module_features_cmd(port, cdb_instance)

Send CMD 0040h Module Features

cmd_0040h_module_features_reply(port, ...)

Read the module response to CMD 0040h Module Features

cmd_0041h_fw_mgmt_features_cmd(port, ...)

Send CMD 0041h Firmware Management Features

cmd_0041h_fw_mgmt_features_reply(port, ...)

Read the module response to CMD 0041h Firmware Management Features

cmd_0044h_sec_feat_and_capabilities_reply(...)

Read the module response to CMD 0044h Security Features and Capabilities

cmd_0044h_sec_feat_capabilities_cmd(port, ...)

Send CMD 0044h Security Features and Capabilities

cmd_0045h_externally_defined_features_cmd(...)

Send CMD 0045h Externally Defined Features

cmd_0045h_externally_defined_features_reply(...)

Read the module response to CMD 0045h Externally Defined Features

cmd_0050h_get_application_attributes_cmd(...)

Send CMD 0050h Get Application Attributes

cmd_0050h_get_application_attributes_reply(...)

Read the module response to CMD 0050h Get Application Attributes

cmd_0051h_get_interface_code_description_cmd(...)

Send CMD 0051h Get Interface Code Description

cmd_0051h_get_interface_code_description_reply(...)

Read the module response to CMD 0051h Get Interface Code Description

cmd_0100h_get_firmware_info_cmd(port, ...)

Send CMD 0100h Get Firmware Info

cmd_0100h_get_firmware_info_reply(port, ...)

Read the module response to CMD 0100h Get Firmware Info

cmd_0101h_start_firmware_download_cmd(port, ...)

Send CMD 0101h Start Firmware Download

cmd_0101h_start_firmware_download_reply(...)

Read the module response to CMD 0101h Start Firmware Download

cmd_0102h_abort_firmware_download_cmd(port, ...)

Send CMD 0102h Abort Firmware Download

cmd_0102h_abort_firmware_download_reply(...)

Read the module response to CMD 0102h Abort Firmware Download

cmd_0103h_write_firmware_block_lpl_cmd(port, ...)

Send CMD 0103h Write Firmware Block LPL

cmd_0103h_write_firmware_block_lpl_reply(...)

Read the module response to CMD 0103h Write Firmware Block LPL

cmd_0104h_write_firmware_block_epl_cmd(port, ...)

Send CMD 0104h Write Firmware Block EPL

cmd_0104h_write_firmware_block_epl_reply(...)

Read the module response to CMD 0104h Write Firmware Block EPL

cmd_0105h_read_firmware_block_lpl_cmd(port, ...)

Send CMD 0105h Read Firmware Block LPL

cmd_0105h_read_firmware_block_lpl_reply(...)

Read the module response to CMD 0105h Read Firmware Block LPL

cmd_0106h_read_firmware_block_epl_cmd(port, ...)

Send CMD 0106h Read Firmware Block EPL

cmd_0106h_read_firmware_block_epl_reply(...)

Read the module response to CMD 0106h Read Firmware Block EPL

cmd_0107h_complete_firmware_download_cmd(...)

Send CMD 0107h Complete Firmware Download

cmd_0107h_complete_firmware_download_reply(...)

Read the module response to CMD 0107h Complete Firmware Download

cmd_0108h_copy_firmware_image_cmd(port, ...)

Send CMD 0108h Copy Firmware Image

cmd_0108h_copy_firmware_image_reply(port, ...)

Read the module response to CMD 0108h Copy Firmware Image

cmd_0109h_run_firmware_image_cmd(port, ...)

Send CMD 0109h Run Firmware Image

cmd_0109h_run_firmware_image_reply(port, ...)

Read the module response to CMD 0109h Run Firmware Image

cmd_010ah_commit_firmware_image_cmd(port, ...)

Send CMD 010Ah Commit Firmware Image

cmd_010ah_commit_firmware_image_reply(port, ...)

Read the module response to CMD 010Ah Commit Firmware Image

cmd_custom_cmd_reply(port, cdb_instance)

Read the module response to CMD 8000h-FFFFh Custom Command

cmd_custom_cmd_request(port, cdb_instance, ...)

Send CMD 8000h-FFFFh Custom Command

CMD0000hQueryStatusReply

REPLY message of CMD 0000h Query Status

CMD0001hEnterPasswordReply

REPLY message of CMD 0001h Enter Password

CMD0002hChangePasswordReply

REPLY message of CMD 0002h Change Password

CMD0004hAbortProcessingReply

REPLY message of CMD 0004h Abort Processing

CMD0040hModuleFeaturesReply

REPLY message of CMD 0040h Module Features

CMD0041hFirmwareManagementFeaturesReply

REPLY message of CMD 0041h Firmware Management Features

CMD0044hSecFeaturesAndCapabilitiesReply

REPLY message of CMD 0044h Security Features and Capabilities

CMD0045hExternallyDefinedFeaturesReply

REPLY message of CMD 0045h Externally Defined Features

CMD0050hGetApplicationAttributesReply

REPLY message of CMD 0050h Get Application Attributes

CMD0051hGetInterfaceCodeDescriptionReply

REPLY message of CMD 0051h Get Interface Code Description

CMD0100hGetFirmwareInfoReply

REPLY message of CMD 0100h Get Firmware Info

CMD0101hStartFirmwareDownloadReply

REPLY message of CMD 0101h Start Firmware Download

CMD0102hAbortFirmwareDownloadReply

REPLY message of CMD 0102h Abort Firmware Download

CMD0103hWriteFirmwareBlockLPLReply

REPLY message of CMD 0103h Write Firmware Block LPL

CMD0104hWriteFirmwareBlockEPLReply

REPLY message of CMD 0104h Write Firmware Block EPL

CMD0105hReadFirmwareBlockLPLReply

REPLY message of CMD 0105h Read Firmware Block LPL

CMD0106hReadFirmwareBlockEPLReply

REPLY message of CMD 0106h Read Firmware Block EPL

CMD0107hCompleteFirmwareDownloadReply

REPLY message of CMD 0107h Complete Firmware Download

CMD0108hCopyFirmwareImageReply

REPLY message of CMD 0108h Copy Firmware Image

CMD0109hRunFirmwareImageReply

REPLY message of CMD 0109h Run Firmware Image

CMD010AhCommitFirmwareImageReply

REPLY message of CMD 010Ah Commit Firmware Image

CustomCMDReply

Defines the custom reply to receiver for the CDB instance.

firmware_download_procedure(port, ...)

Specified in OIF-CMIS-05.3

Module Contents

The cmis cdb high-level function module.

async cmd_0000h_query_status_cmd(port, cdb_instance, response_delay)[source]

Send CMD 0000h Query Status

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • response_delay (int) – Programmable delay in ms for module responding to this command. A value of 0 asks for module response as fast as possible.

async cmd_0000h_query_status_reply(port, cdb_instance)[source]

Read the module response to CMD 0000h Query Status

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0000h Query Status

Return type:

CMD0000hQueryStatusReply

async cmd_0001h_enter_password_cmd(port, cdb_instance, password)[source]

Send CMD 0001h Enter Password

Parameters:
  • port – the port object to send the command to

  • password (int) – password to be entered

async cmd_0001h_enter_password_reply(port, cdb_instance)[source]

Read the module response to CMD 0001h Enter Password

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0001h Enter Password

Return type:

CMD0001hEnterPasswordReply

async cmd_0002h_change_password_cmd(port, cdb_instance, new_password)[source]

Send CMD 0002h Change Password

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • new_password (int) – new password to be entered

async cmd_0002h_change_password_reply(port, cdb_instance)[source]

Read the module response to CMD 0002h Change Password

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0002h Change Password

Return type:

CMD0002hChangePasswordReply

async cmd_0004h_abort_processing_cmd(port, cdb_instance)[source]

Send CMD 0004h Abort Processing

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0004h_abort_processing_reply(port, cdb_instance)[source]

Read the module response to CMD 0004h Abort Processing

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0004h Abort Processing

Return type:

CMD0004hAbortProcessingReply

async cmd_0040h_module_features_cmd(port, cdb_instance)[source]

Send CMD 0040h Module Features

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0040h_module_features_reply(port, cdb_instance)[source]

Read the module response to CMD 0040h Module Features

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0040h Module Features

Return type:

CMD0040hModuleFeaturesReply

async cmd_0041h_fw_mgmt_features_cmd(port, cdb_instance)[source]

Send CMD 0041h Firmware Management Features

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0041h_fw_mgmt_features_reply(port, cdb_instance)[source]

Read the module response to CMD 0041h Firmware Management Features

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0041h Firmware Management Features

Return type:

CMD0041hFirmwareManagementFeaturesReply

async cmd_0044h_sec_feat_and_capabilities_reply(port, cdb_instance)[source]

Read the module response to CMD 0044h Security Features and Capabilities

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0044h Security Features and Capabilities

Return type:

CMD0044hSecFeaturesAndCapabilitiesReply

async cmd_0044h_sec_feat_capabilities_cmd(port, cdb_instance)[source]

Send CMD 0044h Security Features and Capabilities

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0045h_externally_defined_features_cmd(port, cdb_instance)[source]

Send CMD 0045h Externally Defined Features

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0045h_externally_defined_features_reply(port, cdb_instance)[source]

Read the module response to CMD 0045h Externally Defined Features

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0045h Externally Defined Features

Return type:

CMD0045hExternallyDefinedFeaturesReply

async cmd_0050h_get_application_attributes_cmd(port, cdb_instance, application_number)[source]

Send CMD 0050h Get Application Attributes

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • application_number (int) – U16 Application number. 15-8: reserved (0). 7-4: NADBlockIndex (0-15) or 0. 3-0: AppSelCode (1-15)

async cmd_0050h_get_application_attributes_reply(port, cdb_instance)[source]

Read the module response to CMD 0050h Get Application Attributes

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0050h Get Application Attributes

Return type:

CMD0050hGetApplicationAttributesReply

async cmd_0051h_get_interface_code_description_cmd(port, cdb_instance, interface_id, interface_location)[source]

Send CMD 0051h Get Interface Code Description

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • interface_id (hex str) – HostInterfaceID or MediaInterfaceID. 15-8: reserved (0). 7-0: InterfaceID

  • interface_location (int) – 0: Media side. 1: Host side

async cmd_0051h_get_interface_code_description_reply(port, cdb_instance)[source]

Read the module response to CMD 0051h Get Interface Code Description

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0051h Get Interface Code Description

Return type:

CMD0051hGetInterfaceCodeDescriptionReply

async cmd_0100h_get_firmware_info_cmd(port, cdb_instance)[source]

Send CMD 0100h Get Firmware Info

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0100h_get_firmware_info_reply(port, cdb_instance)[source]

Read the module response to CMD 0100h Get Firmware Info

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0100h Get Firmware Info

Return type:

CMD0100hGetFirmwareInfoReply

async cmd_0101h_start_firmware_download_cmd(port, cdb_instance, image_size, vendor_data)[source]

Send CMD 0101h Start Firmware Download

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • image_size (int) – U32 Size of firmware image to download into the module. This should be the file size including the LPL bytes sent as vendor data in this message.

  • vendor_data (hex str) – U8 Array of vendor specific data to be sent to the module. This data is sent as part of the firmware download message. The size of this data is included in the image_size parameter

async cmd_0101h_start_firmware_download_reply(port, cdb_instance)[source]

Read the module response to CMD 0101h Start Firmware Download

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0101h Start Firmware Download

Return type:

CMD0101hStartFirmwareDownloadReply

async cmd_0102h_abort_firmware_download_cmd(port, cdb_instance)[source]

Send CMD 0102h Abort Firmware Download

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0102h_abort_firmware_download_reply(port, cdb_instance)[source]

Read the module response to CMD 0102h Abort Firmware Download

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0102h Abort Firmware Download

Return type:

CMD0102hAbortFirmwareDownloadReply

async cmd_0103h_write_firmware_block_lpl_cmd(port, cdb_instance, block_address, firmware_block)[source]

Send CMD 0103h Write Firmware Block LPL

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • block_address (int) – U32 Starting byte address of this block of data within the supplied image file minus the size of the “Start Command Payload Size”.

  • firmware_block (bytes) – U8[116] One block of the firmware image. The actually needed length may be shorter than the available FirmwareBlock field size. This actual length of the block is defined in Byte 132 (LPLLength)

async cmd_0103h_write_firmware_block_lpl_reply(port, cdb_instance)[source]

Read the module response to CMD 0103h Write Firmware Block LPL

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0103h Write Firmware Block LPL

Return type:

CMD0103hWriteFirmwareBlockLPLReply

async cmd_0104h_write_firmware_block_epl_cmd(port, cdb_instance, block_address, firmware_block)[source]

Send CMD 0104h Write Firmware Block EPL

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • block_address (int) – U32 Starting byte address of this block of data within the supplied image file minus the size of the “Start Command Payload Size”.

  • firmware_block (hex str) – Up to 2048 Bytes. Actual Length specified in EPLLength

async cmd_0104h_write_firmware_block_epl_reply(port, cdb_instance)[source]

Read the module response to CMD 0104h Write Firmware Block EPL

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0104h Write Firmware Block EPL

Return type:

CMD0104hWriteFirmwareBlockEPLReply

async cmd_0105h_read_firmware_block_lpl_cmd(port, cdb_instance, block_address, length)[source]

Send CMD 0105h Read Firmware Block LPL

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • block_address (int) – U32 Starting byte address of this block of data within the supplied image file minus the size of the size of the “Start Command Payload Size”.

  • length (int) – U16 Number of bytes to read back to the LPL in this command, starting at the indicated address.

async cmd_0105h_read_firmware_block_lpl_reply(port, cdb_instance)[source]

Read the module response to CMD 0105h Read Firmware Block LPL

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • block_address (int) – U32 Starting byte address of this block of data within the supplied image file minus the size of the size of the “Start Command Payload Size”.

  • length (int) – U16 Number of bytes to read back to the LPL in this command, starting at the indicated address

Returns:

REPLY of CMD 0105h Read Firmware Block LPL

Return type:

CMD0105hReadFirmwareBlockLPLReply

async cmd_0106h_read_firmware_block_epl_cmd(port, cdb_instance, block_address, length)[source]

Send CMD 0106h Read Firmware Block EPL

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • block_address (int) – U32 Starting byte address of this block of data within the supplied image file minus the size of the size of the “Start Command Payload Size”

  • length (int) – U16 Number of bytes to read back to the EPL in this command, starting at the indicated address.

async cmd_0106h_read_firmware_block_epl_reply(port, cdb_instance)[source]

Read the module response to CMD 0106h Read Firmware Block EPL

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • block_address (int) – U32 Starting byte address of this block of data within the supplied image file minus the size of the size of the “Start Command Payload Size”

  • length (int) – U16 Number of bytes to read back to the EPL in this command, starting at the indicated address.

Returns:

REPLY of CMD 0106h Read Firmware Block EPL

Return type:

CMD0106hReadFirmwareBlockEPLReply

async cmd_0107h_complete_firmware_download_cmd(port, cdb_instance)[source]

Send CMD 0107h Complete Firmware Download

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_0107h_complete_firmware_download_reply(port, cdb_instance)[source]

Read the module response to CMD 0107h Complete Firmware Download

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0107h Complete Firmware Download

Return type:

CMD0107hCompleteFirmwareDownloadReply

async cmd_0108h_copy_firmware_image_cmd(port, cdb_instance, copy_direction)[source]

Send CMD 0108h Copy Firmware Image

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • copy_direction (hex str) –

    copy direction.

    • 0xAB, Copy Image A into Image B

    • 0xBA,Copy Image B into Image A

async cmd_0108h_copy_firmware_image_reply(port, cdb_instance)[source]

Read the module response to CMD 0108h Copy Firmware Image

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0108h Copy Firmware Image

Return type:

CMD0108CopyFirmwareImageReply

async cmd_0109h_run_firmware_image_cmd(port, cdb_instance, image_to_run, delay_to_reset)[source]

Send CMD 0109h Run Firmware Image

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • image_to_run (int) –

    integer, index of the image to run.

    • 0 = Traffic affecting Reset to Inactive Image.

    • 1 = Attempt Hitless Reset to Inactive Image

    • 2 = Traffic affecting Reset to Running Image.

    • 3 = Attempt Hitless Reset to Running Image

  • delay_to_reset (int) – integer, Indicates the delay in ms after receiving this command before a reset will occur, starting from the time the CDB complete Flag is set.

async cmd_0109h_run_firmware_image_reply(port, cdb_instance)[source]

Read the module response to CMD 0109h Run Firmware Image

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 0109h Run Firmware Image

Return type:

CMD0109RunFirmwareImageReply

async cmd_010ah_commit_firmware_image_cmd(port, cdb_instance)[source]

Send CMD 010Ah Commit Firmware Image

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

async cmd_010ah_commit_firmware_image_reply(port, cdb_instance)[source]

Read the module response to CMD 010Ah Commit Firmware Image

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 010Ah Commit Firmware Image

Return type:

CMD010AhCommitFirmwareImageReply

async cmd_custom_cmd_reply(port, cdb_instance)[source]

Read the module response to CMD 8000h-FFFFh Custom Command

Parameters:
  • port (GenericL23Port) – the port object to read the response from

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

Returns:

REPLY of CMD 8000h-FFFFh Custom Command

Return type:

CustomCMDReply

async cmd_custom_cmd_request(port, cdb_instance, cmd_id, epl_length, lpl_length, rpl_length, rpl_check_code, data)[source]

Send CMD 8000h-FFFFh Custom Command

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • cmd_id (hex str) – CMD Header.CMDID. Command ID.

  • epl_length (int) – CMD Header.EPLLength. Length of the EPL.

  • lpl_length (int) – CMD Header.LPLLength. Length of the LPL.

  • rpl_length (int) – CMD Header.RPLLength. Length of the RPL (optional).

  • rpl_check_code (int) – CMD Header.RPLChkCode. Check code for the RPL. (optional)

  • data (hex str) – CMD Data.Data. The data to be sent in the command.

class CMD0000hQueryStatusReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0000h Query Status

status

integer

  • 0000 0000b: Module Boot Up.

  • 0000 0001b: Host Password Accepted.

  • 1xxx xxxxb: Module Password accepted.

  • Bits ‘x’ may contain custom information.

class CMD0001hEnterPasswordReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0001h Enter Password

class CMD0002hChangePasswordReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0002h Change Password

class CMD0004hAbortProcessingReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0004h Abort Processing

class CMD0040hModuleFeaturesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0040h Module Features

max_completion_time

integer, U16 Maximum CDB command execution time in ms, of all supported CDB commands

class CMD0041hFirmwareManagementFeaturesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0041h Firmware Management Features

abort_cmd
  • 0b = CMD 0102h (Abort) Not Supported

  • 1b = CMD 0102h (Abort) Supported

copy_cmd
  • 0b = CMD 0108h (Copy image) Not Supported

  • 1b = CMD 0108h (Copy image) Supported

skipping_erased_blocks
  • 0b = Skipping erased blocks Not Supported

  • 1b = Skipping erased blocks Supported

max_duration_coding
  • 0b = max duration multiplier M is 1

  • 1b = max duration multiplier M is 10

This bit encodes a multiplier value M which governs the interpretation of values found in the U16 array of advertised max durations in Bytes 144-153 of this message: These advertised values are multiplied by M.

image_readback
  • 0b = Full Image Readback Not Supported

  • 1b = Full Image Readback Supported

start_cmd_payload_size

integer, This defines the number of bytes that the host must extract from the beginning of the vendor-delivered binary firmware image file and send to the module in CMD 0101h (Start)

erased_byte

integer, This is the value representing an erased byte. The purpose of advertising this byte is to optionally reduce download time by allowing the host to skip sending blocks of the image containing ErasedByte values only.

read_write_length_ext

integer, specifies the allowable additional number of byte octets in a READ or a WRITE, specifically for Firmware Management Commands (IDs 0100h-01FFh) as follows:

EPL: For accessing the multi-page EPL field, the allowable length extension is i byte octets (8 bytes).

LPL: For accessing the LPL field on page 9Fh, the allowable length extension is min(i, 15) byte octets.

This leads to the maximum length of a READ or a WRITE

Value Maximum Number of Bytes (EPL)

  • 0: 8 bytes (no extension of general length limit)

  • i: 8 x (1+i) bytes (0 <= i <= 255)

  • 255: 8 x 256 = 2048 bytes

Value Maximum Number of Bytes (LPL)

  • 0: 8 bytes (no extension of general length limit)

  • i: 8 x (1+i) bytes (0 <= i <= 15)

  • i: 8 x 16 = 128 bytes (16 <= i <= 256)

write_mechanism

integer, Firmware update supported mechanism

  • 00h: None Supported.

  • 01h: Write to LPL supported.

  • 10h: Write to EPL supported.

  • 11h: Both Write to LPL and EPL supported.

read_mechanism

integer, Firmware read / readback support mechanism.

  • 00h: None Supported.

  • 01h: Read via LPL supported.

  • 10h: Read via EPL supported.

  • 11h: Both Read via LPL and EPL supported.

hitless_restart

integer

  • 0: CMD Run Image causes a reset. Traffic is affected.

  • 1: CMD Run Image may reset but module will do its best to maintain traffic and management states. Data path functions are not reset.

max_duration_start

integer, U16 Maximum time in M ms for a CDB Start command to complete execution

max_duration_abort

integer, U16 Maximum time in M ms for a CDB Abort command to complete execution

max_duration_write

integer, U16 Maximum time in M ms for a CDB Write command to complete execution

max_duration_complete

integer, U16 Maximum time in M ms for a CDB Complete command to complete execution

max_duration_copy

integer, U16 Maximum time in M ms for a CDB Copy command to complete execution

class CMD0044hSecFeaturesAndCapabilitiesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0044h Security Features and Capabilities

cmd_support

CMD 0400h-04FFh support.

Each integer represents a mask. If an integer is set, the corresponding command is supported

  • D0: CMD 0400h is supported.

  • D255: CMD 04FFh is supported

num_certificates

integer, Number of public certificates the host may obtain from the module.

The device must contain a single leaf certificate and it may optionally contain one or more intermediate certificates optionally followed by a root certificate. For X.509 certificates, intermediate certificates are not self-signed, and the root cert is self-signed.

num_certificates <= 4

cert_chain_supported

integer

  • 0: Certificate chain is not supported. Module contains leaf certificate instance i = 0 only.

  • 1: Module supports certificate chain and host must specify the instance when downloading a certificate.

Instance i = 0 is the start of the chain, i.e. the leaf certificate, and any instance i+1 is another certificate used to sign the certificate instance i, where i < num_certificates <= 4

certificate_format

integer

  • 0: Not supported.

  • 1: Custom.

  • 2: X509v3 DER encoding.

  • 3-255: Reserved.

certificate_length_1

integer, Length of leaf certificate i = 0.

certificate_length_2

integer, Length of certificate i = 1 or 0 when not supported.

certificate_length_3

integer, Length of certificate i = 2 or 0 when not supported.

certificate_length_4

integer, Length of certificate i = 3 or 0 when not supported.

digest_length

integer, Required message hash digest length (in bytes)

  • 0: Not supported.

  • 1: 28 bytes (SHA224).

  • 2: 32 bytes (SHA256).

  • 3: 48 bytes (SHA384).

  • 4: 64 bytes (SHA512).

  • 5-255: Reserved.

signature_time

integer, Maximum time (in milliseconds) for signature generation.

signature_length

integer, Length (in bytes) of the encoded/padded (if applicable) digest signature

signature_format

integer * 0: Not supported. * 1: Custom, vendor specific encoding. * 2: Raw binary byte stream. * 3: DER encoding. * 4: ECDSA (R,S) integer pair, integers prefixed with length. * 5-255: Reserved.

signature_pad_scheme

integer

  • 0: None.

  • 1: Custom.

  • 2: PKCS#1 v1.5.

  • 3: OAEP.

  • 4: PSS.

  • 5-255: Reserved

class CMD0045hExternallyDefinedFeaturesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0045h Externally Defined Features

supplement_support

Bit 0 = 0/1: CMIS-VCS not supported/supported

class CMD0050hGetApplicationAttributesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0050h Get Application Attributes

application_number

integer, U16 Application number.

  • 15-8: reserved (0).

  • 7-4: NADBlockIndex (0-15) or 0.

  • 3-0: AppSelCode (1-15).

max_module_power

integer, U16: Worst case module power dissipation when this Application is instantiated homogeneously as often as possible in parallel (when applicable) with worst case configuration options.

Unit: 0.25 W.

prog_output_power_min

integer, S16: Minimum Programmable Output Power, Unit: 0.01 dBm.

prog_output_power_max

integer, S16: Maximum Programmable Output Power, Unit: 0.01 dBm.

pre_fec_ber_threshold

float, F16: Pre FEC BER VDM high alarm threshold.

rx_los_optical_power_threshold

integer, S16: Optical power threshold for RxLOS alarm. Unit: 0.01dBm.

rx_power_high_alarm_threshold

integer, U16: OpticalPowerRxHighAlarmThreshold. Unit: 0.1uW.

rx_power_low_alarm_threshold

integer, U16: OpticalPowerRxLowAlarmThreshold. Unit: 0.1uW.

rx_power_high_warning_threshold

integer, U16: OpticalPowerRxHighWarningThreshold.Unit: 0.1uW.

rx_power_low_warning_threshold

integer, U16: OpticalPowerRxLowWarningThreshold. Unit: 0.1uW.

class CMD0051hGetInterfaceCodeDescriptionReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0051h Get Interface Code Description

interface_id

integer, U16: HostInterfaceID or MediaInterfaceID. 15-8: reserved (0). 7-0: InterfaceID

interface_location

integer, 0: media side. 1: host side.

interfacre_name

string, 16-byte long ACII string. Name of the interface.

interfacre_description

string, 48-byte long ACII string. Description of the interface.

interfacre_data_rate

float, F16: Application Bit Rate in Gb/s

interfacre_lane_count

integer, U16: Number of parallel lanes.

lane_signaling_rate

float, F16: Lane Signaling Rate in GBd.

modulation

string, 16-byte long ACII string. Lane Modulation Format.

bits_per_symbol

integer, U16: Bits per Symbol.

class CMD0100hGetFirmwareInfoReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0100h Get Firmware Info

firmware_status

integer, Firmware Status.

Bitmask to indicate FW Status.

  • Image in Bank A:
    • Bit 0: Operational Status

    • Bit 1: Administrative Status

    • Bit 2: Validity Status

    • Bit 3: Reserved

  • Image in Bank B:
    • Bit 4: Operational Status

    • Bit 5: Administrative Status

    • Bit 6: Validity Status

    • Bit 7: Reserved

  • Encoding as follows:
    • Operational Status: 1 = running, 0 = not running

    • Administrative Status: 1=committed, 0=uncommitted

    • Validity Status: 1 = invalid, 0 = valid

image_information

integer, Image Information.

  • Bit 0: Firmware image A information

  • Bit 1: Firmware image B information

  • Bit 2: Factory or Boot image information

image_a_major

integer, Image A firmware major revision.

image_a_minor

integer, Image A firmware minor revision.

image_a_build

integer, Image A firmware build number.

image_a_extra_string

string, Image A additional information (32-byte long ASCII string).

image_b_major

integer, Image B firmware major revision.

image_b_minor

integer, Image B firmware minor revision.

image_b_build

integer, Image B firmware build number.

image_b_extra_string

string, Image B additional information (32-byte long ASCII string).

factory_boot_major

integer, Factory or Boot firmware major revision.

factory_boot_minor

integer, Factory or Boot firmware minor revision.

factory_boot_build

integer, Factory or Boot firmware build number.

factory_boot_extra_string

string, Factory or Boot additional information (32-byte long ASCII string).

class CMD0101hStartFirmwareDownloadReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0101h Start Firmware Download

class CMD0102hAbortFirmwareDownloadReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0102h Abort Firmware Download

class CMD0103hWriteFirmwareBlockLPLReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0103h Write Firmware Block LPL

class CMD0104hWriteFirmwareBlockEPLReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0104h Write Firmware Block EPL

class CMD0105hReadFirmwareBlockLPLReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0105h Read Firmware Block LPL

base_address_block

hex string, Base address of the data block within the firmware image.

image_data

hex string, Up to 116 bytes.

class CMD0106hReadFirmwareBlockEPLReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0106h Read Firmware Block EPL

image_data

Up to 2048 Bytes. Actual Length specified in RPLLength

class CMD0107hCompleteFirmwareDownloadReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0107h Complete Firmware Download

class CMD0108hCopyFirmwareImageReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0108h Copy Firmware Image

length

integer, number of bytes copied.

copy_direction

int, copy direction.

  • 0xAB, Copy Image A into Image B

  • 0xBA,Copy Image B into Image A

copy_status

int, copy status.

  • 0x00, Copy Successful

  • 0x01, Copy Failed

class CMD0109hRunFirmwareImageReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0109h Run Firmware Image

class CMD010AhCommitFirmwareImageReply[source]

Bases: CMDBaseReply

REPLY message of CMD 010Ah Commit Firmware Image

class CustomCMDReply[source]

Bases: object

Defines the custom reply to receiver for the CDB instance.

cdb_io_status

integer, indicates the CDB IO status.

  • 0: Idle, transceiver is not processing a CDB command.

  • 1: Finished, transceiver has finished processing a CDB command. It is ready to accept a new CDB command.

  • 2: Timeout, transceiver has timed out while processing a CDB command. It is ready to accept a new CDB command.

  • 3: In progress: transceiver is currently processing a CDB command. It is not ready to accept a new CDB command.

cdb_cmd_complete_flag

Integer, REPLY Status.CdbCmdCompleteFlag.

Indicates whether the CDB command is complete.

cdb_status

Integer, REPLY Status.CdbStatus.

Provides the status of the most recently triggered CDB command.

rpl_length

integer, REPLY Header.RPLLength.

Length of the reply data.

rpl_check_code

integer, REPLY Header.RPLChkCode.

Check code for the reply data.

data

hex string, REPLY Data.Data

The actual data to be sent in the reply.

async firmware_download_procedure(port, cdb_instance, firmware_file, use_epl_write, use_abort_for_failure)[source]

Specified in OIF-CMIS-05.3

Start transceiver firmware update on the specified port.

The host begins by reading module capabilities using CMD 0041h: (Firmware Management Features).

The host then reads (and possibly converts to binary format) the vendor specific and vendor provided firmware download file into a contiguous addressable byte array defined as the binary download image.

To start the firmware download, the host sends the download image header consisting of the first StartCmdPayloadSize bytes from the download image using CMD 0101h: (Start Firmware Download). This header instructs the module in a vendor specific way about the full or partial download content to be expected.

Before the module updates an image bank in a download procedure the module ensures that the bank is marked as empty or corrupt until the download has eventually finished successfully.

When CMD 0101h: was successful, the module is ready to accept data from the host using the advertised method, either CMD 0103h: (Write Firmware Block LPL) or CMD 0104h: (Write Firmware Block EPL). These command differ only in the allowed size of a download image block, which: is advertised for the EPL variant.

The host zero-initializes a variable containing the address of the next data block to be sent or received in subsequent Write Firmware Block or Read Firmware Block commands, respectively.

In a loop the host then reads subsequent bytes of the download image in blocks not exceeding the allowed block site and sends it using CMD 0103h: or 0104h.

Parameters:
  • port (GenericL23Port) – the port object to send the command to

  • cdb_instance (int) – the CDB instance number.

  • firmware_file (str) – the module firmware filename

  • use_epl_write (bool) – should the procedure use EPL write mechanism for data block write.

  • use_abort_for_failure (bool) – should the procedure use CMD 0102h Abort Firmware Download to abort the firmware download on failure.