D-2 device ack packet, D-2.1 ack type a – Avlink HRM-602P User Manual

Page 52

Advertising
background image

H

H

H

R

R

R

M

M

M

-

-

-

6

6

6

0

0

0

2

2

2

P

P

P

51

CRC Calculation

CRC 0 = 0 (initial value)

CRC 1 = CRC_ TABLE [CRC 0 ^ Byte 1] = CRC_ TABLE [0x00 ^ 0x20] = 0x23

CRC 2 = CRC_ TABLE [CRC 1 ^ Byte 2] = CRC_ TABLE [0x23 ^ 0x01] = 0x9F

CRC 3 = CRC_ TABLE [CRC 2 ^ Byte 3] = CRC_ TABLE [0x9F ^ 0x06] = 0x8D

CRC 4 = CRC_ TABLE [CRC 3 ^ Byte 4] = CRC_ TABLE [0x8D ^ 0x03] = 0x93

D-2 Device ACK Packet

When the device receives supported commands comes from the host, and then will

response with following ACK:

Table – ACK Type List

Ack Type

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

… Last Byte

Type A

AB

CB

Type B

AB

LB

Index 1 Value 1 Index 2 Value 2

CB

Type C

AB

LB

Data 1

Data 2

CB

Type D

AB

LB

INF

OP

IP

Name 1

CB

Type E

AB

LB

EXINF

VEINF

AEINF

PLUG

CB

D-2.1 ACK Type A

ACK Byte + CRC Byte (Total 2 Bytes)

Name

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

AB

ACC

0

0

Device ID (0 – 31)

CB

CRC

ACC: The devices acknowledge status. Accept or Reject.

1: device accepts this request. (ACK; acknowledge)

0: device rejects this request. (NAK; negative acknowledge)

The device sends the Nak packet is always 2 bytes. (NAK + CRC)

0: Reserve, Always 0.

1: Identifier, Always 1.

Device ID: Device id ranges from 0 to 31. (Please refer to device’s user manual)

CRC: Device always sends the CRC code to follow the last byte.

Advertising