I have 2 devices connected to Weighting terminal CAS-CI200A via RS-232:
- Lenovo notebook with Kubuntu 20.04 (x86_64 architecture)
- Jetson Xavier NX with Ubuntu 18.04 LTS, JetPack 4.5 (aarch64 architecture)
import serial
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=9600,
parity=serial.PARITY_EVEN,
stopbits=1,
bytesize=8
)
line = ser.readline()
print(line)
Result of the same pyserial library for both devices is:
- for Lenovo:
b'ERR 13\r\n'
- for Jetson:
b'\x05\x1f\x12\x1f\x12\x1f\x1e\x1e\x0c\x06\r\n'
Also I try to use: cat /dev/ttyUSB0
results are the same.
Task is to get b'ERR 13\r\n'
from Jetson.
I try to .decode()
the line b'\x05\x1f\x12\x1f\x12\x1f\x1e\x1e\x0c\x06\r\n'
, but still no success:
The only difference between the devises is architecture and OS version, the library and the code are the same.
Does anyone know the way to get correct response?