MDB Communication Protocal: Difference between revisions

From wizarPOS
No edit summary
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/cloudpos-sdk/mdb-communication-protocal}}")
Tag: Replaced
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction ==
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/cloudpos-sdk/mdb-communication-protocal}}
This manual describes the serial communication protocol between Q3v and MDB Interface Board, which will be short as "MIB" in follow content.
The basic baud rate of serial port is set as 115200.
As the Q3 Pos could be receive command from MIB as a slave, and also could send command to MIB as a master (e.g., send “begin session” command to inform the MDB VMC it’s ready for pay), a mode byte was added in serial frame to show if a command is slave response or a master request.
The request command always anticipates a response command except the checksum is wrong, or the incorrect serial format, in another word, the slave will use silence as a NAK.
 
 
== Protocol Packet Definition ==
=== Serial Port parameters ===
* Baud rate 115200
* 8bit, 1 stop bit, and no parity
=== Packet format ===
{| class="wikitable"
|-
| Start code || Length || mode || Data || Checksum || End code
|}
* '''Start code''' size 1 byte, always be 0x09
* '''Length''' size: 1byte, the number bytes of mode, data, and checksum.
* '''Mode''' size: 1, 0x00 means a master request packet, 0x01 means a slave response packet, other value is prohibited.
* '''Data '''size: n bytes. The data could be raw MDB commands, such as SETUP, VEND(please refer the Multi-Drop Bus Protocol V4.3 for detials).<br>
Or the MIB control commands, such as GET VERSION, SET PARAMETER.
* '''Checksum''' size: 1byte, using LRC algorithm, input data were "mode, data"
 
 
== MDB Forwarding mechanism ==
MIB will forward all the MDB cashless device commands (MDB spec section 7), except VMC request Poll.<br>
 
When the MIB receive the VMC request, it removes the MDB mode bit, fill into serial packet data area, and transmit to serial port. In the opposite direction, the MIB receive the response, it unwraps the packet, and adding mode bit to the tail bytes, sending to the VMC, wait for the acknowledge.<br>
 
Taking the RESET for example, the transfer steps can be described as below.
# ''VMC -> MIB: 0x110 0x10''
# ''MIB -> Q3V: 0x09 0x04 0x00 0x10 0x10 0xE0 0x0D''
# ''VMC -> MIB: 0x00 0x100''
# ''VMC -> MIB: 0x00''
 
== A typical MDB transacrion flow ==
[[File:Mdb flow chart.png|thumb]]

Latest revision as of 05:30, 8 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/cloudpos-sdk/mdb-communication-protocal

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!