<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://sdkwiki.wizarpos.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xuyin</id>
	<title>wizarPOS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://sdkwiki.wizarpos.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xuyin"/>
	<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Special:Contributions/Xuyin"/>
	<updated>2026-05-03T01:59:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2927</id>
		<title>MDB Communication Protocal</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2927"/>
		<updated>2022-07-22T10:59:13Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This doc defines a serial communication protocol between the application running on Q3v and MDB Vending machine.&lt;br /&gt;
Overall,the q3v low level hardware will forwarding the mdb request from the vendg machine,and forward to the Android application as serial data,&lt;br /&gt;
When the app tackle all the request serial data, the q3v pos could be regarded as a MDB cashless slave device.&lt;br /&gt;
And also,the application could request some config command, e.g. &amp;quot;get firmware version&amp;quot;,Therefore the protocol is 2-way-direction,&lt;br /&gt;
and there is a mode byte indicates the direction.&lt;br /&gt;
&lt;br /&gt;
== Serial Protocol Packet Definition ==&lt;br /&gt;
=== Serial Port parameters ===&lt;br /&gt;
* Baud rate 115200&lt;br /&gt;
* 8bit, 1 stop bit, and no parity&lt;br /&gt;
=== Packet format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Start code || Length || mode || Data || Checksum || End code&lt;br /&gt;
|}&lt;br /&gt;
* &#039;&#039;&#039;Start code&#039;&#039;&#039; 		size 1 byte, always be 0x09&lt;br /&gt;
* &#039;&#039;&#039;Length&#039;&#039;&#039; size: 1byte, the number bytes of mode, data, and checksum.&lt;br /&gt;
* &#039;&#039;&#039;Mode&#039;&#039;&#039; 	size: 1, 0x00 means a master request packet, 0x01 means a slave response packet, other value is prohibited.&lt;br /&gt;
* &#039;&#039;&#039;Data 	&#039;&#039;&#039;size: n bytes. The data could be raw MDB commands, such as SETUP, VEND(please refer the &amp;lt;Multi-Drop Bus Protocol V4.3&amp;gt;for detials).&amp;lt;br&amp;gt;&lt;br /&gt;
Or the MIB control commands, such as GET VERSION, SET PARAMETER.&lt;br /&gt;
* &#039;&#039;&#039;Checksum&#039;&#039;&#039; size: 1byte, using LRC algorithm, input data were &amp;quot;mode, data&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Specifics ==&lt;br /&gt;
=== MDB Forwarding mechanism ===&lt;br /&gt;
The q3v will forward all the MDB cashless device commands,except the the POLL command,the request and response procedure can be described in following steps:&lt;br /&gt;
# VMC Send MDB request to q3v&lt;br /&gt;
# q3v receive the step 1 data,get rid the 9th mdb mode bit,fill into serial packet &#039;&#039;&#039;data&#039;&#039;&#039; part,sending the serial packet to application.&lt;br /&gt;
# The application will listen to to the serial port all the time,after receiving step 2 serial data,unwrap it to mdb request data,handle it, and wrap its mdb response into serial packet, sending to q3v&lt;br /&gt;
# q3v get the step 3 data, unwrap to mdb response data, add mdb mode bit,forwarding to mdb master.&lt;br /&gt;
# mdb master handle the mdb slave response&lt;br /&gt;
&lt;br /&gt;
Taking the &#039;&#039;&#039;RESET&#039;&#039;&#039; for example&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; q3v: 0x110 0x10&#039;&#039;&lt;br /&gt;
# &#039;&#039;q3v -&amp;gt; app: 0x09 0x04 0x00 0x10 0x10 0xE0 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;app -&amp;gt; q3v: 0x09 0x04 0x01 0x00 0x00 0xFF 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;q3v -&amp;gt; VMC: 0x00 0x100&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; q3v: 0x00&#039;&#039;&lt;br /&gt;
=== Application notes ===&lt;br /&gt;
* App need to focus on step 2,3 list above&lt;br /&gt;
* It&#039;s application&#039;s own task to tackle all cashless command except the POLL&lt;br /&gt;
* When the cashless reader is ready for transaction, it lunch a &#039;&#039;&#039;begin session&#039;&#039;&#039; command,to notify the VMC&lt;br /&gt;
* mdb raw data including its checksum byte(try to make different with the serial frame checksum )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A typical MDB transacrion flow ==&lt;br /&gt;
[[File:Mdb flow chart.png|frame|center|MDB transacrion flow]]&lt;br /&gt;
&lt;br /&gt;
== Protocol command definition ==&lt;br /&gt;
=== common mdb forwarding command  ===&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command for forwarding the raw MDB commands (Including the &lt;br /&gt;
MDB CHK), Note that the MDB mode bit has been removed&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Data&lt;br /&gt;
|-&lt;br /&gt;
| Request 00H || VMC Request Command&lt;br /&gt;
(Reset,Setup,Reader,Expansion,Vend)&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Response packet&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode!! Data&lt;br /&gt;
|-&lt;br /&gt;
| Response 01H || Peripheral Response&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
q3v -&amp;gt; app 09 04 00 10 10 E0 0D &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
q3v &amp;lt;- app 09 04 01 00 00 FF 0D.&lt;br /&gt;
=== Begin session command  ===&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
When app ready for transaction, it will issue a begin session command, to inform the VMC master. &lt;br /&gt;
it is the beginning of one transaction.&lt;br /&gt;
Balance amount: 2 Bytes, if balance does not exist, it should be filled with 0xFF.&lt;br /&gt;
This command still obeys the MDB spec definition, however it is request by app&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Data&lt;br /&gt;
|-&lt;br /&gt;
| Request 00H || Begin Session (03H) + Funds Available + MDB Checksum&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Response packet&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode!! Data&lt;br /&gt;
|-&lt;br /&gt;
| Response 01H || ACK 00H&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
q3v &amp;lt;- app 09 06 00 03 00 64 67 32 0d &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
q3v -&amp;gt; app 09 03 01 00 ff 0d&lt;br /&gt;
=== session cancel request -0x04  ===&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
App can end the payment session by issue a session cancel request command, pos is in master mode during the command.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Data&lt;br /&gt;
|-&lt;br /&gt;
| Request 00H || Cancel Session Req(04H) + Funds Available + Checksum&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;Response packet&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode!! Data&lt;br /&gt;
|-&lt;br /&gt;
| Response 01H || ACK 00H&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2926</id>
		<title>MDB Communication Protocal</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2926"/>
		<updated>2022-07-22T10:33:22Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This doc defines a serial communication protocol between the application running on Q3v and MDB Vending machine.&lt;br /&gt;
