/
Starting Modbus with Debug Level Tracing Enabled

Starting Modbus with Debug Level Tracing Enabled

With SmartServer 4.4 and higher, you can start the Modbus driver with debug level tracing enabled by following the steps below. Debug levels are DEBUG, ERROR, INFO (which is more verbose than WARN, but less verbose than DEBUG) and WARNAll logs are stored in /var/log/smartserver/smartserver-modbus.log.

  1. Open a terminal connection to SmartServer IoT.

  2. Stop the Modbus driver by entering the following command:

    ssctl stop modbus

    A result similar to the following appears:

    Example result
    modbus                             inactive since Tue 2024-07-09 12:27:24 EDT; 58ms ago
  3. Open the smartserver-modbus.service file by entering the following command:

    sudo nano /lib/systemd/system/smartserver-modbus.service

    The smartserver-modbus.service file appears.



  4. Append the ExecStart= line with --log-level <level> where <level> is DEBUG, ERRORINFO, or WARN.

    Example
    ExecStart=/usr/bin/apollo/modbus/echmodbus --log-level DEBUG
    


  5. Enter the following reload command:

    sudo systemctl daemon-reload


  6. Restart the Modbus driver by entering the following command:

    ssctl start modbus

    A result similar to the following appears:

    Example result
    modbus                             active since Tue 2024-07-09 12:47:48 EDT; 61ms ago

Related content

IOX Modbus Software Setup (Release 3.3 and Prior)
IOX Modbus Software Setup (Release 3.3 and Prior)
More like this
(Optional) Add a Modbus Interface (TCP/RTU)
(Optional) Add a Modbus Interface (TCP/RTU)
More like this
Setting up the Modbus RTU Channel (Release 3.3 and Prior)
Setting up the Modbus RTU Channel (Release 3.3 and Prior)
More like this
(Optional) Creating a Modbus Device Interface (XIF) Definition (Release 3.1)
(Optional) Creating a Modbus Device Interface (XIF) Definition (Release 3.1)
More like this
IOX Modbus Software Setup
IOX Modbus Software Setup
More like this