28.04.2015 Views

MC75 AT Command Set

MC75 AT Command Set

MC75 AT Command Set

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>MC75</strong> <strong>AT</strong> <strong>Command</strong> <strong>Set</strong><br />

10.5 <strong>AT</strong>^SISR<br />

s<br />

(num)<br />

Indicates whether or not data are available for reading with <strong>AT</strong>^SISR.<br />

0 No data available for reading.<br />

1 New data are available and can be read by sending the <strong>AT</strong>^SISR command.<br />

While the service is open this URC appears each time when new data are<br />

available again. This eliminates the need to poll for fresh data.<br />

2 Data transfer has been finished (all data have been read) and the service can<br />

be closed with <strong>AT</strong>^SISC.<br />

(num)<br />

Optional third parameter of the "^SISR" URC displayed only if the Socket service uses UDP.<br />

The UDP protocol requires that data are received in the same order that they were sent from the remote host.<br />

Consequently, the reception of each datagram must be completed before the next datagram can be received.<br />

This may be a problem if the buffer of the host application is limited and not designed to handle the maximum<br />

packet size of 1500 bytes. To compensate this, the host is advised to request, via , an<br />

amount less or equal its maxmimum buffer capacity and wait for the resulting "^SISR" URC with parameter<br />

. The benefit of this approach is that the host may properly receive all parts of a<br />

UDP datagram, as after each received data part the number of remaining bytes is synchronized, until reading<br />

the datagram is finished.<br />

If the currently read datagram is smaller than the number of bytes requested by the host the <br />

parameter is omitted.<br />

0 Indicates that all bytes of the current UDP datagram are read.<br />

1...(max. data size)-1<br />

Indicates that the currently read UDP datagram is not yet complete. The displayed<br />

value is the remaining number of bytes.<br />

is unequal 0 until reading all parts of the current<br />

datagram is finished.<br />

10.5.1 Example: Socket host reads small amounts of UDP data packets<br />

This section applies only to the Socket service using the UDP protocol. The example shows how to read UDP<br />

packets if the buffer of the host application can handle only a few bytes. There are two datagrams available for<br />

reading.<br />

Buffer size: 6 bytes<br />

Datagram A = 18 bytes (content "THIS_IS_D<strong>AT</strong>AGRAM_A")<br />

Datagram B = 3 bytes (content "NEW")<br />

^SISR: 0,1<br />

at^sisr=0,6<br />

^SISR: 0,6,12<br />

THIS_I<br />

OK<br />

at^sisr=0,6<br />

^SISR: 0,6,6<br />

S_D<strong>AT</strong>A<br />

OK<br />

at^sisr=0,6<br />

^SISR: 0,6,0<br />

GRAM_A<br />

OK<br />

at^sisr=0,6<br />

Service profile 0 is configured for Socket service and UDP. The URC<br />

notifies host that data are available for reading.<br />

The host requests to read 6 bytes.<br />

The first 6 bytes of datagram A are confirmed and transmitted. Another<br />

12 bytes are still available.<br />

The host requests to read the next part of 6 bytes.<br />

The next 6 bytes of datagram A are confirmed and transmitted. Another<br />

6 bytes are still available.<br />

The host requests to read the next part of 6 bytes.<br />

Last part of datagram A was received, no remainder is left.<br />

Again, the host requests to read 6 bytes. This time, the URC refers to<br />

datagram B which has only 3 bytes. As the read datagram is smaller<br />

than the size requested by the host, the URC does not include the<br />

.<br />

<strong>MC75</strong>_<strong>AT</strong>C_V01.001 Page 256 of 475 6/2/05<br />

Confidential / Released

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!