Overall,the q3v low level hardware will forwarding the mdb request from the vendg machine,and forward to the Android application as serial data,&lt;br /&gt;
When the app tackle all the request serial data, the q3v pos could be regarded as a MDB cashless slave device.&lt;br /&gt;
And also,the application could request some config command, e.g. &amp;quot;get firmware version&amp;quot;,Therefore the protocol is 2-way-direction,&lt;br /&gt;
and there is a mode byte indicates the direction.&lt;br /&gt;
&lt;br /&gt;
== Serial Protocol Packet Definition ==&lt;br /&gt;
=== Serial Port parameters ===&lt;br /&gt;
* Baud rate 115200&lt;br /&gt;
* 8bit, 1 stop bit, and no parity&lt;br /&gt;
=== Packet format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Start code || Length || mode || Data || Checksum || End code&lt;br /&gt;
|}&lt;br /&gt;
* &#039;&#039;&#039;Start code&#039;&#039;&#039; 		size 1 byte, always be 0x09&lt;br /&gt;
* &#039;&#039;&#039;Length&#039;&#039;&#039; size: 1byte, the number bytes of mode, data, and checksum.&lt;br /&gt;
* &#039;&#039;&#039;Mode&#039;&#039;&#039; 	size: 1, 0x00 means a master request packet, 0x01 means a slave response packet, other value is prohibited.&lt;br /&gt;
* &#039;&#039;&#039;Data 	&#039;&#039;&#039;size: n bytes. The data could be raw MDB commands, such as SETUP, VEND(please refer the &amp;lt;Multi-Drop Bus Protocol V4.3&amp;gt;for detials).&amp;lt;br&amp;gt;&lt;br /&gt;
Or the MIB control commands, such as GET VERSION, SET PARAMETER.&lt;br /&gt;
* &#039;&#039;&#039;Checksum&#039;&#039;&#039; size: 1byte, using LRC algorithm, input data were &amp;quot;mode, data&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Specifics ==&lt;br /&gt;
=== MDB Forwarding mechanism ===&lt;br /&gt;
The q3v will forward all the MDB cashless device commands,except the the POLL command,the request and response procedure can be described in following steps:&lt;br /&gt;
# VMC Send MDB request to q3v&lt;br /&gt;
# q3v receive the step 1 data,get rid the 9th mdb mode bit,fill into serial packet &#039;&#039;&#039;data&#039;&#039;&#039; part,sending the serial packet to application.&lt;br /&gt;
# The application will listen to to the serial port all the time,after receiving step 2 serial data,unwrap it to mdb request data,handle it, and wrap its mdb response into serial packet, sending to q3v&lt;br /&gt;
# q3v get the step 3 data, unwrap to mdb response data, add mdb mode bit,forwarding to mdb master.&lt;br /&gt;
# mdb master handle the mdb slave response&lt;br /&gt;
&lt;br /&gt;
Taking the &#039;&#039;&#039;RESET&#039;&#039;&#039; for example&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; q3v: 0x110 0x10&#039;&#039;&lt;br /&gt;
# &#039;&#039;q3v -&amp;gt; app: 0x09 0x04 0x00 0x10 0x10 0xE0 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;app -&amp;gt; q3v: 0x09 0x04 0x01 0x00 0x00 0xFF 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;q3v -&amp;gt; VMC: 0x00 0x100&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; q3v: 0x00&#039;&#039;&lt;br /&gt;
=== Application notes ===&lt;br /&gt;
* App need to focus on step 2,3 list above&lt;br /&gt;
* It&#039;s application&#039;s own task to tackle &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A typical MDB transacrion flow ==&lt;br /&gt;
[[File:Mdb flow chart.png|frame|center|MDB transacrion flow]]&lt;br /&gt;
&lt;br /&gt;
== Protocol command definition ==&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2925</id>
		<title>MDB Communication Protocal</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2925"/>
		<updated>2022-07-22T10:24:44Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This doc defines a serial communication protocol between the application running on Q3v and MDB Vending machine.&lt;br /&gt;
