Skip to content

jakubstandarski/modbus_c_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modbus C Application

Overview

Project goal

Introduction into Modbus protocol and creation of simple server-client application.

System requirements

  • OS: Ubuntu 20.04
  • C compiler: gcc 9.3.0
  • Third party libraries: libmodbus

libmodbus installation guide

There are some steps required to perfom before You will be able to compile this project:

  1. Clone the libmodbus Github repository.
$ mkdir -p ~/workspace/third_party && cd ~/workspace/third_party/
$ git clone https://github.com/stephane/libmodbus
  1. Install libmodbus library:
$ cd libmodbus/
$ ./autogen.sh
$ ./configure && make install
  1. Create modbus.conf file in /etc/ld.so.conf.d/:
$ sudo touch /etc/ld.so.conf.d/modbus.conf

Use your favourite text editor (e.g. Vim) and populate it with /usr/local/lib/ (or other path, where libmodbus.so is placed):

$ sudo vi /etc/ld.so.conf.d/modbus.conf

Update your system linker:

$ sudo ldconfig

Now You should be able to compile the application using attached Makefile.

Build process

To build the application, just run single command:

$ make all

The application executables should be placed inside ./build/ directory.

To remove them, run:

$ make clean

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published