Skip to article

Device control protocol


SFPTotal device control protocol commands are supported by Mini, Plus, Plus New and Plus X series coding boards.

This command list applies to devices with embedded firmware SW 1.3.5 or later.

Reading transceiver memory

The read command accesses devices on the data bus using 8-bit address and offset parameters and reads data from pages of up to 256 bytes.

R1A000807F

The read command consists of the following parameters:

R + 1 + A0 + 00 + 80 + 7F

Command code

A read command starts with the command code character R (short for Read).

The case of the command code determines the output format of the read result.

  • R uppercase — return data as a HEX string;
  • r lowercase — return data as a HEX table.

Port number

The numeric identifier of the port on the coding board.

  1. GBIC
  2. SFP
  3. SFP+
  4. XFP
  5. QSFP

If CMODPRST=01 is enabled, the coding board checks that a transceiver is connected to the specified port before reading. Disable this setting to ignore port numbers.

Page address

The slave device page address on the data bus, written in uppercase HEX format. For example: A0 or A2.

See Transceiver memory structure for more information about supported transceiver memory page addresses.

Additional page number

The additional page number in HEX format for transceivers with a dynamic address space.

Example values: 00, 01, 02, 03.

If AWRADTBL=01 is enabled, the coding board writes the additional page number to Page Select byte when accessing the upper memory of XFP and QSFP modules. This selects which additional table the transceiver exposes in A0h at offset 80h:

T00 or T01 or T02 or T03.

To ignore the additional page number parameter, set AWRADTBL=00.

Offset

The offset at which data is read or written.

For example:

  • 00 lower memory area, starting at byte 0
  • 80 upper memory area, starting at byte 128
  • 5F read starting at byte 95

Read/write byte count

The number of bytes to read from or write to transceiver memory. Specify the parameter in uppercase HEX format. Because of the register representation, the read byte count must be reduced by one.

  • 00 read/write 1 byte
  • 7F read/write 128 bytes
  • 03 read/write 4 bytes

Entering and executing a command

To execute the command, terminate it with a carriage return character \x0D.

Formatted output of the read area:

r1A000007F

##    00  01  02  03  04  05  06  07  08  09  0A  0B  0C  0D  0E  0F

00 :  03  04  07  00  00  00  01  20  40  0C  15  01  2A  00  00  00
01 :  0F  07  00  00  46  49  4E  49  53  41  52  20  43  4F  52  50
02 :  32  33  34  20  00  00  90  65  46  54  4C  46  38  35  32  34
03 :  50  32  42  4E  56  20  20  20  41  20  20  20  03  52  00  9C
04 :  00  32  00  00  50  42  39  31  59  5A  57  20  20  20  20  20
05 :  20  20  20  20  30  37  30  32  32  37  20  20  68  D8  01  0B
06 :  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
07 :  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00

Standard read command execution.

R1A000007F
0304070000000120400C15012A0000000F07000046494E4953415220434F5250323334200000906546544C46383532345032424E56202020412020200352009C0032000050423931595A57202020202020202020303730323237202068D8010B0000000000000000000000000000000000000000000000000000000000000000

Reading 128 bytes from page T03h of a QSFP28 transceiver in address space A0h at offset 80h.

R4A003807F
11CC07800000000000000003FF00020000000040484953494C49434F4E20202020202020000000004F4D333535394358313030202020202030316658051446E60607FFDE30333448545831304D3930303333383832313039333032300C1067A60000000000000000000000000000000000000000000000000000000000000000

The command result ends with line feed and carriage return characters.


Writing transceiver memory

The write command accesses devices on the data bus using 8-bit address and offset parameters and writes data to a page of up to 256 bytes.

W4A002800F11223344556677889900AABBCCDDEEFF

The write command consists of the following parameters:

W + 4 + A0 + 02 + 80 + 0F + 11223344556677889900AABBCCDDEEFF

Command code

A write command starts with the command code character W (short for Write).

The case of the command code determines whether a result is returned after writing.

  • W uppercase — perform a verification read after writing and return the result;
  • w lowercase — write only, without a verification read.

To confirm writing, compare the data sent in the write command with the data returned by the coding board after the command finishes.

Port number

The numeric identifier of the port on the coding board.

  1. GBIC
  2. SFP
  3. SFP+
  4. XFP
  5. QSFP

If CMODPRST=01 is enabled, the coding board checks that a transceiver is connected to the specified port before writing. Disable this setting to ignore port numbers.

Page address

The slave device page address on the data bus, written in uppercase HEX format. For example: A0 or A2.

See Transceiver memory structure for more information about supported transceiver memory page addresses.

Additional page number

The additional page number in HEX format for transceivers with a dynamic address space.

Example values: 00, 01, 02, 03.

If AWRADTBL=01 is enabled, the coding board writes the additional page number to Page Select byte when accessing the upper memory of XFP and QSFP modules. This selects which additional table the transceiver exposes in A0h at offset 80h:

T00 or T01 or T02 or T03.

To ignore the additional page number parameter, set AWRADTBL=00.

Offset

The offset at which data is read or written.

For example:

  • 00 lower memory area, starting at byte 0
  • 80 upper memory area, starting at byte 128
  • 5F read starting at byte 95

Write/read byte count

The number of bytes to write to transceiver memory. Specify the parameter in uppercase HEX format. Because of the register representation, the write byte count must be reduced by one.

  • 00 read/write 1 byte
  • 7F read/write 128 bytes
  • 03 read/write 4 bytes

Data

Append the write data at the end of the command as an uppercase HEX string without spaces or line breaks.

11223344556677889900AABBCCDDEEFF

The length of the write data must match the write byte count specified in the command parameters.

Entering and executing a command

To execute the command, terminate it with a carriage return character \x0D.


