This blog post provides a simple, high-level overview of the RS-485 and OSDP protocol. For complete details or implementation, please refer to the OSDP standards documents provided by SIA.
Underlying RS-485 Protocol Overview
OSDP uses RS-485 as the underlying communication protocol. RS-485 is a serial communication protocol designed to provide higher level of communication. RS-485 is also known as TIA-485.
- Up to 10 Mb/sec of communication speed
- Up to 4000 ft or 1200 m of distance between the communicating devices
- Great noise immunity, due to the differential nature of the network. This is great for office and industrial environment where there might be a lot of RF noise.
- You can connect up to 32 devices on a RS-485 line
RS-485 contains an A, B, and SC (signal common) line. The A and B lines operate on differential signal. Which means when A is high, B goes low. Ab and B lines on RS-485 need to have at least 400 mV of difference to be correctly read.
Control Panel (CP) and Peripheral Device (PD) Definition
The CP is the main controlling device, which can connect to multiple peripheral devices inside a OSDP network.
Control panel can:
- Initiate communication at any time
- Send message to any peripheral
- Sets a timeout within which a PD is supposed to return the response back
- If response cannot be sent within the timeout, the PD will send an ack, and wait for a polling message from the CP in order to return the response, whenever ready
Data Size Limits
All PDs should be able to receive up to 128 Bytes of data, and handle up to 1440 bytes of data on the line, being sent to another PD.
There are specific timing requirements to facilitate error-free communication of multiple messages between CP and PD devices.
- There should be a gap of 2 character times before access the communication channel
- The transmitting device must set the marking level, by setting all bits to 1, before starting the message
- The transmission device should not hold the line more than 1 character time delay, after sending the last character
- The reply cannot be delayed more than 200 milliseconds
- If a reply is not received within 8 seconds, the CP may consider the device offline and a new connection would need to be established
- The nominal value of inter character timeout is set at 20 ms
Peripheral Message Receiving Behavior
All PDs must be looking out for the Start of Message (SOM) signal on the line. Even if the message is intended for a different device, they should still track it to know when the end of message occurs, so that they can monitor the next message. The receiving PD’s address is listed in the message, right after the SOM message. This information can be used by the PD to know whether the message is intended for it and process it.
OSDP Packet Format
OSDP Security Block
OSDP protocol has been designed to overcome the security limitations of Weigand. Weigand transfers key card numbers on an unencrypted line. OSDP does not specify a specific security protocol for implementing encryption on the device. Instead, it provides a message format, that allows adding your own security layer and data packet into the message. Starting with OSDP 2.1.7, OSDP specifies 128-bit AES encryption.
Support for Larger Message Types
OSDP supports sending multi-part and file type message types over the wire. However, it doesn’t seem practically suitable for sending long message types over OSDP. It’s restricted by the limitation of the underlying RS-485 protocol, which can support a max data transfer speed of 10 Mb/s. This might be sufficient for any key card format but not ideal for face recognition access data, data especially raw images or video formats.
OSDP Protocol PDF
You can buy and download the complete OSDP standard and purchase it from the SIA website