Get encryption counter command – MagTek Bluetooth MagneSafe V5 Swipe Reader User Manual
Page 55
![background image](/manuals/413691/55/background.png)
Section 5. Communications
47
Data structure:
Request Data:
Offset
Field Name
Description
0
Security Level
Optional, if present must be either 0x03 or 0x04. If
absent this is a query for the current Security Level.
If this field is absent, the MAC field should NOT be
sent.
1
MAC
Four byte MAC (See Section 4) to secure the
command.
Response Data: None
Offset
Field Name
Description
0
Security Level
Only present if there was no request data. This field
gives the current Security Level.
Result codes:
0x00 (Success)
0x02 (Bad Parameters – the Request Data is not a correct length OR the
specified Security Level is invalid, OR the current Security Level is 0, 1,
or 4)
0x07 (Incorrect MAC – command not authorized)
Example Set Security Level to 3 Request (Hex):
Cmd Num
Data Len
Data
15
05
03 xx xx xx xx
Where “xx xx xx xx” is the valid MAC (Message Authentication Code).
Example Set Security Level Response (Hex):
Result Code Data Len
Data
00
00
Example Set Security Level Request (Retrieving the Security Level) (Hex):
Cmd Num
Data Len
Data
15
00
Example Set Security Level Response (Hex):
Result Code Data Len
Data
00
01
03
GET ENCRYPTION COUNTER COMMAND
Command number:
0x1C
Description:
This command is used to Get the Encryption Counter. The Encryption
Counter gives the maximum number of transactions that can be performed
by the reader. A transaction is either an encrypted card swipe or a
correctly completed Activation Sequence (Activate Authenticated Mode
followed by correct Activation Challenge Reply)
The Encryption Counter has three possible states:
1. Disabled – value 0xFFFFFF – In this state there is no limit to the number of
transactions that can be performed.