The driver will send a serial command to the BMS for it’s hardware version.
If it does get a reply and the reply is properly terminated then it will stick to that serial device. It will try this 3 times (0.5 seconds apart)
However if after 3 attempts it does not get an reply or the reply is not correct it will exit the driver.
Log when it fails and exit:
INFO:main:dbus-serialbattery
ERROR:main:>>> ERROR: No reply - returning
ERROR:main:>>> ERROR: No reply - returning
ERROR:main:>>> ERROR: No reply - returning
ERROR:main:ERROR >>> No battery connection at /dev/ttyUSB2
Log when it does connect successfully:
INFO:main:dbus-serialbattery
INFO:main:SP15S008C-L15S-100A
INFO:main:Battery connected to dbus from /dev/ttyUSB2
The USB serial cable’s manufacturer and product description are used by the venusOS to know which drivers to start for that device. If the name was incorrect then it might not start the correct driver.