Skip to content

Simple server for translating Modbus RTU (over serial line) to Modbus TCP and vice versa.

Notifications You must be signed in to change notification settings

HenryNe/mrtu2mtcp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Simple server for translating Modbus RTU (over serial line) to Modbus TCP and vice versa.

Requirements:
libmodbus ver. 2.9.3, tested 3.0.1

Compilation:
gcc -Wall -I/usr/include/modbus -o mrtu2mtcp mrtu2mtcp.c -lmodbus -lrt

Usage:
$ ./mrtu2mtcp -h
Usage: ./mrtu2mtcp [options]
Possible options:
-s rtu_slave_address (default 1)
-S usb_device (default /dev/ttyUSB0)
-b baudrate (default 9600)
-y parity posible values: N,E,O (default E)
-n number_of_transport_bits (default 8)
-B number_of_stop_bits (default 1)
-A ip_address to bind (default 127.0.0.1)
-p port to bind (default 1502)
-v be verbose if present
-l log_file (NOT IMPLEMENTED)
-d demonize if present (NOT IMPLEMENTED)

Example:
mrtu2mtcp -S /dev/ttyR1 -A 0.0.0.0 -p 502 -v

Have fun!

About

Simple server for translating Modbus RTU (over serial line) to Modbus TCP and vice versa.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%