28.11.2012 Views

Protocol FlexiPOS - Vectron Systems AG

Protocol FlexiPOS - Vectron Systems AG

Protocol FlexiPOS - Vectron Systems AG

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Axel Ilenburg, December, 06th 2000<br />

Basics<br />

V<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong><br />

This document describes the <strong>FlexiPOS</strong> protocol.<br />

Software / Communication protocol<br />

Basics<br />

• No polling – every device sends the data as soon as they are available.<br />

• No hardware handshake. The protocol is interactive (the next message is not sent<br />

until the previous message was acknowledged) – so an overflow of the input buffers<br />

should never occur (as long as the input buffer is as large or larger than the<br />

longest message).<br />

• The ANSI (= Windows) character set is used.<br />

• The protocol is non-transparent, i.e. the data fields may not contain any control<br />

characters (characters below 0x20).<br />

• The LRC is calculated by XOR over the data (not including STX).<br />

• After a NAK the transmission is repeated up to 2 time (total of 3 tries).<br />

• Version check: The protocol should have two version numbers, main and sub version:<br />

• Main version: Changes if the protocol is no longer compatible.<br />

• Sub version: Changes if new features are added but the protocol is still compatible.<br />

• Sometimes several data fields have to be transmitted at once (e.g. display content<br />

and valve timing) – to chain data fields in a message an ETB-character (end of<br />

transmission block) is used followed by the next block (LRC and STX are not sent).<br />

Sample: “STX, Data1, LRC, ETX” and “STX, Data2, LRC, ETX” are combined to<br />

“STX, Data1, ETB, Data2, LRC, ETX”. If the block is not valid (the answer is NAK)<br />

all fields are ignored. In case more than one of the message parts needs an answer<br />

other than ACK the sequence should be ignored and answered with NAK.<br />

Control characters<br />

STX 0x02<br />

ETX 0x03<br />

ACK 0x06<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 1/1


NAK 0x15<br />

Messages<br />

• Login (from POS):<br />

• Purpose:<br />

• Activates the external device<br />

• Contents:<br />

• Nothing<br />

• Format:<br />

Possible answers:<br />

STX = 1 byte<br />

“VL” = 2 bytes<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

Login Acknowledge = Normal answer (see below)<br />

NAK = Message invalid (format or LRC)<br />

• Login acknowledge (to POS):<br />

• Purpose:<br />

• Acknowledges the login<br />

• Transmits the version numbers<br />

• Contents:<br />

• Main version<br />

• Sub version<br />

• Format:<br />

STX = 1 byte<br />

“VA” = 2 bytes<br />

Main version = 2 byte (‘00’ to ’99’)<br />

Sub version = 2 byte (‘00’ to ’99’)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

At now the version numbers aren’t checked if they are valid.<br />

• Reset (from POS):<br />

• Purpose:<br />

• Reset after error conditions to set system into a well defined state (Clear<br />

display, reset input mode etc.)<br />

• Contents:<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 2/2


• Nothing<br />

• Format:<br />

STX = 1 byte<br />

“VR” = 2 bytes<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

• Logout (from POS)<br />

• Purpose:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

• Deactivates the external device in situations where the POS can not process<br />

an information (e.g. in programming mode)<br />

• Contents:<br />

• Nothing<br />

• Format:<br />

STX = 1 byte<br />

“VO” = 2 bytes<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

• Display update (from POS)<br />

• Purpose:<br />

• Transmits display contents<br />

• Contents:<br />

• Delete mode:<br />

• 0: first numeric key pressed erases whole display<br />

• 1: first numeric key pressed erases bottom line only<br />

• Data length (for 2 lines)<br />

• Data (for 2 lines)<br />

• Format:<br />

STX = 1 byte<br />

“VD” = 2 bytes<br />

Delete mode = 1 byte<br />

Data len line 1 = 2 bytes<br />

Data line 1 = ??? bytes<br />

Data len line 2 = 2 bytes<br />

Data line 2 = ??? bytes<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 3/3


• Possible answers:<br />

• Beep (from POS)<br />

• Purpose:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

• Operate the beeper<br />

• Contents:<br />

• Type (e.g. Short, Long, Error etc.)<br />

• Format:<br />

STX = 1 byte<br />

“VB” = 2 bytes<br />

Type = 1 byte (‘0’ to ’9’)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

• Set input mode (from POS)<br />

• Purpose:<br />

• Selects an input mode.<br />

This command is send after the POS gets the “Login acknowledge” message.<br />

• Contents:<br />

• Mode number:<br />

• Format:<br />

• 0: undefined<br />

• 1: input prohibited<br />

• 2: numeric (bottom line used, 16 characters max.)<br />

• 3: numeric with asterisks displayed (bottom line used, 16 characters<br />

max.)<br />

• 4: CL only (to force the user to confirm a severe error message with CL)<br />

• 5: reserved for alphanumeric etc. (could work similar to alphanumeric input<br />

on mobile phones)<br />

STX = 1 byte<br />

“VM” = 2 bytes<br />

Input mode = 2 bytes (‘00’ to ’99’)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 4/4


• Set status mode (from POS)<br />

• Purpose:<br />

