Identify the type of frame from control byte.

Control byte formats +---------+----+----+----+----+----+----+----+----++---------+ | | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 || Range | +---------+----+----+----+----+----+----+----+----++---------+ | DATA | 0 | frameNum | rF | ackNum ||0x00-0x7F| +---------+----+----+----+----+----+----+----+----++---------+ | ACK | 1 | 0 | 0 | pF | nF | ackNum ||0x80-0x9F| | NAK | 1 | 0 | 1 | pF | nF | ackNum ||0xA0-0xBF| +---------+----+----+----+----+----+----+----+----++---------+ | RST | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 || 0xC0 | | RSTACK | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 || 0xC1 | | ERROR | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 || 0xC2 | +---------+----+----+----+----+----+----+----+----++---------+ rF = rFlag (retransmission flag) nF = nFlag (receiver not ready flag, always 0 in frames sent by the NCP) pF = flag reserved for future use frameNum = DATA frame’s 3-bit sequence number ackNum = acknowledges receipt of DATA frames up to, but not including, ackNum Control byte values 0xC3-0xFE are unused, 0xFF is reserved.

Enumeration Members

Enumeration Members

ACK

Acknowledges receipt of a valid DATA frame.

[CONTROL, CRC high, CRC low, FLAG]

Notation used in documentation: ACK(A)+/-

  • A: acknowledge number (ackNum)
  • +/-: not ready flag (nRdy); “+” = “0” = “ready”; “-” = “1” = “not ready”

Examples:

  • ACK(1)+ :81 60 59 7E
  • ACK(6)– : 8E 91 B6 7E

Sent by: NCP, Host

DATA

Carries all EZSP frames.

[CONTROL, EZSP 0, EZSP 1, EZSP 2, EZSP n, CRC high, CRC low, FLAG]

Notation used in documentation: DATA(F, A, R)

  • F: frame number (frmNum)
  • A: acknowledge number (ackNum)
  • R: retransmit flag (reTx)

Example without pseudo-random sequence applied to Data Field:

  • EZSP “version” command: 00 00 00 02
  • DATA(2, 5, 0) = 25 00 00 00 02 1A AD 7E
  • EZSP “version” response: 00 80 00 02 02 11 30
  • DATA(5, 3, 0) = 53 00 80 00 02 02 11 30 63 16 7E

Example with pseudo-random sequence applied to Data Field:

  • EZSP “version” command: 00 00 00 02
  • DATA(2, 5, 0) = 25 42 21 A8 56 A6 09 7E
  • EZSP “version” response: 00 80 00 02 02 11 30
  • DATA(5, 3, 0) = 53 42 A1 A8 56 28 04 82 96 23 7E

Sent by: NCP, Host

ERROR

Informs the Host that the NCP detected a fatal error and is in the FAILED state.

[CONTROL, version, error code, CRC high, CRC low, FLAG]

Notation used in documentation: ERROR(V, C )

  • V: version
  • C: reset code

Example: C2 01 52 FA BD 7E

Sent by: NCP

INVALID
NAK

Indicates receipt of a DATA frame with an error or that was discarded due to lack of memory.

[CONTROL, CRC high, CRC low, FLAG]

Notation used in documentation: NAK(A)+/-

  • A: acknowledge number (ackNum)
  • +/-: not ready flag (nRdy); “+” = “0” = “ready”; “-” = “1” = “not ready”

Examples:

  • NAK(6)+ : A6 34 DC 7E
  • NAK(5)- : AD 85 B7 7E

Sent by: NCP, Host

RST

Requests the NCP to perform a software reset (valid even if the NCP is in the FAILED state).

[CONTROL, CRC high, CRC low, FLAG]

Notation used in documentation: RST()

Example: C0 38 BC 7E

Sent by: Host

RSTACK

Informs the Host that the NCP has reset and the reason for the reset.

[CONTROL, version, reset code, CRC high, CRC low, FLAG]

Notation used in documentation: RSTACK(V, C)

  • V: version
  • C: reset code

Example: C1 02 02 9B 7B 7E

Sent by: NCP