Command Data Block (CDB)

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

class CMD0000hQueryStatusReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0000h Query Status

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy capturing command

  • 10 000010b: Busy checking/validating command

  • 10 000011b: Busy executing command

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000101b: CdbChkCode error

status

hex string

  • 0000 0000b: Module Boot Up.

  • 0000 0001b: Host Password Accepted.

  • 1xxx xxxxb: Module Password accepted.

  • Bits ‘x’ may contain custom information.

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

Send CMD 0000h Query Status

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0001h: Enter Password

class CMD0001hEnterPasswordReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0001h Enter Password

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000101b: CdbChkCode error

  • 01 000110b: Password error – not accepted

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

Send CMD 0001h Enter Password

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

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • password (hex str) – 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 (Z800FreyaPort) – 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

CMD 0002h: Change Password

class CMD0002hChangePasswordReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0002h Change Password

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error (e.g. Bit 31 is set).

  • 01 000101b: CdbChkCode error

  • 01 000110b: Insufficient privilege to change password

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

Send CMD 0002h Change Password

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

  • cdb_instance (int) –

    CDB instance number.

    • 0 = CBD Instance 1

    • 1 = CDB Instance 2

  • new_password (hex str) – 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 (Z800FreyaPort) – 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

CMD 0004h: Abort Processing

class CMD0004hAbortProcessingReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0004h Abort Processing

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000101b: CdbChkCode error

async cmd_0004h_abort_processing_cmd(port, cdb_instance)[source]

Send CMD 0004h Abort Processing

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0040h: Module Features

class CMD0040hModuleFeaturesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0040h Module Features

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000101b: CdbChkCode error

cmd_support_0000h_0007h

Support mask for CMD 0000h to CMD 0007h

cmd_support_0008h_000fh

Support mask for CMD 0008h to CMD 000fh

cmd_support_0010h_0017h

Support mask for CMD 0010h to CMD 0017h

cmd_support_0018h_001fh

Support mask for CMD 0018h to CMD 001fh

cmd_support_0020h_0027h

Support mask for CMD 0020h to CMD 0027h

cmd_support_0028h_002fh

Support mask for CMD 0028h to CMD 002fh

cmd_support_0030h_0037h

Support mask for CMD 0030h to CMD 0037h

cmd_support_0038h_003fh

Support mask for CMD 0038h to CMD 003fh

cmd_support_0040h_0047h

Support mask for CMD 0040h to CMD 0047h

cmd_support_0048h_004fh

Support mask for CMD 0048h to CMD 004fh

cmd_support_0050h_0057h

Support mask for CMD 0050h to CMD 0057h

cmd_support_0058h_005fh

Support mask for CMD 0058h to CMD 005fh

cmd_support_0060h_0067h

Support mask for CMD 0060h to CMD 0067h

cmd_support_0068h_006fh

Support mask for CMD 0068h to CMD 006fh

cmd_support_0070h_0077h

Support mask for CMD 0070h to CMD 0077h

cmd_support_0078h_007fh

Support mask for CMD 0078h to CMD 007fh

cmd_support_0080h_0087h

Support mask for CMD 0080h to CMD 0087h

cmd_support_0088h_008fh

Support mask for CMD 0088h to CMD 008fh

cmd_support_0090h_0097h

Support mask for CMD 0090h to CMD 0097h

cmd_support_0098h_009fh

Support mask for CMD 0098h to CMD 009fh

cmd_support_00a0h_00a7h

Support mask for CMD 00a0h to CMD 00a7h

cmd_support_00a8h_00afh

Support mask for CMD 00a8h to CMD 00afh

cmd_support_00b0h_00b7h

Support mask for CMD 00b0h to CMD 00b7h

cmd_support_00b8h_00bfh

Support mask for CMD 00b8h to CMD 00bfh

cmd_support_00c0h_00c7h

Support mask for CMD 00c0h to CMD 00c7h

cmd_support_00c8h_00cfh

Support mask for CMD 00c8h to CMD 00cfh

cmd_support_00d0h_00d7h

Support mask for CMD 00d0h to CMD 00d7h

cmd_support_00d8h_00dfh

Support mask for CMD 00d8h to CMD 00dfh

cmd_support_00e0h_00e7h

Support mask for CMD 00e0h to CMD 00e7h

cmd_support_00e8h_00efh

Support mask for CMD 00e8h to CMD 00efh

cmd_support_00f0h_00f7h

Support mask for CMD 00f0h to CMD 00f7h

cmd_support_00f8h_00ffh

Support mask for CMD 00f8h to CMD 00ffh

max_completion_time

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

async cmd_0040h_module_features_reply(port, cdb_instance)[source]

Read the module response to CMD 0040h Module Features

Parameters:
  • port (Z800FreyaPort) – 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

CMD 0041h: Firmware Management Features

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

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

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

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

erased_byte

hex string, 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.

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.

image_readback
  • 0b = Full Image Readback Not Supported

  • 1b = Full Image Readback Supported

max_duration_abort

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

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.

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

max_duration_start

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

max_duration_write

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

read_mechanism