Overall,the q3v low level hardware will forwarding the mdb request from the vendg machine,and forward to the Android application as serial data,&lt;br /&gt;
When the app tackle all the request serial data, the q3v pos could be regarded as a MDB cashless slave device.&lt;br /&gt;
And also,the application could request some config command, e.g. &amp;quot;get firmware version&amp;quot;,Therefore the protocol is 2-way-direction,&lt;br /&gt;
and there is a mode byte indicates the direction.&lt;br /&gt;
&lt;br /&gt;
== Serial Protocol Packet Definition ==&lt;br /&gt;
=== Serial Port parameters ===&lt;br /&gt;
* Baud rate 115200&lt;br /&gt;
* 8bit, 1 stop bit, and no parity&lt;br /&gt;
=== Packet format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Start code || Length || mode || Data || Checksum || End code&lt;br /&gt;
|}&lt;br /&gt;
* &#039;&#039;&#039;Start code&#039;&#039;&#039; 		size 1 byte, always be 0x09&lt;br /&gt;
* &#039;&#039;&#039;Length&#039;&#039;&#039; size: 1byte, the number bytes of mode, data, and checksum.&lt;br /&gt;
* &#039;&#039;&#039;Mode&#039;&#039;&#039; 	size: 1, 0x00 means a master request packet, 0x01 means a slave response packet, other value is prohibited.&lt;br /&gt;
* &#039;&#039;&#039;Data 	&#039;&#039;&#039;size: n bytes. The data could be raw MDB commands, such as SETUP, VEND(please refer the &amp;lt;Multi-Drop Bus Protocol V4.3&amp;gt;for detials).&amp;lt;br&amp;gt;&lt;br /&gt;
Or the MIB control commands, such as GET VERSION, SET PARAMETER.&lt;br /&gt;
* &#039;&#039;&#039;Checksum&#039;&#039;&#039; size: 1byte, using LRC algorithm, input data were &amp;quot;mode, data&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MDB Forwarding mechanism ==&lt;br /&gt;
The q3v will forward all the MDB cashless device commands,except the the POLL command,the request and response procedure can be described in following steps:&lt;br /&gt;
# VMC Send MDB request to q3v&lt;br /&gt;
# q3v receive the step 1 data,get rid the 9th mdb mode bit,fill into serial packet &#039;&#039;&#039;data&#039;&#039;&#039; part,sending the serial packet to application.&lt;br /&gt;
# The application will listen to to the serial port all the time,after receiving step 2 serial data,unwrap it to mdb request data,handle it, and wrap its mdb response into serial packet, sending to q3v&lt;br /&gt;
# q3v get the step 3 data, unwrap to mdb response data, add mdb mode bit,forwarding to mdb master.&lt;br /&gt;
# mdb master handle the mdb slave response&lt;br /&gt;
&lt;br /&gt;
Taking the &#039;&#039;&#039;RESET&#039;&#039;&#039; for example&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; q3v: 0x110 0x10&#039;&#039;&lt;br /&gt;
# &#039;&#039;q3v -&amp;gt; app: 0x09 0x04 0x00 0x10 0x10 0xE0 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;app -&amp;gt; q3v: 0x09 0x04 0x01 0x00 0x00 0xFF 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x00 0x100&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x00&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A typical MDB transacrion flow ==&lt;br /&gt;
[[File:Mdb flow chart.png|frame|center|MDB transacrion flow]]&lt;br /&gt;
&lt;br /&gt;
== Protocol command definition ==&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2924</id>
		<title>MDB Communication Protocal</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2924"/>
		<updated>2022-07-22T08:31:41Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This manual describes the serial communication protocol between Q3v and MDB Interface Board, which will be short as &amp;quot;MIB&amp;quot; in follow content.&lt;br /&gt;
The basic baud rate of serial port is set as 115200.&lt;br /&gt;
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.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Protocol Packet Definition ==&lt;br /&gt;
=== Serial Port parameters ===&lt;br /&gt;
* Baud rate 115200&lt;br /&gt;
* 8bit, 1 stop bit, and no parity&lt;br /&gt;
=== Packet format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Start code || Length || mode || Data || Checksum || End code&lt;br /&gt;
|}&lt;br /&gt;
* &#039;&#039;&#039;Start code&#039;&#039;&#039; 		size 1 byte, always be 0x09&lt;br /&gt;
* &#039;&#039;&#039;Length&#039;&#039;&#039; size: 1byte, the number bytes of mode, data, and checksum.&lt;br /&gt;
* &#039;&#039;&#039;Mode&#039;&#039;&#039; 	size: 1, 0x00 means a master request packet, 0x01 means a slave response packet, other value is prohibited.&lt;br /&gt;
* &#039;&#039;&#039;Data 	&#039;&#039;&#039;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).&amp;lt;br&amp;gt;&lt;br /&gt;
Or the MIB control commands, such as GET VERSION, SET PARAMETER.&lt;br /&gt;
* &#039;&#039;&#039;Checksum&#039;&#039;&#039; size: 1byte, using LRC algorithm, input data were &amp;quot;mode, data&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MDB Forwarding mechanism ==&lt;br /&gt;
MIB will forward all the MDB cashless device commands (MDB spec section 7), except VMC request Poll.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking the RESET for example, the transfer steps can be described as below.&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x110 0x10&#039;&#039;&lt;br /&gt;
# &#039;&#039;MIB -&amp;gt; Q3V: 0x09 0x04 0x00 0x10 0x10 0xE0 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x00 0x100&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x00&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== A typical MDB transacrion flow ==&lt;br /&gt;
[[File:Mdb flow chart.png|thumb]]&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=File:Mdb_flow_chart.png&amp;diff=2923</id>
		<title>File:Mdb flow chart.png</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=File:Mdb_flow_chart.png&amp;diff=2923"/>
		<updated>2022-07-22T08:31:07Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mdb typical transaction flow chart&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2922</id>
		<title>MDB Communication Protocal</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2922"/>
		<updated>2022-07-22T08:26:49Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This manual describes the serial communication protocol between Q3v and MDB Interface Board, which will be short as &amp;quot;MIB&amp;quot; in follow content.&lt;br /&gt;
