MPOST Integration
MPOST Integration
MEI
Ogorodnisky Andrey
CONFIDENTIAL PROPERTY
The document and the information contained in it are the confidential property of MEI. It
must not be copied, duplicated or used in any manner, or trasnmitted to others without the
written consent of MEI.
Table of Contents
1 Change History .................................................................................................................................... 5
2 Introduction ........................................................................................................................................ 6
2.1 Acronyms and Definitions ........................................................................................................... 6
2.2 Scope........................................................................................................................................... 6
2.3 Requirements .............................................................................................................................. 6
2.3.1 Products .............................................................................................................................. 6
2.3.2 Software .............................................................................................................................. 6
2.3.3 Hardware ............................................................................................................................ 6
3 MEI Point of Service Toolkit (M/POST) ................................................................................................ 7
3.1 Overview ..................................................................................................................................... 7
3.1.1 M/POST Library differences ................................................................................................ 8
3.2 M/POST Enumerations ................................................................................................................ 8
3.2.1 BNFStatus Enumeration ...................................................................................................... 8
3.2.2 BNFErrorStatus Enumeration .............................................................................................. 9
3.2.3 CashBoxCleanlinessEnum Enumeration .............................................................................. 9
3.2.4 DocumentType Enumeration .............................................................................................. 9
3.2.5 Orientation Enumeration .................................................................................................. 10
3.2.6 OrientationCtl Enumeration .............................................................................................. 10
3.2.7 PowerUp Enumeration ...................................................................................................... 10
3.2.8 Protocol Level Enumeration .............................................................................................. 10
3.2.9 State Enumeration ............................................................................................................ 11
3.2.10 Bezel Enumeration ............................................................................................................ 11
3.2.11 Banknote Classification Enumeration ................................................................................ 12
3.2.12 ConfigurationIndex ............................................................................................................ 12
3.3 M/POST Acceptor Object Properties ......................................................................................... 12
3.3.1 Acceptor Properties - Overview ........................................................................................ 12
3.3.2 Acceptor Properties – Details ............................................................................................ 15
3.4 M/POST Document Interface and Classes ................................................................................. 27
3.4.1 IDocument Interface ......................................................................................................... 27
3.4.2 Bill Properties .................................................................................................................... 27
3.4.3 Barcode Properties ............................................................................................................ 28
2.2 Scope
The scope of this document is to provide a detailed description of the MPOST Library and how to use it.
This document will detail all of the available properties and methods of the API in addition to some
recommended use cases.
A more detailed description of many of the concepts and settings described in this document can be
found in the EBDS Protocol Specification Document. Please contact our technical support to acquire the
latest version of this document if desired.
2.3 Requirements
2.3.1 Products
The MPOST library is designed to work with any EBDS supported bill acceptor from MEI. This includes
the following products: Series 2000 bill acceptor, Cashflow SC and SC advance devices.
2.3.2 Software
MPOST comes in a few different versions to support a wider number of host integrations on multiple
operating systems. Please see section 3.1 Overview to see which version of MPOST would best suite
your needs.
2.3.3 Hardware
The computer that will be using MPOST must also have either a serial port or a USB port. USB support is
only available on Windows Operating system through a USB to Serial Communications Driver.
3.1 Overview
M/POST is currently released in two stable libraries that support a wide range of applications. The
following table displays the current and previous libraries.
Name Description Status
M/POST Library written in C# and supports the .NET Stable, active project. Current
.NET framework 2.0 or greater. The DLL can also be version as of June 2015 is V3.50
exposed to COM projects to support older languages
like VB6.
M/POST Full java implementation that supports Windows and Stable, active project. Current
Java Linux. The release package contains all the files version as of July 2015 is V3.50
necessary for serial communications on both
operating systems.
M/POST Library written in VB6. Deprecated. No new development
OLE planned for this version. Last
released version was V1.23 during
Nov 2010. Recommended upgrade
- .NET with COM operability
M/POST Aimed at Linux platforms and supported the C and Obsolete. No development since
for Linux C++ languages V1.00 May 2008. Recommended
upgrade – Java.
3.2.12 ConfigurationIndex
Configuration Options indexes.
Type Overview
VOUCHER_MODE Voucher Mode.
STACKER_CONFIGURATION Stacker Configuration.
MAX_BNF_REJECTS Max BNF Rejects.
PASSIVE_RUN_AND_STACK Passive Run & Stack.
FOUR_WAY_BARCODE_INHIBIT Four Way Barcode Inhibit.
COMPATIBILITY_MODE_ENABLED Compatibility Mode Enabled.
CLASSIFICATION_TYPE Classification Type.
IMPROPERLY_SEATED_HEAD Improperly Seated Head.
NOTE_AUTO_INHIBIT Note Auto Inhibit.
OUT_OF_ORDER_FOR_HANGING_NOTE Out Of Order For Hanging Note.
TICKET_TRANSPERENCY_THRESHOLD Ticket Transparency Threshold.
BASCODE_SIZE_CONVERSION Barcode Size Conversion.
OEM_CONFIGURATION_OPTION OEM Configuration Option.
SECURITY_MODE Security Mode.
MULTI_NOTE_ESCROW_STORAGE_SIZE Multi Note Escrow Storage Size.
BNF_JAM_IMPROVEMENT_MODE BNF Jam Improvement Mode
MDR_MODE MDR Mode
SEMI_ATTENDED_MODE Semi-Attended Mode
LOTTERY_TICKET_MODE Lottery Ticket Mode
RECYCLER_1_FILL_LEVEL Recycler 1 Fill Level
RECYCLER_2_FILL_LEVEL Recycler 2 Fill Level
An example of a truncated print out of this property for a bill acceptor loaded
with the US dollar variant part number 490320223 is shown below:
Note Index Country Value Version Identfiers
1 USD 1 CABB
2 USD 2 CABA
3 USD 2 CBBA
4 USD 5 CABB
5 USD 5 DABC
6 USD 10 DABB
… … … …
An example of a print out of this property for a bill acceptor loaded with the US
dollar variant part number 490320223 is shown below:
Note Index Country Value Version Identifiers
(not used in this property)
1 USD 1 ****
2 USD 2 ****
3 USD 5 ****
4 USD 10 ****
5 USD 20 ****
6 USD 50 ****
7 USD 100 ****
Note that the view of the bill set is simpler than that in the BillTypes property,
but that the detail information about the various bill types and variations is not
available.
Note that if this property is referenced after the cashbox is removed (for
example, in either the CASHBOX_REMOVED or CASHBOX_INSTALLED event
handlers) then the cash box value in the bill acceptor will be cleared so that the
next time this property is referenced, it will have a value of zero.
NOTE: This property is deprecated. You should use the device state property to
determine if the unit is in the Stalled state.
Name Description
Parameter Data : none Version: 1.00
CALIBRATE_FINISH This event signals that calibration has completed.
Recommended Action: Host can resume normal operations
Parameter Data : none Version: 1.00
CALIBRATE_PROGRESS Signals that a calibration is in progress.
Recommended Action: None
Parameter Data : none Version: 1.00
This message is sent when the calibration process is started and the user
CALIBRATE_START needs to insert the calibration document.
Recommended Action: Host should enter a special state to handle
calibration.
Parameter Data : CashBoxCleanlinessEnum Value Version: 2.50
This event is sent when a cash box is inserted and does not meet the
optimal sensor values. In order for this event to be raised, the host must
have enabled the feature. See EnableCashboxCleanlinessReporting
function.
Recommended Action: If value == CleaningRecommended then the host
CASHBOX_CLEANLINESS
can continue with normal operations; technician should address this
_DETECTED
cashbox after use. If value == Cleaning Required the device will not be able
to enter normal operations. The host should enter Out of Service and
request manual intervention.
NOTE – This event will only occur when a cashbox is first inserted or
directly after the host enables the feature, there is no risk of this event
occurring during normal operations.
Parameter Data : none Version: 1.00
CASHBOX_INSTALLED This event is sent when a cash box is inserted into the bill acceptor.
Recommended Action: Host can resume normal operations
Parameter Data : none Version: 1.00
CASHBOX_REMOVED This event is sent when the cash box is removed from the bill acceptor.
Recommended Action: Host should enter an error condition.
Parameter Data : none Version: 1.00
This message is sent when difficulty is encountered transporting a
CHEATED
document that may have been caused by a cheat attempt.
Recommended Action: Host should enter an error condition.
<Table Continues on Next Page>
4.1.1 Connect/Disconnect
The following behavior can be expected when opening and closing a connection to a device.
When connecting to a powered device for the first time, there will be a total of 3 or 4 events sent from
the API depending on the device that is connected.
POWER_UP – This will be the first event. It informs the host that the device is performing its
initialization routine.
CONNECTED – The host is now connected to the device and can perform some operations. The
device is still in power up mode and will not be ready to accept currency.
STACKED – (Deprecated!) Will be a no-value stacked event. This is part of the power up tests
that ensure the unit is operating correctly. This message is only sent by SC devices (Including
Stackerless) and meant to inform the host that the stacking mechanism is clear and fully
functional. The Series 2000 does not send this message.
STACKED_WITH_DOC_INFO – A new STACKED event with document type and value as event
argument. This is part of the power up tests that ensure the unit is operating correctly. This
message is only sent by SC devices (Including Stackerless) and meant to inform the host that the
stacking mechanism is clear and fully functional. The Series 2000 does not send this message.
POWER_UP_COMPLETE – The device is now fully operational and ready to accept currency.
Note: If there is no cashbox attached, the API will not report the STACKED event and instead, it will issue
the CASHBOX_REMOVED event after the POWER_UP_COMPLETE event.
Please note: Since V3.50, there will be two STACKED events, one without document information, one
with Document type and value information as argument. Please handle only ONE and the new event
of STACKED_WITH_DOC_INFO is recommended.
If the device has previously communicated with the API without losing power, it will not enter its power
up routine and the host can assume full operations once the CONNECTED event is received.
The following assumes the default communications timeout of 30 seconds. See Acceptor Properties –
Details for the DisconnectTimeout Property on how to change this value.
If the device does not communicate with the API for a set period of time (30 seconds default), the API
will issue a DISCONNECTED event but will continue to attempt to reestablish communications with the
device automatically. If the API can re-gain communications, it will receive the following events
depending on the reason for the communication loss:
If the device did not lose power and only communications were disrupted, the host will receive
only the CONNECTED event.
If the device lost power and power is reapplied, the host can expect the 5 events listed (3 for
series 2000) for connecting to a device for the first time: POWER_UP, CONNECTED, STACKED no-
value (Deprecated. SC devices only), STACKED_WITH_DOC_INFO (New event. SC devices only)
and POWER_UP_COMPLETE.
Warning – If the disconnect timeout is set too low, the host may receive the DISCONNECTED and
CONNECTED event during a reset.
Note – During any of these scenarios, if the device supports the “Note Retrieved” functionality, the
NOTE_RETRIEVED event will be issued once the user removes a note from the mouth of the bill
acceptor. This event will occur after the associated REJECTED / RETURNED event. This feature is
supported on newer software versions for the SC family of devices.
It is also important to note that if the “AutoStack” property is set, no ESCROW event will be raised. This
setting is not recommended if the host intends to save the note values in order to handle power up
policies properly.
NOTE – The MPOST ‘Bill’ Object should only be retrieved immediately after an escrow or stacked event;
its value could be unexpectedly reset at any future time.
If the device loses power while it is accepting a valid currency, the API can act differently depending on
the location and status of the note as well as the Power Up Policy that was defined when the connection
was established with the API (policy A, B or C)
Series 2000 devices do not support this advanced control over the document at power up. These devices
will return the note during any unexpected case involving power hits or extended communications loss.
If the note has not reached the escrow position, when communications are re-established, the API will
issue the ESCROWED event with the correct note value. At this point, it is normal operations. If the
“AutoStack” property is set, there will not be an ESCROW event and the API will immediately transition
to the stacking state.
If communications are lost while the note is in escrow and the API fails to issue the escrowStack() or
escrowReturn() function call, the ERROR_ON_SEND_MESSAGE event will be raised. This should signal to
the host to repeat the last operation as long as the device is connected. Note – if the “AutoStack”
property was set to true and the device failed to send the stack message, it is up to the host to re-try
this command.
If communications are lost after the device has been told to stack a valid note, the STACKED message
(with correct value) will be issued once communications are re-established. The same behavior can be
expected if returning a note: the RETURNED event will occur once communications resume.
Series 2000 devices do not support advanced control over the document after an extended
communications loss. These devices will return any note that has not been stacked.
If the device is able to clear the jam by issuing a reset, expect a REJECTED event in addition to the
JAM_CLEARED event. The rejected event will not be raised if the user manually clears the jam (provided
that the jam is visible by the user and does not require them to remove the bill acceptor).
The JAM_CLEARED event will be raised during power up if the jam requires an operator to visit the
machine and manually remove the jam by disconnecting the bill acceptor. Note that this JAM_CLEARED
event will only occur on power up if the API has not been shut down as well.
If the jam remains during a power loss or reset, the JAM_DETECTED event will be re-raised during the
power up procedure to ensure the host is informed of the status. It will also be resent after the
CONNECTED event if communications are lost long enough to trigger the DISCONNECTED event.
If the failure remains during a power loss or reset, the FAILURE_DETECTED event will be re-raised during
the power up procedure to ensure the host is informed of the status. It will also be resent after the
CONNECTED event if communications are lost long enough to trigger the DISCONNECTED event.
If the stacker full status remains during a power loss or reset, the STACKER_FULL event will be re-raised
during the power up procedure to ensure the host is informed of the status. It will also be resent after
the CONNECTED event if communications are lost long enough to trigger the DISCONNECTED event.
A cassette inserted is the default status of a bill acceptor. If the cassette is ever missing, even on initial
communications with the device, the CASSETTE_REMOVED event will be raised.
5.2.1 .NET
The .NET event handling should make use of the ‘InvokeRequired’ property of the hosts implementing
class. The following code example depicts the proper use of this keyword: