GenDig - Counter

In the Counter mode of the GenDig command, the binary value of the counter is included in the TempKey calculation. The Nonce command must be run prior to the first GenDig command to load a value into TempKey. Subsequent GenDig commands will use the value from the previous GenDig operation.

Table 1. Input Parameters - GenDig Counter

Opcode
(1 Byte)

Mode
(1 Byte)

KeyID
(2 Bytes)

Data
(0 Bytes)

Description
0x15 0x04 0x00 00 Include Counter[0] value
0x00 01 Include Counter[1] value
Note:
  1. 1.KeyId specifies the monotonic counter value to be used in the TempKey calculation.
Table 2. Output Response - GenDig Counter
Name Size Description
Response 1 byte

0x00 - If successful.

Error code - If the command fails.

Notes: Flag Bits
  1. 1.TempKey.Valid flag will be set to 1 if successful, otherwise it is 0.
  2. 2.TempKey.GenDigData will be set to 0.
Table 3. TempKey Calculation - GenDig Counter
 

32 bytes
1 byte
1 byte
2 bytes
1 byte
2 bytes
1 byte
4 bytes
20 bytes
32 bytes

All Zeros
Opcode = 0x15
Mode = 0x04
KeyID[0:1] = 0x0[Counter#] 0x00
SN[8] = 0x01
SN[0:1] = 0x01 0x23
Zero
Counter[KEYID] - Binary value as reported by the Counter command
All Zeros
TempKey.Value