I have to send ZANE:1:00004:XX_X.X_XXXX_000XX:\\r\\n
via serial communication with python.
here is my code:
import serial
ser = serial.Seria
Your device is probably not terminating its response with a newline character. the .readline() method is expecting a newline terminated string. See here: http://pyserial.sourceforge.net/shortintro.html#readline for more info.
try setting a timeout on your serial connection
ser.timeout = 10
and replace the ser.readline() with ser.read(n) where n is the number of characters you wish to read. ser.read(100) will try to read 100 characters. If 100 characters don't arrive within 10 seconds, it will give up and return whatever it has received.