Block Transfer Protocol

Block Transfer Protocol and Block Recovery Protocol (BRP)

Each block being transmitted between GSL devices is sent in a packet consisting of an identifying header and checksum tail. The header consists of four bytes containing the following information:

1 ID character Must be a ‘G’. Identifies start of block.
1 Block Number Increments for each block, modulo 256 (i.e. 255 + 1 = 0)
2 Block Size Number of bytes in block body

The number of bytes specified in "Block Size" is then sent, followed by a two byte checksum. This value is the sum of all bytes in the block header and body, modulo 65536.

After transmission of the block is complete, the transmitter waits a nominal 150 mSec (settable) for either a Nack or Ack signal before commencing with transmission of the next block.

If Ack is received, this timeout is terminated, and transmission of the next block commences immediately. If Nack is received, the block is re-transmitted.

The receiver should read the block, calculate a checksum, and compare that with the value received. If the two values match, the receiver should send an Ack signal, otherwise a Nack.

Ack and Nack signals can be in two formats: Older 2 byte and new 6 byte. The 6 byte protocol is backward compatible with the 2 byte version (receiving instruments ignore the other 4 bytes).

When both the transmitter and receiver use the 6 byte version, the link is said to be operating BRP, which allows recovery of lost data (up to 255 blocks) as well as error correction on a per-block basis.

The Ack/Nack message is:

byte 1 2 3 4 5 6
Ack LSB ^S / 0 NSB NSB MSB
Nack LSB BLK NSB NSB MSB

In the 2-byte protocol, only the first two bytes are used.

LSB, the NSBs and MSB make up the 4 bytes of the stream ID of the last received block.

For a ‘Nack’ message, the third byte (BLK) specifies which block number to rewind to.

For an ‘Ack’ Message, the third byte is either unused (0), or code 19 (Ctrl-S) - switch to command mode.

“Ack” = 1, “Nack” = 2.

See Also :

GCF Block Specification