hex string, 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.

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 * (1+i) bytes (0 ≤ i ≤ 255)

  • 255: 8 * 256 = 2048 bytes

Value Maximum Number of Bytes (LPL)

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

  • i: 8 * (1+i) bytes (0 ≤ i ≤ 15)

  • i: 8 * 16 = 128 bytes (16 ≤ i ≤ 256)

skipping_erased_blocks
  • 0b = Skipping erased blocks Not Supported

  • 1b = Skipping erased blocks 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)

write_mechanism

hex string, 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.

async cmd_0041h_fw_mgmt_features_reply(port, cdb_instance)[source]

Read the module response to CMD 0041h Firmware Management Features

Parameters:
  • port (Z800FreyaPort) – 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

CMD 0044h: Security Features and Capabilities

class CMD0044hSecFeaturesAndCapabilitiesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0044h Security Features and Capabilities

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000101b: CdbChkCode error

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.

cmd_support_0400h_0407h

CMD 0400h-0407h support.

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

  • D0: CMD 0400h is supported.

  • D7: CMD 0407h is supported

cmd_support_0408h_040fh

CMD 0408h-040Fh support

cmd_support_0410h_0417h

CMD 0410h-0417h support

cmd_support_0418h_041fh

CMD 0418h-041Fh support

cmd_support_0420h_0427h

CMD 0420h-0427h support

cmd_support_0428h_042fh

CMD 0428h-042Fh support

cmd_support_0430h_0437h

CMD 0430h-0437h support

cmd_support_0438h_043fh

CMD 0438h-043Fh support

cmd_support_0440h_0447h

CMD 0440h-0447h support

cmd_support_0448h_044fh

CMD 0448h-044Fh support

cmd_support_0450h_0457h

CMD 0450h-0457h support

cmd_support_0458h_045fh

CMD 0458h-045Fh support

cmd_support_0460h_0467h

CMD 0460h-0467h support

cmd_support_0468h_046fh

CMD 0468h-046Fh support

cmd_support_0470h_0477h

CMD 0470h-0477h support

cmd_support_0478h_047fh

CMD 0478h-047Fh support

cmd_support_0480h_0487h

CMD 0480h-0487h support

cmd_support_0488h_048fh

CMD 0488h-048Fh support

cmd_support_0490h_0497h

CMD 0490h-0497h support

cmd_support_0498h_049fh

CMD 0498h-049Fh support

cmd_support_04a0h_04a7h

CMD 04a0h-04a7h support

cmd_support_04a8h_04afh

CMD 04a8h-04afh support

cmd_support_04b0h_04b7h

CMD 04b0h-04b7h support

cmd_support_04b8h_04bfh

CMD 04b8h-04bfh support

cmd_support_04c0h_04c7h

CMD 04c0h-04c7h support

cmd_support_04c8h_04cfh

CMD 04c8h-04cfh support

cmd_support_04d0h_04d7h

CMD 04d0h-04d7h support

cmd_support_04d8h_04dfh

CMD 04d8h-04dfh support

cmd_support_04e0h_04e7h

CMD 04e0h-04e7h support

cmd_support_04e8h_04efh

CMD 04e8h-04efh support

cmd_support_04f0h_04f7h

CMD 04f0h-04f7h support

cmd_support_04f8h_04ffh

CMD 04f8h-04ffh support

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.

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

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_length

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

signature_pad_scheme

integer

  • 0: None.

  • 1: Custom.

  • 2: PKCS#1 v1.5.

  • 3: OAEP.

  • 4: PSS.

  • 5-255: Reserved

signature_time

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

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 (Z800FreyaPort) – 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

CMD 0045h: Externally Defined Features

class CMD0045hExternallyDefinedFeaturesReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0045h Externally Defined Features

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000101b: CdbChkCode error

supplement_support

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

async cmd_0045h_externally_defined_features_reply(port, cdb_instance)[source]

Read the module response to CMD 0045h Externally Defined Features

Parameters:
  • port (Z800FreyaPort) – 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

CMD 0050h: Get Application Attributes

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).

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

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.

pre_fec_ber_threshold

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

prog_output_power_max

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

prog_output_power_min

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

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_high_warning_threshold

integer, U16: OpticalPowerRxHighWarningThreshold.Unit: 0.1uW.

rx_power_low_alarm_threshold

integer, U16: OpticalPowerRxLowAlarmThreshold. Unit: 0.1uW.

rx_power_low_warning_threshold

integer, U16: OpticalPowerRxLowWarningThreshold. Unit: 0.1uW.

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

Send CMD 0050h Get Application Attributes

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0051h: Get Interface Code Description

class CMD0051hGetInterfaceCodeDescriptionReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0051h Get Interface Code Description

bits_per_symbol

integer, U16: Bits per Symbol.

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

interface_id

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

interface_location

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

interfacre_data_rate

float, F16: Application Bit Rate in Gb/s

interfacre_description

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

interfacre_lane_count

integer, U16: Number of parallel lanes.

interfacre_name

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

lane_signaling_rate

float, F16: Lane Signaling Rate in GBd.

