User's Manual

Table Of Contents
Flow Control
AT+i Programmer‘s Manual Version 8.32 24-1
24 Flow Control
24.1 Host
iChip Software Flow Control
When issuing an
AT+iEMB command to generate a binary e-mail, an AT+iSSND
command to transfer data to a socket, an AT+iTBSN to send a binary stream to a Telnet
server, or an AT+iFSND command to transfer a file, the host transfers a binary data
stream to iChip. At times, this stream may be very large.
Once iChip establishes a connection, it acts as a pipeline, transferring data received from
the host to the Internet. However, the data rates at the host and Internet ends are not
always balanced. This happens for several reasons:
While iChip logs onto the Internet and establishes a connection, the host proceeds to
send its data stream to iChip. During this time iChip receives data from the host, but
cannot send it out.
When sending MIME attachments, iChip encodes the binary data using base 64. This
roughly inflates binary data by 30%. Thus, more data needs to be transmitted than is
received from the host.
When using a TCP/IP socket, iChip might need to re-transmit packets.
The amount of buffer space available in the iChip to accommodate for this imbalance is
limited. Therefore, a flow control scheme is required to regulate hostiChip
communications. The FLW parameter is set to reflect the preferred flow control mode.
The software-driven flow control protocol is defined as follows:
1. While the host is transferring the binary stream,following the +iEMB, +iSSND, or
+FSND prefixes, iChip issues a ‗WAIT‘ control character when it needs to pause the
host. The host application is required to monitor its serial receive line and pause the
transmission when a ‗WAIT‘ control character is received.
2. To resume the host transmission, iChip issues a ‗CONTINUE‘ control character. The
host is required to monitor its receive line after being paused in anticipation of this
control character. Once received, the host might continue to transfer the data stream.
3. If an error occurs during the Internet session while the host is transferring the data
stream (or while paused), iChip issues an ‗ERROR‘ control character if some error
occurred. Immediately after issuing this control character, iChip aborts the Internet
session and issues an ‗I/ERROR (error number)‘ string. The host must cease
transmitting the data stream when the ‗ERROR‘ control character is received.