Child pages
  • FancyModbus Library & Tools

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


SVN: svn+ssh://




These packages are standalone programs to deal with the modbus protocol:


Code Block
titleInstalling the fancymodbus tools and simulator
apt-get install fancymodbus-tool fancymodbus-simulator

Library only

If you only need the library, install the following packages:

Code Block
titleInstall fancymodbus shared library components
apt-get install libfancymodbus1 libfancymodbus

Debug symbols

All packages have a counterpart containing debug symbols for gdb:

Code Block
titleInstall fancymodbus debug symbols
fancymodbus-tool-dbg fancymodbus-simulator-dbg libfancymodbus-dbg

Using the command line tool

Read Output Bits

The fancymodbus-tool client lets you read and write DO output bits/coils using the following commands:

Code Block
fancymodbus-client writeDO 1 0x105 1 0 1 0 1
fancymodbus-client readDO 1 0x105 5

These example reads and writes 5 output bits starting with address 0x105.

If you do not want to conenct to the locally listening fancymodbus-simulator, you need to specify the IP of a real device like

Configuring fancymodbus-simulator

Edit /etc/fancymodbus/simulator.conf and change the listen port or the number of registers.

For the most part you should not need to edit the default configuration, which listens to and provides for 512 registers of each kind.

Activate the daemon in /etc/default/fancymodbus-simulator

Code Block
titleActivate fancymodbus-simulator in /etc/default/fancymodbus-simulator
# set to yes if you want automatic starting

Start the daemon

Code Block
titleStarting the fancymodbus-simulator daemon
/etc/init.d/fancymodbus-simulator start

The daemon logs it's diagnostics to /var/log/syslog