Telit EZ10-GPRS/-PCS
Product Description
80269ST10014a, Rev. 3 – 26/09/05
Reproduction forbidden without written authorization by Telit Communications S.p.A.
Page 47 of 74
All Rights reserved – Right of modification reserved
Input parameter is a Python integer which is 0 if setting RTS to OFF or 1 if setting RTS to ON.
No return value.
Example:
MDM.setRTS(1)
sets RTS to ON in AT command handling.
3.3.5.1.12 MDM.setDTR()
Sets Data Terminal Ready (DTR) in AT command interface.
Input parameter is a Python integer which is 0 if setting DTR to OFF or 1 if setting DTR to ON.
No return value.
Example:
MDM.setDTR(0)
sets DTR to OFF in AT command handling.
3.3.5.2 SER built-in module
SER built-in module is the interface between Python core and the device serial port over the
RXD/TXD pins direct handling.
You need to use SER built-in module if you want to send data from Python script to serial port and
to receive data from serial port ASC0 to Python script.
This serial port handling module can be used for example to interface the module with an external
device such as a GPS and read/send it's data (NMEA for example).
If you want to use SER built-in module you need to import it first:
import SER
then you can use SER built-in module methods like in the following example:
a = SER.SetSpeed('9600')
b = SER.send('test')
c = SER.sendbyte(0x0d)
d = SER.receive(10)
which sends 'test' followed by CR and receives data waiting for one second.
More details about SER built-in module methods are in the following paragraphs.
3.3.5.2.1 SER.send(string)
Sends a string to the serial port TXD/RXD.
Input parameter string is a Python string which is the string to send to serial port ASC0.
Return value is a Python integer which is -1 if an error occurred otherwise is 1.
Example:
a = SER.send('test')
sends string 'test' to serial port ASC0 handling, assigning return value to a.
3.3.5.2.2 SER.receive(timeout)
Receives a string from serial port TXD/RXD waiting for it until timeout is expired.
Input parameter timeout is a Python integer which is the value in 1/10 s to wait for a string from
serial port before timeout expires.