UART1 (ttyTHS1) Rx, payload corrupted

Hey all,

I’m currently trying to read data through UART1 (ttyTHS1) from Victron BlueSolar MPPT 75/15, but the info received gets corrupted. I just tried out same communication between Jetson Nano and LoPy4, which it works without problems. Also checked received data on LoPy from Victron BlueSolar and it also read it clearly.

To be specific, i would appreciate if anyone could help me out to understand what I’m missing with or which documentation should I read. To be clear, I’m a newbie and just a electronics technician.

Source → GitHub - JetsonHacksNano/UARTDemo: UART Demo Code
Code snippet from Jetson (Python3):

better look at → CodePile | Easily Share Piles of Code

#!/usr/bin/python3
import time
import serial

def TF_init_uart():
serial_port = serial.Serial(
port="/dev/ttyTHS1",
baudrate=19200,
bytesize=serial.EIGHTBITS,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
#timeout = 10
)
return (serial_port)

def TF_checker( to_check ):
return ((to_check >= 48 and to_check <= 57) or (to_check >= 65 and to_check <= 90)
or (to_check >= 9 and to_check <= 15) or (to_check == 45) or (to_check >= 97 and to_check <= 125))

def main():
prompt = “”
uart = TF_init_uart()
time.sleep(1)
while True:
recv = uart.read()
for iter in recv:
if (TF_checker(iter)):
prompt += chr(iter)
print(prompt)

main()

Used HW:
-Jetson Nano 2GB
-Victron BlueSolar MPPT 75/15 BlueSolar MPPT 75/10, 75/15 & 100/15 (12 / 24 Volt + load output) - Victron Energy

Testing HW:
-LoPy4 LoPy 4

hello lukas31,

the default baudrate settings is 115200/8n1, please try update the settings for confirmation,
thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.