Configuration commands

CLI

Enable or disable character echo in the terminal window while typing. Disabled by default. The setting returns to its default after a power cycle.

Query the current state

? CLI
CLI=0

Enable

CLI=1

Disable

CLI=0


VERSION

Request device version information.

SFPTotal Plus New (c) 2023
HW: 1.3
SW: 1.3.7
SN: SFPT-P1323122800
ACTIVE

CMODPRST

Check that a transceiver is connected to the port before reading or writing.

Query the current setting:

? CMODPRST
CMODPRST=01

Enable transceiver connection detection:

CMODPRST=01

Disable transceiver connection detection:

CMODPRST=00

When this setting is enabled, the coding board returns an error if more than one transceiver is connected to its ports:

QERR: MTDOC

If no transceiver is connected to the port during a read or write operation, the coding board returns the corresponding error code:

QERR: SFP_EMPTY

AWRADTBL

Enable automatic writing of the additional page number to the Page Select byte register when accessing the T00h, T01h, T02h and T03h page address spaces.

Query the current setting:

? AWRADTBL
AWRADTBL=01

Enable additional page number writing:

AWRADTBL=01

Disable additional page number writing:

AWRADTBL=00


STATUS

Coding board port input and output states.

STATUS
GBIC : 1; 0; 0; 1;
SFP  : 1; 1; 1; 1;
XFP  : 1; 1; 1; 1; 1;
QSFP : 1; 1; 1; 1;

Parameter value positions correspond to the following map:

GBIC  : MOD_ABS; TX_FAULT; RX_LOS; TX_DIS;
SFP   : MOD_ABS; TX_FAULT; RX_LOS; TX_DIS;
XFP   : MOD_ABS; RX_LOS; INTERRUPT; MOD_SEL; P_DOWN/RESET;
QSFP  : MOD_ABS; INTL; MOD_SEL; RESETL;


TX_DIS

Control the TX_DIS line, which enables low power mode. Enabled by default.

Turn the laser on and disable Low power mode

TX_DIS=0

Turn the laser off and enable Low power mode

TX_DIS=1

The coding board may have a jumper for hardware control of Low power mode. A closed jumper takes precedence.


I2CRATE

Set the coding board's data bus clock frequency in master.

The parameter is represented by a hexadecimal register.

I2CRATE=12 # Clock frequency 100 kHz
I2CRATE=40 # Clock frequency 30 kHz
I2CRATE=C6 # Clock frequency 10 kHz

To query the current speed setting, use ? I2CRATE

? I2CRATE
I2CRATE=C6

Accepts values from 01h to FFh.

The clock frequency is calculated using the formula:

16 000 000 / (2 * I2CRATE * I2CPRESC + 16) = Speed Rate Hz


I2CPRESC

The prescaler for the coding board's data bus clock frequency in master.

The parameter is represented by a hexadecimal register. Default value: 04h

I2CPRESC=04

To query the current speed setting, use ? I2CPRESC

? I2CPRESC
I2CPRESC=04

Accepts the values 00h, 04h, 10h, 40h.

I2CPAUSE

Delay before outputting bus read results, in milliseconds. Default value: 64h or 100ms

? I2CPAUSE
I2CPAUSE=64

I2CPAUSE=32
I2CPAUSE=32

I2CDELAY

Set the delay before issuing ReSTART, in 0.1 ms increments.

Default value: 0Ah

? I2CPAUSE
I2CPAUSE=0A

I2CPAUSE=64
I2CPAUSE=64

I2CRESET

Reset the data bus in software. Restart the interface and generate 9 clock pulses on the data bus SCL line to recover slave devices that may be locked up.

Reset the data bus:

I2CRESET

Enable the trigger. The data bus is reset automatically when a transceiver is connected to a port.

I2CRESET=01

Disable the trigger.

I2CRESET=00

I2CSTATE

Return the data bus line states.

I2CSTATE
SCL=01  SDA=02

USBDELAY

Delay before sending a data byte from the device to the computer through the virtual serial port.

? USBDELAY
USBDELAY=0A

USBDELAY=10
USBDELAY=10


Power control

Supported only on coding boards with software power control.

PWRRST

Power cycle the transceiver ports.

PWRRST

I2CPAUSE affects the bus reset interval in 10 ms increments.

PWRCTRL

Control port power.

Turn power off.

PWRCTRL=0

Turn power on.

PWRCTRL=1

A power state change should be accompanied by the corresponding LED indication.


Hardware password search

The coding board supports hardware password searches in the range from 00000000 to FFFFFFFF

The search runs in a loop, incrementing the password by one. On every iteration, the coding board enters the password and writes the check word SFPTOTAL which is 8 bytes long. It then reads back the check word. The search succeeds when the coding board can read the check word from transceiver memory.

BFCWADR

The page address where the check word is written.

BFCWOFT

The offset for writing the check word.

BFSET

Start a hardware password search. The command has the following parameters:

  • Password entry page
  • Password entry offset
  • Start of the value range
  • End of the range
  • Starting position

The command starts a search, entering passwords on page A2h at offset 7Bh in the range from 41414141h to 5A5A5A5Ah starting at 45454545h.

BFSET A2 7B 41414141 5A5A5A5A 45454545

Device=A2
Offset=7B
From    41 41 41 41
To      5A 5A 5A 5A
Start   45 45 45 45

45 45 45 46

BFSTOP

Stop the password search.

BFSTOP

STOP
Device=A2
Offset=7B
From    41 41 41 41
To      5A 5A 5A 5A
Current 45 45 47 5A

BFSTART

Resume the password search from where it stopped.

BFPASS

The ? BFPASS command returns the current value.

? BFPASS
45 45 47 5A
Updated: