You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IP_TYPE field would become the COMM_TYPE field, with 3 denoting serial communication. When the type is 3, the IP field would become the device path, and the PORT field would become a comma-separated list of settings.
Adding Modbus RTU support would require modifications not only to the handle_request code but also to the filtering code. This would involve adding a device field to match on Modbus RTU requests, as the current setup expects ip and port fields.
Another approach could be to implement a TCP-to-serial gateway directly within the program. This would allow multiple devices to be configured and mapped to available IPs on the device. While this approach doesn't require protocol changes and offers a more static configuration, it addresses security concerns related to specifying a device by path within the protocol. These security concerns could be mitigated by restricting the program's access to relevant devices using basic filesystem permissions.
An example of a configuration structure if we were to implement a TCP to serial gateway.
config serial_gateway
option ip '192.168.1.100'# Assign an IP for the serial gateway
option port '502'# TCP port for the gateway
option device '/dev/ttyUSB0'# Serial device path
option baudrate '9600'# Baud rate for serial communication
option parity 'none'# Parity setting (none, even, odd)
option stop_bits '1'# Number of stop bits
option data_bits '8'# Number of data bits
option slave_id '2'# Slave ID for this serial device
The text was updated successfully, but these errors were encountered:
For clarity, the Teltonika (at least as it is implemented on the TRB145) method for this is: 1 <COOKIE> <SERIAL_DEVICE_ID> <TIMEOUT> <SERVER_ID> <MODBUS_FUNCTION> <FIRST_REGISTER> <REGISTER_COUNT/VALUES>, where the leading 1 specifies RTU rather than 0 for TCP. SERIAL_DEVICE_ID points to the serial configuration that is set up on the Teltonika modem.
While Modbus RTU is not currently supported in the protocol, it is possible to extend the system to include this feature.
Current protocol;
New protocol:
The IP_TYPE field would become the COMM_TYPE field, with 3 denoting serial communication. When the type is 3, the IP field would become the device path, and the PORT field would become a comma-separated list of settings.
Adding Modbus RTU support would require modifications not only to the
handle_request
code but also to the filtering code. This would involve adding a device field to match on Modbus RTU requests, as the current setup expectsip
andport
fields.Another approach could be to implement a TCP-to-serial gateway directly within the program. This would allow multiple devices to be configured and mapped to available IPs on the device. While this approach doesn't require protocol changes and offers a more static configuration, it addresses security concerns related to specifying a device by path within the protocol. These security concerns could be mitigated by restricting the program's access to relevant devices using basic filesystem permissions.
An example of a configuration structure if we were to implement a TCP to serial gateway.
The text was updated successfully, but these errors were encountered: