ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=unicode" http-equiv=Content-Type> <META content="MSHTML 5.00.2314.1000" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY> <DIV><FONT size=2>Peter </FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT size=2>A typical approach to packaging the data might be as follows:-</FONT></DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Courier size=2><STRONG>Protocol Detail</STRONG></FONT></DIV> <DIV><FONT face=Courier size=2><BR><STRONG>Enquiry</STRONG></FONT></DIV> <DIV><FONT face=Courier size=2><STRONG><BR></STRONG>The enquiry message is used for sending commands and data.</FONT></DIV> <DIV><FONT face=Courier size=2><BR>ENQ &lt; cc &gt; STX &lt; data &gt; ETX &lt; BCC &gt; EOT</FONT></DIV> <DIV><FONT face=Courier size=2><BR>or</FONT></DIV> <DIV><FONT face=Courier size=2><BR>ENQ &lt; cc &gt; EOT if no data</FONT></DIV> <DIV><FONT face=Courier size=2><BR><STRONG>Acknowledgement</STRONG></FONT></DIV> <DIV><FONT face=Courier size=2><BR>The acknowledgment message is used to respond to an Enquiry either with or without data.</FONT></DIV> <DIV><FONT face=Courier size=2><BR>ACK &lt; cc &gt; STX &lt; data &gt; ETX &lt; BCC &gt; EOT</FONT></DIV> <DIV><FONT face=Courier size=2><BR>or</FONT></DIV> <DIV><FONT face=Courier size=2><BR>ACK EOT</FONT></DIV> <DIV><FONT face=Courier size=2><BR><STRONG>Error</STRONG></FONT></DIV> <DIV><FONT face=Courier size=2><BR>The error message is used to indicate a bad Enquiry</FONT></DIV> <DIV><FONT face=Courier size=2><BR>NAK &lt;ee&gt; EOT</FONT></DIV> <DIV><FONT face=Courier size=2><BR>Where&nbsp; cc - 2 digit command code as described in following section<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data - ascii data (no ascii control between 0 and $1f)</FONT></DIV> <DIV><FONT face=Courier size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ee - error code<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 01 - bad BCC<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 02 - bad command<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 03 - access denied<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 04 - bad data<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bcc&nbsp; - STX xor data0 xor data1 ... xor ETX<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; represented as two hex digits.&nbsp;&nbsp; <BR></DIV></FONT> <DIV><FONT face=Courier size=2><STRONG>Example</STRONG></FONT></DIV> <DIV><FONT face=Courier size=2><STRONG><BR></STRONG>Data sent - Send Password - KAZAM<BR>&nbsp;&nbsp;05&nbsp; 30&nbsp; 30&nbsp; 02&nbsp; 4b&nbsp; 41&nbsp; 5a&nbsp; 41&nbsp; 4d&nbsp; 03&nbsp; 35&nbsp; 44&nbsp; 04<BR>Received -&nbsp; ACK EOT<BR>&nbsp;&nbsp;06&nbsp; 04</FONT></DIV> <DIV><FONT face=Courier size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Courier size=2><FONT face=Arial>Paul Lowman</FONT></FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=Courier size=2><FONT face=Arial>Software/Hardware developer<BR>Lowman Consulting</FONT><BR></DIV></FONT></BODY></HTML>

Reply via email to