I've been struggling the past week to make sense of the RS232 serial data that I received from my physiological monitor. I'm following the owner's manual instruction for baud rate, parity, stop bits, and so on. The monitor sends the CSV data in ASCII format. It recommends using HyperTerminal, but I would like to do it through python. I've connected to the RS232 and received data back, but It looks like bytes, and I'm unsure how to convert this to human-readable characters. Any pointers would be greatly appreciated. Thank you
import serial
ser = serial.Serial(
port='/dev/rfcomm0',
baudrate=19200,
timeout=20,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
response = ser.read(10000)
print(response)
b'&\x13(M&\x13(MMM\x13(M(M\x13(M&\x13(M&\x13(MMM\x13(M(M\x13(M&\x13(M&\x13(MMM\x13(M(M\x13(M&\x13('