You are on page 1of 15

MorphoAccess 500 Series

RS422 Communication Protocol

Produced by Sagem Scurit


Copyright 2009 Sagem Scurit
www.sagem-securite.com

MorphoAccess

TM

500 Series RS422 Communication Protocol

SSE-0000067765-02

September 2009

Table of Contents

INTRODUCTION

SCOPE OF THE DOCUMENT

REFERENCES

RS422 PROTOCOL
DEFINITION
FRAMES SEQUENCE
TIMING CHARACTERISTICS
COMMUNICATION ERROR CASE
REQUEST COUNTER MANAGEMENT
RETRANSMISSION
ERROR CASES
TYPICAL TRANSACTIONS WORKFLOW
EXAMPLES

6
6
8
8
8
8
9
9
10
12

SUPPORT
CUSTOMER SERVICE
HOTLINE

13
13
13

Sagem Scurit document. Reproduction and disclosure forbidden

SSE-0000067765-02

INTRODUCTION
This document describes the protocol used to send remote commands
(ILV) to the MorphoAccess using the serial link (RS422).This protocol is
only available on MorphoAccess 500 Series.

SSE-0000067765-02

Sagem Scurit document. Reproduction and disclosure forbidden.

SCOPE OF THE DOCUMENT


This guide relates to the use of MorphoAccessTM 500 Series terminals.
MorphoAccessTM 500 Series is a generic appellation which gathers
MorphoAccessTM terminals belonging to MA 500+ Series, OMA 500 Series
and MA 500 Series. Corresponding list of products is depicted in the table
below.

Biometrics

Contactless Smartcard
Reader
MIFARE

MA 500+
Series

OMA 500
Series

MA 500
Series

TM

TM

DESFire

MA 500+

MA 520+ D

MA 521+ D

OMA 520 D

OMA 521 D

OMA 520

OMA 521

MA 500

MA 520

MA 521

False
Finger
Detection

Sagem Scurit document. Reproduction and disclosure forbidden

Outdoor

SSE-0000067765-02

REFERENCES
Reading the following manuals may be useful to understand the
functionalities presented in this document:

 MorphoAccessTM Installation Guide,

 MorphoAccessTM Host System Interface Specification.

SSE-0000067765-02

Sagem Scurit document. Reproduction and disclosure forbidden.

RS422 PROTOCOL
Definition
Data Packet Structure
The packet format is:
STX

ID

RC

DATA

CRC

DLE

Start Of Packet

ETX

End Of Packet

Abbreviation
Fields name Definition

Size (Bytes)

Value

<STX>

Start Text

0x02

<ID>

Packet Identifier

--

<RC>

Request Counter

--

<DATA>

Data value

Up to 1024

--

<CRC>

Transmission error control

--

<DLE>

Data Link Escape

0x1B

<ETX>

End Text

0x03

The maximum size allowed for a packet is 2 058 bytes:


(STX+ID+DLE+ETX+(RC+DATA+CRC)*2 [if stuffed])
Byte Order
The packet byte order is Little Endian: multi bytes data are sent to the
Least Significant Byte first (LSB).
Data
Data are formatted as ILV packets.
Stuffing
Software handshake capabilities (XON-XOFF) are preserved by replacing,
in the <RC + Data + CRC>, all XON(0x11) / XOFF(0x13) characters by the
couple <DLE> <XON+1> (0x12) or <DLE> <XOFF+1> (0x14).

Sagem Scurit document. Reproduction and disclosure forbidden

SSE-0000067765-02

To prevent confusion with the frames sequences <STX><ID> and


<DLE><ETX>, every <DLE> byte in the <RC+ Data + CRC> is preceded
by an extra <DLE> byte (stuffing).
Stuffing must be processed before sending a packet and removed
(unstuffed) after receiving the packet.
NOTE:

a simple <DLE> <ETX> sequence does not necessarily signify


the end of the packet, as these can be bytes in the middle of a
data string.

The end of a packet is <ETX> preceded by an odd number of <DLE>


bytes.
CRC Calculation
The type of the CRC is CRC16 V41.
The CRC is computed as a function of the Data part before Stuffing.
The initial value is 0x0000.
Packet Identifier
The identifier is formatted as follow:
Bit 7 (MSB)

Bit 6

Bit 5

Bit 4

IN/OUT

First

Last

Reserved 0

Bit 3

Bit 2

Bit 1 Bit 0 (LSB)

Packet Type

The MSB (Bit 7) is reserved for packet direction. Setting this bit set the
direction to IN. Clear this bit to set the direction to OUT.
An OUT packet is a packet sent by the Host to the MorphoAccess.
An IN packet is a packet sent by the MorphoAccess to the Host.
Bit 6 is reserved for Packet Order information. Set this bit when it is the
first packet when transmitting a set of packets.
Bit 5 is reserved for Packet Order information. Set this bit when it is the
last packet when transmitting a set of packets.
Bit 4 is a reserved bit and must be cleared.
Bits 3 to 0 are used for Packet Identification:
The following packet types are implemented:
ID Value

Description

0x1

Data Packet

0x2

ACK Packet

0x4

NACK Packet

SSE-0000067765-02

