Professional Documents
Culture Documents
MIFARE GLOBAL ®
OSDP UHF
READER
Communication Protocol
SLA-Wx3-A-U04-7OS (x = 4/5)
All rights reserved- This document is the exclusive property of STid. No unauthorised reproduction or disclosure of any part of this
document in any form or by any means. STid reserves the right to amend this document without prior notice, with the aim of improving
the product.
I. INTRODUCTION ................................................................................................................................... 4
II. MESSAGE STRUCTURE ..................................................................................................................... 5
II.1 Packet Format ............................................................................................................................ 5
II.2 CTRL details .............................................................................................................................. 6
II.3 SQN Values: .............................................................................................................................. 6
II.4 CKSUM ...................................................................................................................................... 6
II.5 CRC ........................................................................................................................................... 7
II.6 Security Block: ........................................................................................................................... 9
III. READER COMMUNICATION SETTINGS ......................................................................................... 10
III.1 Serial Interface ........................................................................................................................ 10
III.2 Change address and Baudrate readers .................................................................................. 10
III.2.1. [COMMAND]: osdp_COMSET – 6Eh .......................................................................... 11
III.2.2. [REPLY]: osdp_COM – 54h ........................................................................................ 11
III.3 Command frames examples ................................................................................................... 12
IV. CONNECTION .................................................................................................................................... 13
IV.1- Wiring reader to Control Panel .............................................................................................. 13
IV.2- Bus RS485 ............................................................................................................................ 13
V. COMMUNICATION MODE ................................................................................................................. 14
V.1 Secure chanel session connection sequence (SCS-CS) ........................................................ 14
V.2 Secure chanel session connection: commands and replies ................................................... 15
V.2.1. [COMMAND]: osdp_CHLNG – 76h ............................................................................. 15
V.2.2. [REPLY]: osdp_CCRYPT – 76h .................................................................................. 15
V.2.3. [COMMAND]: osdp_SCRYPT – 77h ........................................................................... 16
V.2.4. [REPLY]: osdp_RMAC-I – 78h .................................................................................... 16
V.2.5. Example: ...................................................................................................................... 17
V.3 Secure chanel: change the secure communication key SCBK ............................................... 18
V.3.1. [COMMAND]: osdp_KEYSET – 75h ............................................................................ 18
V.3.2. [REPLY]: osdp_ACK – 40h .......................................................................................... 18
V.3.3. Exemple: ...................................................................................................................... 19
VI. READER SETTINGS .......................................................................................................................... 20
VII. IMPLEMENTED OSDP COMMANDS AND REPLIES ....................................................................... 21
VII.1 osdp_ID - Identification Device ............................................................................................. 22
VII.1.1. [COMMAND]: osdp_ID – 61h..................................................................................... 22
VII.1.2. [REPLY]: osdp_PDID – 45h ....................................................................................... 22
VII.2 osdp_CAP - Capabilities ........................................................................................................ 24
VII.2.1. [COMMAND]: osdp_CAP – 62h ................................................................................. 24
VII.2.2. [REPLY]: osdp_PDCAP – 46h ................................................................................... 24
VII.2.3. Function code list ....................................................................................................... 25
VII.2.3. Example: SMA + 4 LANES ........................................................................................ 27
VII.3 osdp_LSTAT - Local status report ........................................................................................ 28
VII.3.1. [COMMAND]: osdp_LSTAT – 64h ............................................................................. 28
VII.3.2. [REPLY]: osdp_LSTATR – 48h ................................................................................. 28
VII.3.3. Example ..................................................................................................................... 28
VII.4 osdp_OUT - Output Control ................................................................................................... 29
VII.4.1. [COMMAND]: osdp_OUT – 68h ................................................................................ 29
VII.4.2. [REPLY]: osdp_ACK – 40h ........................................................................................ 29
VII.4.3 [REPLY]: osdp_NAK – 41h ......................................................................................... 29
VII.4.4. [REPLY]: osdp_NAK – 41h Multirecord reply ............................................................ 30
VII.4.5. Example: .................................................................................................................... 30
VII.5 osdp_LED - LED .................................................................................................................... 31
VII.5.1. [COMMAND]: osdp_LED – 69h ................................................................................. 31
VII.5.2. [REPLY]: osdp_ACK – 40h ........................................................................................ 33
VII.5.3 [REPLY]: osdp_NAK – 41h ......................................................................................... 33
VII.5.4. [REPLY]: osdp_NAK – 41h Multirecord reply ............................................................ 33
VII.5.4. Example: .................................................................................................................... 34
VII.6 osdp_ISTAT - Input status report .......................................................................................... 36
VII.6.1. [COMMAND]: osdp_ISTAT – 65h .............................................................................. 36
VII.6.2. [REPLY]: osdp_ISTATR – 49h .................................................................................. 36
VII.6.3. Example: .................................................................................................................... 36
I. Introduction
This document describes the communication protocol for interfacing one or more UHF STid OSDP compatible Reader(s)
to a Control Panel (CP).
The communication channel is used in the “command/reply” mode (master/slave mode). Only the CP may spontaneously
send a message. The communication can be done in plain or encrypted (secure chanel).
This document specifies the protocol implementation over a two-wire RS-485 multi-drop serial communication channel.
Most of the parameters (e.g.: led color, baudrate, reader address ...) are transmitted via OSDP frames.
The following parameters are configured with OCB UHF badges or serial configuration:
- Installation configuration parameters (lane / antenna number, LED color on detection user ID, baudrate…)
- User Card information: data size, encryption of EPC, encryption key.
The 7OS protocol is developed according to the Open Supervised Device Protocol (OSDP v2.1.7).
https://www.securityindustry.org/industry-standards/open-supervised-device-protocol/
The transmitting device shall drive the line to a marking state for a minimum of 1
Character time character time before starting to send the first character of a message. (This can be
achieved by sending a character with all bits set to '1'.). Constant value FFh
SOM Start Of Message. Constant value 53h.
Defines the RS485 reader address. 00h – 7Eh.
ADDR - 7Fh : Broadcast address.
- The reader replies with the same address but bit 7 is forced to 1.
Total number of bytes contained in the message, including the SOM through the CKSUM or
LEN
CRC characters.
b7 b6 b5 b4 b3 b2 b1 b0
CTRL RFU
0: no SCB 0: CKSUM
SQN: 0->1->2->3->1->…
1: SCB 1: CRC
The purpose and meaning of each message packet are defined by its command or reply code.
MAC[0]
MAC[1]
Present for secured messages, dependent on SEC_BLK_TYPE .
MAC[2]
MAC[3]
OSDP supports two different forms of error detection.
CKSUM/CRC
CRC on 2-byte or CKSUM on 1-byte.
Non-zero sequence numbers support error recovery: The Control Panel acknowledges the last reply by sending the next
command with the incremented sequence number, or it repeats the command without changing the sequence number to
request the repeat of the last reply.
This method allows the receiver to properly handle the command: process the command if it did not receive it correctly
last time (error occurred on the command), or to simply repeat the reply it already made without executing the command
again (error occurred in the reply).
SQN zero should be used only for communication startup, at boot time or after a communications loss. Zero forces the
reader to discard its last reply and to accept and process the current command.
II.4 CKSUM
This setting defines the message check character(s) method used to provide error detection.
The CKSUM value is the 8 least significant bits of the 2’s complement value of the sum of all previous characters of the
message.
Note: This mode is supported in order to allow for devices with limited resources, but new devices should use the CRC
method.
http://easyonlineconverter.com/converters/checksum_converter.html
FF 53 00 0C 00 00 6E 01 80 25 00 00
• FF + 53 + 00 + 0C + 00 + 00 + 6E + 01 + 80 + 25 + 00 + 00 = 272
• 8 least significant bits 72 (0111 0010)
• Complement value is 1000 1101 ➔8D
Checksum = 8D
FF 53 7F 0C 00 00 6E 00 80 25 00 00
• FF +53 + 7F + 0C + 00+ 00 + 6E + 00 + 80 + 25 + 00 + 00 = 02 F0
• 8 least significant bits F0 (1111 0000)
• Complement value is 0000 1111 ➔ 0F
Checksum = 0F
II.5 CRC
There are several well-documented algorithms in the public domain. The implementation selected for this protocol is
commonly referred to as CRC16-CCITT. It is bases on the polynomial of X**16 + X**12 + X**5 + X**0, or more commonly
represented as 0x1021.
A straightforward shift–and–xor algorithm for computing the CRC requires an initial value of the CRC register to be all
ones. The data bytes are passed through the CRC register most significant bit first. The message is always augmented
with 16 zero bits.
This CRC algorithm is thoroughly addressed in the public domain. The following references provide a source for
additional information:
http://en.wikipedia.org/wiki/Cyclic_redundancy_check
This site gives good explanations, as well as several test strings with expected results for verification of specific
implantations.
The following link is an excellent source for theoretical and practical discussion about CRC calculation methods. An
especially valuable section deals with table driven implementations.
https://www.lammertbies.nl/comm/info/crc-calculation.html
if ( nCrcTblValid == 0)
{
nCrcTblValid = fCrcTblInit(&cCrcTable[0]);
}
for ( ii = 0, nCrc = 0x1D0F; ii < nLength; ii++ )
{
nCrc = (nCrc<<8) ^ cCrcTable[ ((nCrc>>8) ^ pData[ii]) & 0xFF];
}
return nCrc;
}
The Security Block (SB) is optional. Its presence is indicated by setting the CTRL::SCB flag.
The purpose of the SB is to facilitate the implementation of data security within the OSDP framework. By itself, the SB
does not define or specify the nature of the security methods used. Rather, the SB is available to support the use of
various security methods as OSDP device capabilities and client security requirements change.
SEC_BLOCK_LEN
This field is set to the total byte count of the SB, including itself.
SEC_BLK_TYPE
This field defines the manner in which the security block applies to the rest of message (the optional
sec_blk_data[] array , the command/reply, the optional data[] array, MAC[] array, and the message check
characters).
SEC_BLK_DATA
This section is an array whose size is (sec_blk_length-2). The data content is separately defined for each
SEC_BLK_TYPE.
A reader that receives an SB, but does not support the processing of the SB should return an osdp_NAK
response, error code set to 05h.
A reader whose settings require an encrypted connection, and receives a command without the appropriate data
security extension must return an osdp_NAK response, error code set to 06h.
Number of bits 8
Stop bit 1
Broadcast address 7Fh.
RS485
Factory address 00h.
Note: the baudrate can be set with osdp command and with configuration (ULTRYSv2).
Steps:
1- Connect the reader to the computer with the converter cable.
2- Launch an hyperteminal software.
3- Use the following communication settings: 9600 bauds – 8 bits – Stop bit 1 – Parity none.
4- Send the [COMMAND]: osdp_COMSET – 6Eh command with the correct parameters.
CKSUM
SOM ADDR LEN CTRL CMD DATA / CRC
Physical
Reader 0Ch 00h: CKSUM XXh
53h XXh 6Eh osdp_COMSET NewAddress Baudrate
Address 0Dh 00h: CRC / XXh XXh
00h i.e. 7Eh
CRC
SOM ADDR LEN CTRL REPLY DATA /
CKSUM
Physical
Reader 0Ch 00h: CKSUM XXh
53h XXh 54h osdp_COM Address Baudrate
Address 0Dh 00h:CRC / XXh XXh
80h i.e. FEh
In order to change the default/current reader address and baudrate, the osdp_COMSET command can be used as
following:
Other examples:
Reader’s Settings Commands Reply
Address 0 – 115200
FF 53 00 0C 00 00 6E 00 00 C2 01 00 70 FF 53 80 0C 00 00 54 00 00 C2 01 00 0A
bauds
IV. Connection
Wiring resistors R1 and R2 use the extended features of the RS485 Bus: FAIL-SAFE (see RS485-AN-960).
The R1 and R2 resistors are already wired on the reader then there is no need to wire them on the CP.
We recommend to switch the jumper R_End resistor if there is a long cable length and/or if the used baudrate is high.
V. Communication mode
Specific commands are used to establish a secure session between the CP and the reader.
Those specific commands use the Secure Channel Base Key (SCBK).
The SCBK is only used by those commands.
This authentication step also makes it possible to exchange session keys in complete security.
As soon as the SCBK value is changed (by using the osdp_KEYSET command), the reader is locked in secure mode.
CP Reader
osdp_CHLG
Generates and sends RndA[8]
Generates:
SEC_BLK_TYPE: SCS_11 - RndB[8]
- sessions keys: S-ENC, S-MAC1 & S-MAC2
- Client Cryptogram
Sends: cUID || RndB || Client Cryptogram
osdp_CCRYPT
SEC_BLK_TYPE: SCS_12
Verifies the Client cryptogram
Derives Reader’s SCBK(D)
Computes session keys:
S-ENC, S-MAC1 & S-MAC2
osdp_SCRYPT
Generates and sends server cryptogram Verifies the server cryptogram
SEC_BLK_TYPE: SCS_13
osdp_RMAC_I
If server cryptogram was accepted:
SEC_BLK_TYPE: SCS_14 Generates and sends the initial MAC
Note: successful completion of the first four steps confirms that the SCBK is valid, and that both sides have the full
complement of the keys derived for this session: S-ENC, S-MAC1, and S-MAC2. Also, the R-MAC is the initial ICV
(Initial Chaining Vector) value that will be rolling throughout the session.
Client ID: Cuid, client’s unique identifier. This is an 8-byte number, unique for each reader.
8 bytes
ClientCryptogram: The Client Cryptogram is computed by encrypting the concatenated Rnd.A[8] and Rnd.B[8]
16 bytes using key S-ENC.
Rnd.A[8] is generated by the CP (server) and Rnd.B[8] is generated by the reader (client).
ClientCryptogram = ENC( Rnd.A[8] || Rnd.B[8], S-ENC )
ServerCryptogram: The Server Cryptogram is computed by encrypting the concatenated Rnd.B[8] and
16 bytes Rnd.A[8] using the S-ENC key.
Rnd.A[8] is generated by the CP (server) and Rnd.B[8] is generated by the reader
(client).
ServerCryptogram = ENC( Rnd.B[8] || Rnd.A[8], S-ENC )
MAC-I: is the initial value for the rolling MAC that is used during the Secure Channel Session.
16 bytes It is computed by encrypting the Server Cryptogram received in osdp_SCRYPT using S-MAC1,
then encrypting the result using S-MAC2 encrypted using SMAC-2.
V.2.5. Example:
SCBK-D = 303132333435363738393A3B3C3D3E3F
CP Reader
osdp_CHLG
FF530013000D0311007640608AFC3368475481D3
osdp_CCRYPT
FF53802B000D03120076F51BC08000653119C2
7730D33E3CD7455322921B6ED14703CAF68060
90F59D235979
FF53001B000E0313007728E9B117C65E4C8E9F74 osdp_SCRYP
T
05BE88C48617991C
FF53801B000E03140178911F1141B9EA648B08
osdp_RMAC 2562875459B89F6D9E
_I
osdp_CHLG: osdp_CCRYPT:
53 SOM 53 SOM
00 Physical address reader 80 Physical address reader
1300 LEN 2B00 LEN
0D CTRL 0D CTRL
03 Security Block Length 03 Security Block Length
11 Security Block type 12 Security Block type
00 Security Block data 00 Security Block data
76 CMD 76 REPLY
40608AFC33684754 RndA F51BC08000653119 cUID
81D3 CRC C27730D33E3CD745 RndB
5322921B6ED14703CAF6806090F59D23 ClientCryptogram
5979 CRC
osdp_SCRYPT:
53 SOM
00 Physical address reader
1B00 LEN
0E CTRL
03 Security Block Length
13 Security Block type
00 Security Block data
77 CMD
28E9B117C65E4C8E9F7405BE88C48617 ServeurCryptogram
991C CRC
osdp_RMAC:
53 SOM
80 Physical address reader
1B00 LEN
0E CTRL
03 Security Block Length
14 Security Block type
01 Security Block data
78 CMD
911F1141B9EA648B082562875459B89F MAC-I
6D9E CRC
When in “secure session”, the SCBK value can be changed by using the osdp_KEYSET command .
The STid reader will then be locked in secure mode. Non-secure mode is not available any more.
After powering up the RFID reader, the CP must initiate a secure session (using the new SCBK value) so that the reader
can be controlled by the CP.
CRC
DATA MAC[0] MAC[1] MAC[2] MAC[3] /
CKSUM
XXh
Key_Type Length Key_data XXh XXh XXh XXh
/ XXh XXh
The DATA block of this command is padded and encrypted using S-ENC key.
Key_Type: This byte defines the Encryption method to use with this key.
1 byte 01h – Secure Channel Base Key.
V.3.3. Exemple:
osdp_KEYSET:
FF53002E000F02177598B4CB38A6CA1FE36613A36D2B262AEED33CD2AB8296556B5D5095561496284810A05992EC36
53 SOM
00 Physical address reader
2E 00 LEN
0F CTRL
02 Security Block Length
17 Secure Session msg. with MAC & Data Security CP to Reader
75 CMD
98B4CB38A6CA1FE36613A36D2B262AEED33CD2AB8296 Key type / length / Key data : 32 bytes data enciphered
556B5D50955614962848
osdp_ACK: FF53800E000F0216409B19E0E950B0
53 SOM
80 Physical address reader
0E00 LEN
0F CTRL
02 Security Block Length
16 Secure Session msg. w. MAC, no Data Security
40 REPLY
9B 19 E0 E9 MAC[0] MAC[1] MAC[2] MAC[3]
50B0 CRC
To set the number of lane / antenna, LED color on detection user ID, baudrate, the EPC size.. you need to create a
configuration with Ultrysv2 (v2.1.x minimum).
Available settings:
osdp_LSTAT 64h Local Status Report Request osdp_LSTATR 48h Local status report
osdp_ACK 40h
osdp_OUT 68h Output Control Command
osdp_NAK 41h
osdp_ACK 40h
osdp_LED 69h Reader LED Control Command
osdp_NAK 41h
odsp_ISTAT 65h Input Status Report Request osdp_ISTATR 49h Input Status Report
odsp_OSTAT 66h Output Status Report Request osdp_OSTATR 4Ah Output Status Report
CKSUM
SOM ADDR LEN CTRL CMD DATA
/ CRC
Physical
Reader 08h 00h: CKSUM XXh
53h XXh 61h: osdp_ID 00h: Send standard PD ID Block
Address 09h 00h: CRC / XXh XXh
00h i.e. 7Eh
Serial Number: 5-byte serial number (LSB xxh xxh xxh MSB).
5 bytes
Example:
This command requests the reader to return a list of its functional capabilities, such as the type and number of input
points, outputs points, reader ports, etc.
CKSUM
SOM ADDR LEN CTRL CMD DATA / CRC
Physical
Reader 08h 00h: CKSUM XXh
53h XXh 62h: osdp_CAP 00h: Send standard reply
Address 09h 00h: CRC / XXh XXh
00h i.e. 7Eh
.
VII.2.2. [REPLY]: osdp_PDCAP – 46h
CRC
SOM ADDR LEN CTRL REPLY DATA /
CKSUM
Physical
2Eh 00h: XXh
Reader
53h CKSUM XXh 46h: osdp_PDCAP Function code Compliance Number of / XXh
Address
2Fh 00h: CRC XXh
80h i.e. FEh
Compliance: Indicates the extent the reader supports the Function Code.
1 byte
Number of: If applicable, the field indicates that number of objects of this type that are available.
1 byte
The Device Capabilities report message may contain multiple records of this form (3 bytes per record). Use the total
message length to determine the number of records present.
04h 04h 01h The reader support on/off control only and tri-color LEDS.
08h 01h 00h The reader supports the 16-bit CRC-16 mode.
0Ch 00h 00h Reader does not support transparent reader mode.
0Dh 01h 01h One lane by default. The lane number depends on the customer configuration.
0Dh 02h 02h Two lanes configured
0Dh 03h 03h Three lanes configured
0Dh 04h 04h Four lanes configured
osdp_CAP: FF530009000462009333
53 SOM
00 Physical address reader
0900 LEN
04 CTRL
62 CMD
00 Data
9333 CRC
osdp_PDCAP: FF53802F0004460101040204040301000404010501000600000801000901010AFA000BFA000C00000D04040E00009347
53 SOM
80 Physical address reader
2F00 LEN
04 CTRL
46 REPLY
01 01 04 Function code 1: 4 inputs
02 04 04 Function code 2: 4 output (all settings available with osdp_OUT)
03 01 00 Function code 3: data to send 1024bits max
04 04 01 Function code 4: 1 LED ( all settings available with osdp_LED) 4 FOIS 1 led
05 01 00 Function code 5: 0 buzzer ( all settings available with osdp_BUZ)
06 00 00 Function code 6: No text display support
08 01 00 Function code 8: CRC-16 support
09 01 01 Function code 9: AES128 support
0A FA 00 Function code 10: buffer size 250
0B FA 00 Function code 11: combined buffer size 250
0C 00 00 Function code 12: transparent mode not support
0D 04 04 Function code 13: 4 lanes
0E 00 00 Function code 14: Fingerprint, Template 2
9347 CKSUM
This command instructs the reader to reply with a local status report.
CKSUM
SOM ADDR LEN CTRL CMD DATA / CRC
Physical
Reader 07h 00h: CKSUM XXh
53h XXh 64h: osdp_LSTAT none
Address 08h 00h: CRC / XXh XXh
00h i.e. 7Eh
The local status report applies to conditions directly monitored by the reader.
Power monitor status can be derived from the status of the power supply. Normally this reply is sent in response to an
osdp_POLL command if the status has changed since the last POLL
CRC
SOM ADDR LEN CTRL REPLY DATA /
CKSUM
Physical
09h 00h:
Reader 48h: XXh
53h CKSUM XXh 00h Status of power
Address osdp_LSTATR / XXh XXh
0Ah 00h: CRC
80h i.e. FEh
VII.3.3. Example
The Output Control command can alter the permanent state of the optocoupled output, or it can request a timed pulse
output. The permanent command is volatile (does not transcend power cycles).
The Output Control command controls the operation of the optocoupled output associated with a lane. The osdp_OUT is
a multirecord frame.
DATA1*… CKSUM
SOM ADDR LEN CTRL CMD DATA0 for output 0
/ CRC
Physical …
Reader 07h + (4*lane): CKSUM 68h: Output Control Timer Timer XXh
53h XXh
Address 08h + (4*lane): CRC osdp_OUT Number code LSB MSB / XXh XXh
00h i.e. 7Eh
The 16-bit value provided supports a maximum pulse time of 6,553.5 seconds, which is 1 hour, 49 minutes, and
13.5 seconds. A timer value of zero should be interpreted as "forever".
VII.4.5. Example:
Osdp_OUT : FF53001000046800020A00010701018b77
Osdp_NAK : FF53800B0004410900FF8D52
The Reader LED Control command controls the operation of the LEDs associated with a lane.
(This command supports the model where multiple LEDs may be associated with a reader)
Color and flash parameters may be specified.
Once the temporary command's timer expires the LED will revert to the last permanent state set.
A timer value of zero specifies zero duration.
The permanent command is volatile (does not transcend power cycles).
LED Number: 00h On the osdp STid reader there is only one LED.
1 byte
ON Time: The ON duration of the flash, in units of 100 ms. Minimum 100ms.
1 byte
OFF Time: The OFF duration of the flash, in units of 100 ms. Minimum 100ms
1 byte
ON color: The color value to set during the ON time:
Temporary settings
OFF color: The color value to set during the OFF time:
1 byte 00h Black (off/unlit)
01h Red
02h Green
03h Amber
04h Blue
Timer LSB: Least significant byte, in units of 100 ms. Minimum 100ms.
1 byte
Timer MSB: Most significant byte, in units of 100 ms.
1 byte
ON Time: The ON duration of the flash, in units of 100 ms. Minimum 100ms.
1 byte
OFF Time: The OFF duration of the flash, in units of 100 ms. Minimum 100ms.
Permanent settings
1 byte
OFF color: The color value to set during the OFF time:
1 byte 00h: Black (off/unlit)
01h Red
02h Green
03h Amber
04h Blue
Note:
The LED will flash, alternating between the color specified for ON and color specified for OFF at the rate specified by the
corresponding timers.
Setting both color codes to the same value will produce a steady (non-flashing) output.
*The LED Control Command message packet may contain multiple 14-byte records. The reader should use the total
message length to determine the number of records present. The number of records should not exceed the number of
LEDs; however the upper limit should not exceed the receive buffer size of the reader.
Records containing an invalid Reader/LED number will result in a 0x09 error reply.
If a CP sets a Temporary Setting and tries to establish another Temporary Setting, then a new Temporary Command
should override a currently active temporary command.
Warning: LED set to permanent cancel the LED color set by Ultrys configuration.
Warning: osdp_LED command cuts the RF, so there can be be busy responses.
Do not multiply the use of this command. In particular to make the LED flash, use the ON / OFF times of the
command.
Reply in multirecord:
VII.5.4. Example:
1- To cause the LED on the LANE 0 to blink red (100 ms) / green (200 ms) for 3 seconds, in temporary mode:
osdp_LED: FF530016000469000002010201021E000001010000E97B
53 SOM
00 Physical address reader
1600 LEN
04 CTRL
69 CMD
00 Reader number = lane number = 0
00 Led number 0
02 Control mode temporary: SET
01 01 x 100ms = ON 100ms
02 02 x 100ms = OFF 200ms
01 Red
02 Green
1E00 30 x100ms= 3s
00 Control mode permanent: no change
01 On time: NA
01 Off time: NA
00 On color: NA
00 Off color: NA
E97B CRC
2- To cause the LED on the LANE 0 and 1, to blink red (100 ms) / green (200 ms) for 3 seconds, in temporary mode:
osdp_LED:
FF530024000469000002010201021E000001010000010002010201
021E000001010000362E
53 SOM
00 Physical address reader
2400 LEN
01 CTRL
69 CMD
00 Reader number = lane number = 0
00 Led number 0
02 Control mode temporary: SET
01 01 x 100ms = ON 100ms
02 02 x 100ms = OFF 200ms
01 Red
02 Green
1E00 30 x100ms= 3s
00 Control mode permanent: no change
01 On time: NA
01 Off time: NA
00 On color: NA
00 Off color: NA
01 Reader number = lane number = 1
00 Led number 0
02 Control mode temporary: SET
01 01 x 100ms = ON 100ms
02 02 x 100ms = OFF 200ms
01 Red
02 Green
1E00 30 x100ms= 3s
00 Control mode permanent: no change
01 On time: NA
01 Off time: NA
00 On color: NA
00 Off color: NA
2E36 CRC
osdp_NAK: FF53800B00044109FF00824F
53 SOM
80 Physical address reader
0B00 LEN
04 CTRL
41 NAK
09 Multi record
FF Error on data 0
00 OK on data 1
824F CRC
CKSUM
SOM ADDR LEN CTRL CMD DATA
/ CRC
Physical Reader Address 07h 00h: CKSUM XXh
53h XXh 65h: osdp_ISTAT none
00h i.e. 7Eh 08h 00h: CRC / XXh XXh
CRC
SOM ADDR LEN CTRL REPLY DATA /
CKSUM
Physical Reader Address 0Bh 00h: CKSUM XXh
53h XXh 49h: osdp_ISTATR Status
80h i.e. FEh 0Ch 00h: CRC / XXh XXh
The status of all inputs will be returned in this reply. The array size is defined by the total message length. The order of
the Status Bytes corresponds to the numbering of the inputs, e.g. the first Status Byte corresponds to the first input, etc.
VII.6.3. Example:
CKSUM
SOM ADDR LEN CTRL CMD DATA
/ CRC
Physical Reader Address 07h 00h: CKSUM XXh
53h XXh 66h: osdp_OSTAT none
00h i.e. 7Eh 08h 00h: CRC / XXh XXh
CRC
SOM ADDR LEN CTRL REPLY DATA /
CKSUM
Physical Reader Address 0Bh 00h: CKSUM XXh
53h XXh 4Ah: osdp_OSTATR Status
80h i.e. Feh 0Ch 00h: CRC / XXh XXh
The status of all output will be returned in this reply. The array size is defined by the total message length. The order of
the Status Bytes corresponds to the numbering of the output, e.g. the first Status Byte corresponds to the first output, etc.
VII.7.3. Example:
VIII. Polling
Description: Poll
This command serves as a general inquiry. The reader may return any reply that is marked as a possible “poll response”.
Normally, the reader will return any unreported input data or status change information as a poll response.
VIII.2 REPLIES
There is no reply structure associated with this reply. Sent in response to all valid commands that do not require a
specific response or will not receive an immediate response.
Error code:
Error Code Error
1 byte
01h Message check character(s) error (bad checksum/CRC)
05h The reader does not support the security block that was received
Note:
Error Code 09h “Unable to process command record” – indicates that one or more command records had invalid
parameters and was not processed which may be followed by an optional array, where each byte represents the
completion code of the corresponding command record. A zero value indicates no error, and the value FFh indicates a
generic error. The remaining values are reserved for future definition.LSTATR
The local status report applies to conditions directly monitored by the reader.
Tamper status is detected by the reader by monitoring the enclosure tamper mechanism. Power monitor status can be
derived from the status of the power supply. Normally this reply is sent in response to an osdp_POLL command if either
status has changed since the last POLL.
CRC
SOM ADDR LEN CTRL REPLY DATA /
CKSUM
Physical
Reader 09h 00h: CKSUM 48h: Status of tamper circuit XXh
53h XXh Status of power
Address 0Ah 00h: CRC osdp_LSTATR NA / XXh XXh
80h i.e. FEh
This reply is sent in response to an osdp_POLL command after a card was read but the raw data was not decoded into a
character array.
Unreported card data is deleted in case of, or during, a communication loss.
CRC
SOM ADDR LEN CTRL REPLY DATA /
CKSUM
Physical Count
XXh XXh: XXh
Reader Reader Format
53h CKSUM XXh 50h: osdp_RAW Data / XXh
Address number code LSB MSB
XXh XXh: CRC XXh
80h i.e. FEh
Count: 2-byte size (in bits) of the data at the end of the record
2 bytes
The reader must begin sending a reply less than REPLY_DELAY after it receives the last character of a valid command.
If it cannot, it should send an osdp_BUSY.
This reply will use either checksum or CRC for message integrity even if the secure channel has been established and
commands are exchanged using secure messaging.
In other words, the busy reply is sent outside the secure channel and should not influence the secured messages that
are sent before or after this reply.
The osdp_ACK is the appropriate response if the data requested by the command is not immediately available but will be
returned in response to a subsequent osdp_POLL. Otherwise (meaning that a specific non-ACK response is required
and the data is not available in time to meet the REPLY_TIMEOUT), the reader responds with osdp_BUSY until it is able
to return the requested data. In this case, the CP shall continue to repeat the command in its original form until the PD
returns something other than osdp_BUSY.
Note:
The command MFG_TIMEOUT_BUSY allows to set the duration between a frame received from the CP and the sending
of a busy in the case of the reader is busy (by reading a big data in a badge for example).
MFG_TIMEOUT_BUSY 04h -
This command is intended to allow manufacturer specific commands to be embedded within this protocol.
CKSUM
SOM ADDR LEN CTRL CMD DATA
/ CRC
Physical
xxh 00h:
Reader 80h: STid STid STid XXh
CKSUM Command
53h Address XXh osdp_ Vendor Vendor Vendor Command_ID / XXh
xxh xxh: specific data
00h MFG code 1st code 2nd code 3rd XXh
CRC
i.e.7Eh
IX.3- MFG_TIMEOUT_BUSY
The command MFG_TIMEOUT_BUSY allows to set the duration between a frame received from the CP and the sending
of a busy in the case of the reader is busy (by reading a big data in a badge for example).
Delay: the unit is in hundredths of a millisecond. By default the timeout is set to 02h (200ms).
1 byte [ 02h – FFh]
X. Revision History