Telit EZ10-GPRS/-PCS
Product Description
80269ST10014a, Rev. 3 – 26/09/05
Reproduction forbidden without written authorization by Telit Communications S.p.A.
Page 48 of 74
All Rights reserved – Right of modification reserved
Return value is a Python string which is an empty string if timeout expired without any data
received otherwise is the string containing data received.
Example:
a = SER.receive(15)
receives a string from serial port handling, waiting for it for 1.5 s, assigning return value to a.
3.3.5.2.3 SER.read()
Receives a string from serial port TXD/RXD without waiting for it.
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.
Example:
a = SER.read()
receives a string from serial port handling, assigning return value to a.
3.3.5.2.4 SER.sendbyte(byte)
Sends a byte to serial port TXD/RXD.
Input parameter byte is a Python byte which is any byte value to send to serial port. It can be zero.
Return value is a Python integer which is -1 if an error occurred otherwise is 1.
Example:
b = SER.sendbyte(0x0d)
sends byte 0x0d, that is CR, to serial port handling, assigning return value to b.
3.3.5.2.5 SER.receivebyte(timeout)
Receives a byte 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 byte from
serial port before timeout expires.
Return value is a Python integer which is -1 if timeout expired without any data received otherwise
is the byte value received. It can be zero.
Example:
b = SER.receivebyte(20)
receives a byte from serial port handling, waiting for it for 2.0 s, assigning return value to b.
3.3.5.2.6 SER.readbyte()
Receives a byte from serial port TXD/RXD without waiting for it.
No input parameter.
Return value is a Python integer which is -1 if no data received otherwise is the byte value
received. It can be zero.
Example:
b = SER.readbyte()
receives a byte from serial port handling, assigning return value to b.
3.3.5.2.7 SER.SetSpeed(speed, <char format>)
Sets serial port TXD/RXD speed. Default serial port TXD/RXD speed is 9600.