Issue with pyserial using same settings as a serial com program
I hope you all can help me with this. I am trying to switch from a serial communications program to a python script for controlling some ASCII serial displays (Vorne M1000 120). As far as I can see it, the configurations are identical and I see no errors, but my code does not work and the program does. Hopefully you all have some ideas:
Python code:
import serial
ser = serial.Serial()
ser.baudrate = 19200
ser.port = 'COM2'
ser.timeout = None
print(ser)
ser.open()
ser.write(b'<ESC>01A<ESC>5F<ESC>8;0SThis<SP>display<SP>is<SP>working!<SP><SP><SP><SP><SP>Good<SP>Morning!<SP><SP><SP><SP><SP><CR>')
ser.close()
The program (Vorne Serial97) config:

Here is the manual for the display, with explanations of command structure.
Check out the table "control characters" on page 13 in the manual. Seems the stuff in angle bracket represents just one ASCII character, so e.g. for <ESC> you would use \x1b instead (which is the way to write a character in hex in python strings).