Serial communication handling for USB devices on Venus OS

When a USB serial device (e.g., battery BMS) is connected to a Venus OS system:

  1. Do we need to open and close the serial connection repeatedly for communication cycles?

  2. Or is it better to open the serial port once and keep it open as long as the device is connected?

  3. In systems with multiple batteries over serial (multiple ttyUSBx devices):

    • Should each connection be managed independently and kept open?
  4. Is there any risk or downside to keeping the serial port open continuously?

  5. Are there recommended practices from Victron for handling serial communication in drivers?

A well know bms one.

Hi,

When using non-standard serial devices with your own driver / service, this service should open the com port once and keep it open as long as the device (/battery) is connected. This is what all the regular Victron services also do.

To make this work properly, ideally it also works together with serialstarter (/opt/victronenergy/serial-starter/… on your GX).

With kind regards,
Thiemo van Engelen