serial-dlt-hub is a tool that provides a TCP network interface, allowing multiple clients to connect and interact with multiple serial devices that offer a DLT (Diagnostic Log and Trace) interface. By acting as a bridge between network clients and serial DLT sources, it enables multiple consumers to access DLT messages from serial devices that would otherwise only support a single consumer.
- Supports connecting to multiple serial ports to receive DLT messages
- Allows multiple clients to connect via TCP
- Forwards all received DLT messages to every connected TCP client
- Each DLT message received from a serial device is updated to include an ECU ID
- ECU IDs of DLT messages can be configured individually for each device
- DLT commands received from clients are forwarded to the appropriate serial device if the command includes the configured ECU ID
-
Create configuration:
All parameters are configured via a configuration file. The following shows an example:
[network] # Network interface and port for incoming TCP connections addr = "0.0.0.0:3490" # Serial device configuration for device1 [serial.device1] # ECU ID to assign to DLT messages from device1 id = "DEV1" # Path to the serial port for device1 device = "/dev/ttyUSB0" # Baud rate for the serial connection baudrate = 115200 # Serial device configuration for another device [serial.device2] id = "DEV2" device = "/dev/ttyUSB1" baudrate = 115200
-
Run the hub:
By default, the hub searches for a configuration file named
config.tomlin the current working directory. You can specify a different configuration file using the--configcommand-line argument:serial-dlt-hub --config path/to/your-config.toml
Use
--helpto see all available options.