modulation

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

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 (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0100h: Get Firmware Info

class CMD0100hGetFirmwareInfoReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0100h Get Firmware Info

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

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).

factory_boot_major

integer, Factory or Boot firmware major revision.

factory_boot_minor

integer, Factory or Boot firmware minor revision.

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_a_build

integer, Image A firmware build number.

image_a_extra_string

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

image_a_major

integer, Image A firmware major revision.

image_a_minor

integer, Image A 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).

image_b_major

integer, Image B firmware major revision.

image_b_minor

integer, Image B firmware minor revision.

image_information

integer, Image Information.

  • Bit 0: Firmware image A information

  • Bit 1: Firmware image B information

  • Bit 2: Factory or Boot image information

async cmd_0100h_get_firmware_info_reply(port, cdb_instance)[source]

Read the module response to CMD 0100h Get Firmware Info

Parameters:
  • port (Z800FreyaPort) – 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

CMD 0101h: Start Firmware Download

class CMD0101hStartFirmwareDownloadReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0101h Start Firmware Download

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

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

Send CMD 0101h Start Firmware Download

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0102h: Abort Firmware Download

class CMD0102hAbortFirmwareDownloadReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0102h Abort Firmware Download

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

async cmd_0102h_abort_firmware_download_cmd(port, cdb_instance)[source]

Send CMD 0102h Abort Firmware Download

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0103h: Write Firmware Block LPL

class CMD0103hWriteFirmwareBlockLPLReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0103h Write Firmware Block LPL

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

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 (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0104h: Write Firmware Block EPL

class CMD0104hWriteFirmwareBlockEPLReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0104h Write Firmware Block EPL

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

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 (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0105h: Read Firmware Block LPL

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.

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

image_data

hex string, Up to 116 bytes.

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 (Z800FreyaPort) – 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

CMD 0106h: Read Firmware Block EPL

class CMD0106hReadFirmwareBlockEPLReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0106h Read Firmware Block EPL

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

image_data

Up to 2048 Bytes. Actual Length specified in RPLLength

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 (Z800FreyaPort) – 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

CMD 0107h: Complete Firmware Download

class CMD0107hCompleteFirmwareDownloadReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0107h Complete Firmware Download

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

async cmd_0107h_complete_firmware_download_cmd(port, cdb_instance)[source]

Send CMD 0107h Complete Firmware Download

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0108h: Copy Firmware Image

class CMD0108hCopyFirmwareImageReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0108h Copy Firmware Image

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

copy_direction

hex string, copy direction.

  • 0xAB, Copy Image A into Image B

  • 0xBA,Copy Image B into Image A

copy_status

hex string, copy status.

  • 0x00, Copy Successful

  • 0x01, Copy Failed

length

integer, number of bytes copied.

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

Send CMD 0108h Copy Firmware Image

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 0109h: Run Firmware Image

class CMD0109hRunFirmwareImageReply[source]

Bases: CMDBaseReply

REPLY message of CMD 0109h Run Firmware Image

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

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 (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 010Ah: Commit Firmware Image

class CMD010AhCommitFirmwareImageReply[source]

Bases: CMDBaseReply

REPLY message of CMD 010Ah Commit Firmware Image

cdb_cmd_complete_flag

Latched Flag to indicate completion of a CDB command for CDB instance.

Set by module when the CDB command is complete.

cdb_status

hex string, provides the status of the most recently triggered CDB command.

In Progress

  • 10 000001b: Busy processing command, CMD captured

  • 10 000010b: Busy processing command, CMD checking

  • 10 000011b: Busy processing command, CMD execution

On Success

  • 00 000001b: Success

On Failure

  • 01 000000b: Failed, no specific failure

  • 01 000010b: Parameter range error or not supported

  • 01 000101b: CdbChkCode error

async cmd_010ah_commit_firmware_image_cmd(port, cdb_instance)[source]

Send CMD 010Ah Commit Firmware Image

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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

CMD 8000h-FFFFh: Custom Command

class CustomCMDReply[source]

Bases: CMDBaseReply

Defines the custom reply to receiver for the CDB instance.

cdb_cmd_complete_flag

hex string, REPLY Status.CdbCmdCompleteFlag.

Indicates whether the CDB command is complete.

cdb_io_status

integer, REPLY Status.CdbIOStatus

Provides the status of the CDB IO operation.

  • 0 = IDLE

  • 1 = FINISHED

  • 2 = TIMEOUT

  • 3 = PENDING

cdb_status

hex string, REPLY Status.CdbStatus.

Provides the status of the most recently triggered CDB command.

data

hex string, REPLY Data.Data

The actual data to be sent in the reply.

rpl_check_code

integer, REPLY Header.RPLChkCode.

Check code for the reply data.

rpl_length

integer, REPLY Header.RPLLength.

Length of the reply data.

async cmd_custom_cmd_reply(port, cdb_instance)[source]

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

Parameters:
  • port (Z800FreyaPort) – 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 (Z800FreyaPort) – 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.

CMIS Firmware Download Procedure using CDB

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 (Z800FreyaPort) – 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.