The basic baud rate of serial port is set as 115200.&lt;br /&gt;
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.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Protocol Packet Definition ==&lt;br /&gt;
=== Serial Port parameters ===&lt;br /&gt;
* Baud rate 115200&lt;br /&gt;
* 8bit, 1 stop bit, and no parity&lt;br /&gt;
=== Packet format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Start code || Length || mode || Data || Checksum || End code&lt;br /&gt;
|}&lt;br /&gt;
* &#039;&#039;&#039;Start code&#039;&#039;&#039; 		size 1 byte, always be 0x09&lt;br /&gt;
* &#039;&#039;&#039;Length&#039;&#039;&#039; size: 1byte, the number bytes of mode, data, and checksum.&lt;br /&gt;
* &#039;&#039;&#039;Mode&#039;&#039;&#039; 	size: 1, 0x00 means a master request packet, 0x01 means a slave response packet, other value is prohibited.&lt;br /&gt;
* &#039;&#039;&#039;Data 	&#039;&#039;&#039;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).&amp;lt;br&amp;gt;&lt;br /&gt;
Or the MIB control commands, such as GET VERSION, SET PARAMETER.&lt;br /&gt;
* &#039;&#039;&#039;Checksum&#039;&#039;&#039; size: 1byte, using LRC algorithm, input data were &amp;quot;mode, data&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MDB Forwarding mechanism ==&lt;br /&gt;
MIB will forward all the MDB cashless device commands (MDB spec section 7), except VMC request Poll.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking the RESET for example, the transfer steps can be described as below.&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x110 0x10&#039;&#039;&lt;br /&gt;
# &#039;&#039;MIB -&amp;gt; Q3V: 0x09 0x04 0x00 0x10 0x10 0xE0 0x0D&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x00 0x100&#039;&#039;&lt;br /&gt;
# &#039;&#039;VMC -&amp;gt; MIB: 0x00&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2921</id>
		<title>MDB Communication Protocal</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2921"/>
		<updated>2022-07-22T07:51:36Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This manual describes the serial communication protocol between Q3v and MDB Interface Board, which will be short as “MIB” in follow content.&lt;br /&gt;
The basic baud rate of serial port is set as 115200&lt;br /&gt;
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.&lt;br /&gt;
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.&lt;br /&gt;
== MDB Forwarding mechanism ==&lt;br /&gt;
MIB will forward all the MDB cashless device commands (MDB spec section 7), except VMC request Poll.&lt;br /&gt;
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.&lt;br /&gt;
Taking the RESET for example, the transfer data flow can be described as below.&lt;br /&gt;
* VMC -&amp;gt; MIB: 0x110 0x10&lt;br /&gt;
* MIB -&amp;gt; Q3V: 0x09 0x04 0x00 0x10 0x10 0xE0 0x0D&lt;br /&gt;
* MIB -&amp;gt; Q3V: 0x09 0x04 0x01 0x00 0x00 0xFF 0x0D&lt;br /&gt;
* VMC -&amp;gt; MIB: 0x00 0x100&lt;br /&gt;
* VMC -&amp;gt; MIB: 0x00&lt;br /&gt;
== Protocol Packet Definition ==&lt;br /&gt;
=== Serial Port parameters ===&lt;br /&gt;
* Baud rate 115200&lt;br /&gt;
* 8bit, 1 stop bit, and no parity&lt;br /&gt;
=== Packet format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Start code || Length || mode || MDB Raw Data || Checksum || End code&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2918</id>
		<title>MDB Communication Protocal</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=MDB_Communication_Protocal&amp;diff=2918"/>
		<updated>2022-07-22T06:52:01Z</updated>

		<summary type="html">&lt;p&gt;Xuyin: Created page with &amp;quot;== Introductio == This doc defines a serial protocol for Q3V application to communicate with MDB vending machine. Basically, the protocol is a f === Heading text ===&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductio ==&lt;br /&gt;
This doc defines a serial protocol for Q3V application to communicate with MDB vending machine.&lt;br /&gt;
Basically, the protocol is a f&lt;br /&gt;
=== Heading text ===&lt;/div&gt;</summary>
		<author><name>Xuyin</name></author>
	</entry>
</feed>