Appendix B - Simplify RS-232 Communication Protocol
A Simplify PIN Pad can be attached to the POS device using an RS-232 serial connection (or USB emulating RS-232). The RS-232 communication protocol between the POS device and the Simplify application includes the following elements:
Start of Text (STX)
End of Text (ETX)
Longitudinal Redundancy Check (LRC)
The Longitudinal Redundancy Check (LRC) is generated by performing an exclusive OR on all characters in the message except the Start of Text (STX), but inclusive of the End of Text (ETX). The LRC calculation is performed by both the sending and receiving stations, as shown in Appendix C: Link Level Exchanges
There are two types of messages flowing between the POS device and Simplify:
Data-level messages are described above starting with Message Details This appendix describes the Link-level messaging.
The Link-level Response between the POS device and Simplify provides positive acknowledgement to a message. All messages result in a Link-level Response.
An ACK (hex 06) is a positive acknowledgement to a received message. It indicates to the sending station that the message was correctly received, including proper message format and a successful LRC check. If the sending station does not receive an ACK within a parameterized amount of time, it must retransmit the previous message. If the retransmission is repeated a parameterized number of times for the same message and an ACK is not received, communication with the device is assumed to be lost and the proper actions are to be taken by the sending station.
A NAK (hex 15) is a negative acknowledgement to a received message. It indicates to the sending station that some data was received but it was not received correctly. The reasons for a NAK include invalid format or failed LRC check. If the sending station receives a NAK response to a message, it should re-transmit the previous message. If a NAK continues to be received after a parameterized number of retransmissions, communications with the other device is assumed to be lost and the proper actions are to be taken by the sending station.
Note: The following values are configurable parameters in Simplify (it is suggested they should also be configurable parameters in the POS device as well):
Number of Retries – a default value of 3.
Timeout Waiting for ACK / NAK – a default value of 1 second.