beautypg.com

3 mdm.read(), 4 mdm.sendbyte(byte, timeout) – Rainbow Electronics GM862-GPS User Manual

Page 21

background image





Easy Script

in Python

80000ST10020a Rev.8 - 01/10/08

Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved

page 21 of 100

(RTS) is set to ON. Input parameter timeout is a Python integer, which is measured in 1/10s, and
represents the maximum time of waiting for the string from AT command interface.
Return value is a Python string which is an empty string if timeout has expired without any data
received otherwise the string contains data received.

Example:

a = MDM.receive(15)

receives a string from AT command handling, possibly waiting for it for 1.5 s, assigning return value to
a.

NOTE: The buffer available for MDM.receive command is 4096 bytes

3

2.2.3 MDM.read()

This command receives a string from AT command interface without waiting for it. Request to Send
(RTS) is set to ON. It has no input parameter.
Return value is a Python string which is an empty string if no data received otherwise is the string
containing data received in the moment when command is activated.

Example:

a = MDM.read()

receives a string from AT command handling, assigning return value to a.

NOTE:
The buffer available for MDM.read command is 4096 bytes

4

2.2.4 MDM.sendbyte(byte, timeout)

This command sends a byte to AT command interface. First input parameter byte is any Python byte
that will be to send to AT command interface. It can also be zero. Second input parameter timeout is a
Python integer, which is measured in 1/10s, and represents the maximum time of waiting for the string
from AT command interface. Waiting time is caused by hardware flow control.
Return value is a Python integer which is -1 if timeout expired otherwise is 1.

Example:

b = MDM.sendbyte(0x0d, 0)

3

For the products with the following old Order-Num. 3390250656, 3390250654 and 3990150466 the available

buffer is 2048 bytes