• Selects mode for clerk lock and coffee machine<br />

This command is send after the POS gets the “Login acknowledge” message.<br />

• Contents:<br />

• Coffee machine mode:<br />

• 0: Normal<br />

• 1: Binary<br />

• Clerk lock mode:<br />

• Format:<br />

• 0: WITH detection of key removal<br />

• 1: WITHOUT detection of key removal<br />

STX = 1 byte<br />

“VC” = 2 bytes<br />

Coffee mach. Mode = 1 byte (‘0’ or ’1’)<br />

Clerk lock mode = 1 byte (‘0’ or ’1’)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

• Set authorisation line for coffee machine (from POS)<br />

• Purpose:<br />

• Selects mode for clerk lock and coffee machine<br />

This command is send after the POS gets a “Input event” message for clerk<br />

sign in/off.<br />

• Contents:<br />

• Line status:<br />

• Format:<br />

• 0: Offline<br />

• 1: Online<br />

STX = 1 byte<br />

“VA” = 2 bytes<br />

Line status = 1 byte (‘0’ or ’1’)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 5/5


• Input event (to POS)<br />

• Purpose:<br />

• Transmits events like functions key, clerk lock events etc. to the POS<br />

• Contents:<br />

• Function key:<br />

• PLU 1<br />

• Guest Check 2<br />

• Clerk 3<br />

• Payment 4<br />

• Multiplier 5<br />

• CL 6<br />

• Quantity A 7<br />

• Quantity B 8<br />

• Quantity C 9<br />

• Right arrow 10<br />

• Dallas sign in 51<br />

• Dallas sign out 52<br />

• Other clerk key 53 and higher<br />

• Contents of the input buffer or clerk number (in case of the Dallas key full<br />

serial number including the family code as hex (e.g. “0600000010BAB7”).<br />

• Format:<br />

STX = 1 byte<br />

“VI” = 2 bytes<br />

Event = 2 bytes (‘00’ to ’99’)<br />

Buffer bytes used = 2 bytes (‘00’ to ‘32’)<br />

Buffer = 0 to 32 bytes<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

• Product request (to POS)<br />

• Purpose:<br />

• Requests if it is allowed to get a certain product<br />

• Contents:<br />

• Device number (CodeCap, Pourer or Coffee machine):<br />

• 0: undefined<br />

• 1: Pourer<br />

• 2: CodeCap<br />

• 3: Coffee machine<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 6/6


Every external device except the BarMaster has to use the device number 2.<br />

• Product number<br />

• Format:<br />

STX = 1 byte<br />

“VQ” = 2 bytes<br />

Device = 1 byte (“0” to “9”)<br />

Product no. = 5 bytes (“00000” to “99999”)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

Product acknowledge = Normal answer (see below)<br />

NAK = Message invalid (format or LRC)<br />

• Product acknowledge (from POS)<br />

• Purpose:<br />

• Answer to a product request<br />

• Contents:<br />

• Device number<br />

• Product number<br />

• Status:<br />

• Format:<br />

• 0: not allowed<br />

• > 0 for Cap: allowed<br />

• > 0 for Pourer: opening time<br />

STX = 1 byte<br />

“VP” = 2 bytes<br />

Device = 1 byte (‘0’ to ‘9’)<br />

Product number = 5 bytes (‘00001’ to ‘99999’)<br />

Status/Time = 4 bytes (‘0000’ to ‘9999’)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

• Product registration (to POS)<br />

• Purpose:<br />

• Confirms that the product was taken<br />

• Contents:<br />

• Device number<br />

• Product number<br />

• Format:<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 7/7


STX = 1 byte<br />

“VG” = 2 bytes<br />

Device = 1 byte (‘0’ to ‘9’)<br />

Product number = 5 bytes (‘00001’ to ‘99999’)<br />

ETX = 1 byte<br />

LRC = 1 byte<br />

• Possible answers:<br />

Example<br />

ACK = OK<br />

NAK = Message invalid (format or LRC)<br />

Sample sequence (with several error situations):<br />

POS: Login<br />

Ext. Dev.: Login acknowledge<br />

POS: Display update; Set input mode (numeric); Set status mode<br />

Ext. Dev.: Input event: Dallas serial number<br />

POS: Display update;<br />

Ext. Dev.: Input event: Table number<br />

POS: Display update: error message “invalid table number”; Beep<br />

Ext. Dev.: Input event: Table number<br />

POS: Display update: Table name and balance<br />

Ext. Dev.: Product request: Pourer, PLU 123<br />

POS: Display update: “Invalid PLU”; Product acknowledge: not allowed;<br />

Beep<br />

Ext. Dev.: Product request: Pourer, PLU 100<br />

POS: Display update: PLU name, available sizes; Product acknowledge:<br />

timing value<br />

Ext. Dev.: Input event: Soft key for other size<br />

POS: Display update: PLU name, available sizes; Product acknowledge:<br />

timing value<br />

Ext. Dev.: Product registration<br />

Ext. Dev.: Input event: Table key<br />

POS: Display update: Table name and balance<br />

<strong>Protocol</strong> <strong>FlexiPOS</strong> Jul, 08 1999 8/8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!