5 mdm.receivebyte(timeout), 6 mdm.readbyte(), 7 mdm.getdcd() – Rainbow Electronics GM862-GPS User Manual
Page 22

Easy Script
in Python
80000ST10020a Rev.8 - 01/10/08
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
page 22 of 100
sends byte 0x0d, that stands for
value to b.
2.2.5 MDM.receivebyte(timeout)
This command receives a byte from AT command interface waiting for it until timeout is expired.
Request to Send (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 integer which is -1 if timeout expired without any data received otherwise is
the byte value received. It can also be zero.
Example:
b = MDM2.receivebyte(20)
receives a byte from AT command handling, possibly waiting for it for 2.0 s, assigning return value to
b.
2.2.6 MDM.readbyte()
This command receives a byte 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 integer which is -1 if no data received otherwise is the byte value received. It
can also be zero.
Example:
b = MDM.readbyte()
receives a byte from AT command handling, assigning return value to b.
2.2.7 MDM.getDCD()
This command gets Carrier Detect (DCD) from AT command interface. It has no input parameter.
Return value is a Python integer which is 0 if DCD is OFF or 1 if DCD is ON.
Example:
cd = MDM.getDCD()
gets DCD from AT command handling, assigning return value to cd.