Monitoring via Modbus

From Teltonika Networks Wiki
Revision as of 09:55, 6 December 2017 by Dziugas (talk | contribs) (Created page with "Router monitoring via Modbus TCP Linux guide applies to RUT950 and RUT955 routers. ==Summary== '''Modbus''' is a serial communications protocol originally published by Modic...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

Router monitoring via Modbus TCP Linux guide applies to RUT950 and RUT955 routers.

Summary

Modbus is a serial communications protocol originally published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs). Modbus has become a de facto standard communication protocol and is now a commonly available means of connecting industrial electronic devices. The main reasons for the use of Modbus in the industrial environment are:

  • developed with industrial applications in mind,
  • openly published and royalty-free,
  • easy to deploy and maintain,
  • moves raw bits or words without placing many restrictions on vendors.

Modbus enables communication among many devices connected to the same network, for example, a system that measures temperature and humidity and communicates the results to a computer. Modbus is often used to connect a supervisory computer with a remote terminal unit (RTU) in supervisory control and data acquisition (SCADA) systems. Many of the data types are named from its use in driving relays: a single-bit physical output is called a coil, and a single-bit physical input is called a discrete input or a contact.

This chapter is a guide on how to use Modbus TCP to monitor RUT950 and RUT955 routers using a Linux Operating System.

Configuring the router

In order to start using Modbus TCP, we must first configure the router. Modbus TCP configuration from the router's side is very simple. All you need to do is log in to the router's WebUI, go to Services → Mobdus, Enable the Modbus TCP service, enter a Port number through which the Modbus TCP communication will take place and Allow remote access if you wish to connect to the router remotely (from WAN).

Installing the right software

Next you'll need software capable of communicating via Modbus TCP. The software that we'll be using in this guide is called modbus-cli. To get it you'll first have to install ruby:

$ sudo apt-get install ruby
$ gem instal modbus-cli