MDM2.sendbyte(byte, timeout)

This command sends a byte to the AT command interface.

The first input parameter byte can be zero or any Python byte to send to the AT command interface.

The second input parameter timeout is a Python integer, measured in 1/10s, and is important in online mode when flow control is activated. In fact it represents the maximum time to wait for the byte to be sent to the AT command interface when buffer is full and flow control blocks further data. The timeout range is (0 ÷ 32767).

This method returns immediately after the byte has been sent to the AT interface or after the timeout period if the byte could not be sent to the AT interface. The return value is a Python integer which is -1 if the timeout expired, 1 otherwise.

Example:

 

b = MDM2.sendbyte(0x0d, 0)

 

sends byte 0x0d, that is <CR>, to AT command handling, without waiting, assigning the return value to b.