Sagem Scurit document. Reproduction and disclosure forbidden.

Frames sequence
Frame creation

Frame process

CRC calculation

CRC verification

DLE Stuffing

DLE Unstuffing

XON / XOFF
replacement

<DLE> <XON+1> /
<DLE> <XOFF+1>
replacement

Timing Characteristics
The maximum elapsed time between transmission of two bytes of a frame
is 100ms.
The maximum elapsed time between the emission of a Packet Data and
the reception of the ACK is 500ms.

Communication Error Case


The following error cases must be detected:

 Timeout between the reception of two bytes (the timeout starts after
the reception of STX),

 Bad CRC check,

 Unstuffing error (<DLE> is followed by an unexpected character).

Request Counter management


The following rules have to be implemented:

 the RC of a data is filled with the current Counter value,

 the RC of an ACK/NACK packet is filled with the RC of the data
packet to ACK/NACK,

 on the reception of an ACK/NACK packet, the RC is compare to the
latest data packet sent. If it is an ACK, the counter is increased on
a hit. If several packets are received with the same RC, only one
ACK is send.

Sagem Scurit document. Reproduction and disclosure forbidden

SSE-0000067765-02

Retransmission
In case of NACK reception or Timeout, the transmitter tries to send the
same packet again.
A packet can be retransmitted 3 times. After, another NACK reception or
Timeout event leads to ERROR of the transmission.

Error cases

 When a frame is not valid (Bad CRC, Unstuffing error, Rx timeout),
the receiver must send a NACK packet.

 When the transmitter is waiting an ACK/NACK packet, all other
received packet must be ignored.

SSE-0000067765-02

Sagem Scurit document. Reproduction and disclosure forbidden.

Typical Transactions workflow



 Emission of a data packet that contain less than 1 024 bytes of
effective data:

Transmitter

RC

Packet
Type:

RC
value:

Bit F:

Bit L:

DATA

RC

1
Receiver

ACK(RC)

HIT
RC+1


 Emission of a data packet that contain more than 1 024 bytes of
effective data:

Transmitter

Packet
Type:

RC
value:

Bit F:

Bit L:

DATA

RC

0
Receiver

RC

ACK(RC)

HIT

RC+1

Transmitter

Packet
Type:

RC
value:

Bit F:

Bit L:

DATA

RC+1

RC+1

Receiver
ACK(RC+1)

HIT
RC+2

Transmitter

Packet
Type:

RC
value:

Bit F:

Bit L:

DATA

RC+i

RC+i
HIT

Receiver
ACK(RC+i)

RC+i+1

10

Sagem Scurit document. Reproduction and disclosure forbidden

SSE-0000067765-02


 An Error occurred while transmitting the data packet:

RC

DATA (RC)

Nb attempts = 0

Transmitter

Receiver
NACK (RC)

HIT
RC
Nb attempts = 1

RC

DATA (RC)

Nb attempts = 2

Transmitter

Receiver
NACK (RC)

HIT
RC
ERROR

Nb attempts = 3


 The data packet is transmitted but the receiver does not transmit
ACK or NACK:

RC
Transmitter

Nb attempts = 0

DATA (RC)
Receiver
Wait ACK or NACK 500ms

RC
Nb attempts = 1

RC
Transmitter

DATA (RC)

Nb attempts = 2

Receiver

HIT
RC
TIMEOUT
SSE-0000067765-02

Wait ACK or NACK 500ms

Nb attempts = 3
Sagem Scurit document. Reproduction and disclosure forbidden.

11

Examples
PC sends a ping request to the MorphoAccess
STX ID RC
02

Data: ILV

61 XX 08 00

CRC CRC DLE ETX

00

XX

XX

1B

03

Answer from the MorphoAccess to the PC


STX ID

RC

02

XX

61

Data: ILV
08

01

00

CRC CRC
00

XX

XX

DLE
1B

ETX
03

PC asks for the logs status


STX ID
02

61

RC
XX

Data: ILV
5D

01

00

CRC CRC
00

XX

XX

DLE

ETX

1B

03

Answer from the MorphoAccess


STX ID RC
02

12

Data: ILV

CRC CRC DLE ETX

61 XX 5D 0A 00 00 01 09 00 40 1F 40 00 01 12 XX

Sagem Scurit document. Reproduction and disclosure forbidden

XX

1B

03

SSE-0000067765-02

SUPPORT
Customer service
Sagem Scurit
SAV Terminaux Biomtriques
Boulevard Lnine - BP428
76805 Saint Etienne du Rouvray
FRANCE
Phone: +33 2 35 64 55 05

Hotline
Sagem Scurit
Support Terminaux Biomtriques
18, Chausse Jules Csar
95520 Osny
FRANCE
hotline.biometrics@t.my-technicalsupport.com
Phone: +33 1 58 11 39 19
http://www.biometric-terminals.com/
Copyright 2009 Sagem Scurit
http://www.sagem-securite.com/

SSE-0000067765-02

Sagem Scurit document. Reproduction and disclosure forbidden.

13

Head office: Le Ponant de Paris


27, rue Leblanc - 75512 PARIS CEDEX 15 - FRANCE

You might also like