Technical information

Chapter 2: AT+i Commands Reference
May 31, 2008 AT+i Commands Reference Manual 2-37
+iSSND[%] - Send a Byte Stream to a Socket
Note: When W24 is in checksum mode, it calculates the checksum of the data received from
host and compares it with checksum sent by host. If the two match, the result code is
I/OK. Otherwise, I/ERROR (228) is returned and the data discarded. If host attempts to
send more than 2048 bytes, I/ERROR (227) is returned.
The Socket Command Abort may be used to abort prematurely.
Syntax: AT+iSSND[%]:<hn>,<sz>:<stream>[<checksum>]
Sends a byte stream of size sz to the socket specified by the socket
handle hn.
Parameters:
<hn> A TCP/UDP socket handle of an open socket.
<sz> The exact size of the byte stream that follows.
<stream> A byte stream of size sz to be sent to the specified socket. When
W24 is in checksum mode (CKSM set to 1) or when sending data
over an SSL socket, sz is limited to 2048 bytes.
<checksum> A two-byte checksum. Checksum is calculated by summing all the
characters in stream modulo 65536 and taking two's complement of
the result. Checksum is sent as big-endian. This parameter must be
appended by the host application when W24 is in checksum mode.
Command Options:
<hn> Must have been obtained by a previous execution of an AT+iSTCP
or AT+iSUDP command during the current Internet mode session.
Or a socket accepted by a listening socket.
<sz> 0..4GB
<stream> An 8-bit byte stream of exactly size sz. If sz is larger than 256 bytes,
W24 assumes host flow control. Depending on the setting of the
FLW parameter, the flow control mode is either software or
hardware.
Under software flow control mode, the host processor must respond
to W24's flow control characters. The flow control protocol is
detailed in the "Host -> W24 Software Flow Control" section.
Under hardware flow control, the ~CTS/~RTS RS232 control
signals must be connected and the host must respond to W24's
~CTS signal. The host may send data only when the ~CTS signal is
asserted (active low).
% When the auto flush (%) flag is specified, the socket is
automatically flushed immediately after receiving the stream.
Otherwise, data is transmitted to the Internet only in integral
quantities of the specified Maximum Transfer Unit (MTU) or when
the AT+iSFSH command is issued.
Result Code:
I/OK<CR><LF><CR><LF> After sz bytes have been transferred successfully to the socket's
output buffer.
I/ERROR Otherwise.