Wireshark for Modbus RTU: How to Capture and Decode Serial RS-485 Traffic

By | April 14, 2026

Wireshark is known as an Ethernet protocol analyzer. But it can also capture Modbus RTU traffic over RS-485 serial links — using a free extension called WiresharkSerialAdapter.

This is not a built-in feature. Wireshark does not natively capture from COM ports. You need a USB-to-RS-485 adapter connected to the bus as a passive listener, plus the WiresharkSerialAdapter extension and a DLT configuration that tells Wireshark to decode the incoming serial bytes as Modbus RTU frames.

Once configured, Wireshark decodes every Modbus RTU frame — slave address, function code, register addresses, data values, and CRC-16 — exactly like it does for Modbus TCP. The same modbus.* display filters work on RTU frames.

This guide walks through the full setup: hardware connection, extension installation, COM port configuration, DLT mapping, display filters, and how to troubleshoot Modbus RTU problems using the captured data.

1. What You Need

ItemPurpose
Wireshark (latest version)Protocol analyzer
WiresharkSerialAdapter extensionEnables serial COM port capture in Wireshark
USB-to-RS-485 adapterConnects your computer to the RS-485 bus
RS-485 wiring to the existing busPassive listen-only connection

The USB-to-RS-485 adapter must be connected as a passive listener — wired in parallel on the A/B lines of the existing Modbus RTU bus. It does not transmit. It only receives.

2. How Modbus RTU Appears in Wireshark

Once configured, Wireshark shows Modbus RTU frames with two protocol layers:

LayerWhat It Shows
Modbus RTU (mbrtu)Unit ID (slave address), CRC-16, CRC status
Modbus (modbus)Function code, register addresses, data values, exception codes

The Info column shows:

Query: Unit: 1, Func: 3: Read Holding Registers
Response: Unit: 1, Func: 3: Read Holding Registers
Query: Unit: 2, Func: 6: Write Single Register
Response: Unit: 2, Func: 6: Write Single Register

This is almost identical to Modbus TCP, except there is no MBAP header. Instead, you see the Unit ID and CRC-16 from the RTU frame.

3. Hardware Setup: Connecting to the RS-485 Bus

Wiring

Connect the USB-to-RS-485 adapter in parallel to the existing Modbus RTU bus:

  • A (Data+) on the adapter → A (Data+) on the bus
  • B (Data-) on the adapter → B (Data-) on the bus
  • GND on the adapter → GND on the bus (recommended)

The adapter is a passive listener. It does not transmit, so it will not interfere with existing communication.

Important

  • The adapter must use the same baud rate, parity, and stop bits as the existing Modbus RTU devices.
  • If the adapter is at the end of the bus, it may need a 120Ω termination resistor. If it is tapped in the middle of the bus, no termination is needed.
  • Note which COM port Windows assigns to the adapter (check Device Manager → Ports).

4. Installing the WiresharkSerialAdapter Extension

Wireshark does not capture from serial ports by default. The WiresharkSerialAdapter extension adds this capability.

Step 1. Download

Go to: github.com/jzhvymetal/WiresharkSerialAdapter

Navigate to the latest version folder (e.g., VSCODE_v6) and download WiresharkSerialAdapter.exe.

Step 2. Install

Copy WiresharkSerialAdapter.exe to the following folder:

C:\Program Files\Wireshark\extcap\wireshark

If the wireshark subfolder inside extcap does not exist, create it.

Step 3. Verify

Restart Wireshark. On the start screen, you should see a new capture interface:

Serial Port Adapter (WireSharkSerialAdapter.exe)

If it does not appear, check that the file is in the correct folder and that Wireshark has been restarted.

5. Configuring the COM Port in Wireshark

Click the settings icon next to “Serial Port Adapter (WireSharkSerialAdapter.exe)” on the Wireshark start screen.

Configure the following settings to match your Modbus RTU network:

SettingValueNotes
PortCOM7 (example)The COM port assigned to your USB-to-RS-485 adapter
Baud Rate9600, 19200, 38400, etc.Must match the Modbus RTU bus baud rate
Byte Size8Standard for Modbus RTU
ParityEVEN, ODD, or NONEMust match the bus configuration
Stop Bits1 or 2Must match the bus configuration
Interframe Timing DetectionEventRecommended setting
Interframe TimebaseMultiplier: 1X Modbus CharacterBased on the Modbus RTU 3.5-character silence specification
Interframe Multiplier3.03.0× character time = standard Modbus RTU interframe gap
Interframe Delay (µs)0.0Leave at 0 unless you have specific timing issues
Interframe CorrectionModbus CRCUses CRC validation to correct frame boundaries
Wireshark DLT147: User DLTThis maps to User 0 in the DLT_User protocol settings

Click Save.

⚠️ Critical: If the baud rate, parity, or stop bits do not match the bus, Wireshark will capture garbage data or no data at all.

6. Configuring DLT 147 for the mbrtu Dissector

The WiresharkSerialAdapter sends raw serial bytes to Wireshark using DLT 147 (User 0). You must tell Wireshark to decode these bytes as Modbus RTU frames.

Step 1. Open Preferences

Go to Edit → Preferences → Protocols → DLT_USER

Step 2. Edit the Encapsulations Table

Click Edit next to “Encapsulations Table.” Click the + button to add a new entry.

Step 3. Configure the Entry

FieldValue
DLTUser 0 (DLT=147)
Payload dissectormbrtu
Header size0
Header dissector(empty)
Trailer size0
Trailer dissector(empty)

Step 4. Apply

Click OK to close the DLT table, then OK again to close Preferences.

Now Wireshark knows that any data arriving on DLT 147 should be decoded using the mbrtu (Modbus RTU) dissector.

7. Starting a Capture

  1. On the Wireshark start screen, double-click Serial Port Adapter (WireSharkSerialAdapter.exe)
  2. Wireshark starts capturing from the COM port
  3. If the Modbus RTU bus is active, you should see frames appearing immediately
  4. The Protocol column shows Modbus RTU
  5. The Info column shows the function code and register information
  6. Stop the capture by clicking the red Stop button
  7. Save the capture: File → Save As → choose a filename with .pcapng extension

8. Display Filters for Modbus RTU

The mbrtu dissector has its own filters for the RTU-specific fields. The standard modbus.* filters work for function codes, register addresses, and data values.

All filters verified against the official Wireshark Modbus RTU Display Filter Reference and Modbus Display Filter Reference.

Modbus RTU Filters (mbrtu)

FilterWhat It Shows
mbrtuAll Modbus RTU frames
mbrtu.unit_idUnit ID (slave address) field
mbrtu.unit_id == 1Only traffic to/from slave address 1
mbrtu.unit_id == 2Only traffic to/from slave address 2
mbrtu.crc16CRC-16 value
mbrtu.crc16.statusCRC-16 check status
mbrtu.crc16.incorrectFrames with incorrect CRC

Modbus Application Layer Filters (same as Modbus TCP)

FilterWhat It Shows
modbus.func_code == 3Read Holding Registers (FC 03)
modbus.func_code == 4Read Input Registers (FC 04)
modbus.func_code == 6Write Single Register (FC 06)
modbus.func_code == 16Write Multiple Registers (FC 16)
modbus.func_code >= 128All exception responses
modbus.exception_codeException code value
modbus.exception_code == 2Illegal Data Address exceptions
modbus.reference_numRegister address
modbus.reference_num == 100Requests targeting register 100
modbus.dataResponse data bytes

Combination Examples

All traffic to slave 1 with exception responses:

mbrtu.unit_id == 1 && modbus.func_code >= 128

Only FC 03 requests to slave 5:

mbrtu.unit_id == 5 && modbus.func_code == 3

Frames with CRC errors:

mbrtu.crc16.incorrect

9. How to Read a Decoded Modbus RTU Frame

Click on a Modbus RTU frame. The packet detail pane shows two sections:

Modbus RTU Section

Modbus RTU
    Unit ID: 1
    CRC-16: 0xB5C4
    [CRC-16 Status: Good]

Modbus Section (same as TCP)

For a Read Holding Registers request:

Modbus
    .000 0011 = Function Code: Read Holding Registers (3)
    Reference Number: 100
    Word Count: 6

For the response:

Modbus
    .000 0011 = Function Code: Read Holding Registers (3)
    [Request Frame: 43]
    [Time from request: 0.248228000 seconds]
    Byte Count: 12
    Register 105 (UINT16): 6867
    Register 106 (UINT16): 0
    Register 107 (UINT16): 3
    Register 108 (UINT16): 0
    Register 109 (UINT16): 89
    Register 110 (UINT16): 3400

Wireshark automatically links the request and response frames. Click [Request Frame: 43] to jump to the matching request.

10. Filtering by Slave Address (Unit ID)

On a busy Modbus RTU bus with many slaves, isolating traffic for one device is essential.

Filter: mbrtu.unit_id == 2

This shows only frames addressed to or from slave 2. You can then save the filtered view to a separate file: File → Export Specified Packets → Displayed to create a smaller capture file for analysis or sharing.

11. Diagnosing No Response from a Slave

Filter: mbrtu.unit_id == <slave address>

What You SeeCauseFix
Query frames but no Response framesSlave is not respondingCheck slave power, wiring, and address configuration
No frames at all for this addressMaster is not polling this slaveCheck master configuration
Query sent to wrong addressMaster is configured with wrong slave addressVerify the address in the master/SCADA configuration
Response from a different slave addressSlave address conflict — two devices with the same addressAssign unique addresses to all devices on the bus

12. Diagnosing CRC Errors

Filter: mbrtu.crc16.incorrect

CRC errors mean the frame was corrupted during transmission. Common causes:

CauseFix
Electrical noise on RS-485 cableUse shielded twisted pair. Route cable away from power cables.
Missing or wrong terminationAdd 120Ω termination resistor at each end of the bus.
Baud rate mismatchVerify all devices use the same baud rate.
Parity mismatchVerify all devices use the same parity setting.
Cable too longRS-485 supports up to 1200 m at 9600 baud. Reduce distance or lower baud rate.
Bad connector or loose wiringCheck all RS-485 connections and crimps.
A/B wires swappedSome manufacturers label A/B differently. Try swapping.

💡 Tip: If you see CRC errors only on responses from one specific slave, the problem is likely near that device — check its wiring and connectors.

13. Diagnosing Timing and Interframe Issues

Modbus RTU uses silence on the bus to detect frame boundaries. The standard requires 3.5 character times of silence between frames. At 9600 baud, this is approximately 4 ms.

Timing Problems in Wireshark

SymptomCauseFix
Frames split into two fragmentsInterframe gap inside a frame (character delay too long)Check RS-485 converter. Some USB adapters add latency.
Two frames merged into oneInterframe gap too short between request and responseSlave is responding too fast. Adjust interframe multiplier in WiresharkSerialAdapter settings.
Garbled or undecodable framesBaud rate mismatch between adapter and busVerify baud rate matches exactly.

Adjusting Interframe Settings

If frames are not being detected correctly, adjust the WiresharkSerialAdapter settings:

  • Interframe Multiplier: Try increasing from 3.0 to 4.0 or 5.0 if frames are splitting
  • Interframe Correction → Modbus CRC: This uses CRC validation to correct frame boundaries — recommended for most setups

14. Diagnosing Wrong Data Values

Filter: mbrtu.unit_id == <slave> && modbus.func_code == 3

Click on the response frame and check register values:

SymptomCauseFix
Register values correct in Wireshark but wrong in SCADASCADA data type or byte order wrongCheck UINT16 vs INT16 vs FLOAT32 and byte order in SCADA
Register values are 0Wrong register addressCheck the zero-based offset (register 40001 = address 0)
Values change but do not match device displayWrong scale factor in SCADAApply the correct scale factor from the register map

For a full guide on register addressing, see: Modbus Register Map Explained

15. Alternative: Capturing Modbus RTU with a Python Script (Linux)

On Linux, an alternative to WiresharkSerialAdapter is a Python script that reads from the serial port and writes pcap data to a FIFO pipe that Wireshark reads.

Tools available on GitHub:

Basic Setup (Linux)

bash

pip install pyserial
python3 serial-pcap.py -b 19200 --fifo /tmp/wireshark

Then in Wireshark: Capture → Options → Manage Interfaces → Pipes → + → add /tmp/wireshark as a pipe.

Configure the DLT_User encapsulation table the same way as described in Section 6 (DLT 147 → mbrtu).

16. Common Modbus RTU Problems and What They Look Like in Wireshark

ProblemWireshark SymptomFilter
Slave not respondingQuery frames with no matching Responsembrtu.unit_id == <addr> — check for responses
Wrong slave addressResponses from unexpected addressmbrtu.unit_id — check all Unit IDs
Address conflictTwo responses to one querymbrtu.unit_id == <addr> — look for overlapping responses
CRC errorsFrames flagged with incorrect CRCmbrtu.crc16.incorrect
Wrong register addressException code 02 in responsemodbus.exception_code == 2
Wrong function codeException code 01 in responsemodbus.exception_code == 1
Baud rate mismatchNo decodable frames or all CRC errorsVerify adapter baud rate matches bus
Parity mismatchCRC errors on every frameVerify adapter parity matches bus
Interframe timingFrames split or merged incorrectlyAdjust interframe multiplier in adapter settings
Wrong data type in SCADAValues correct in Wireshark but wrong in SCADACheck data type and byte order in SCADA software

Summary

Wireshark can capture Modbus RTU over RS-485 serial links using the free WiresharkSerialAdapter extension and a USB-to-RS-485 adapter.

The key setup steps:

  1. Install WiresharkSerialAdapter.exe in C:\Program Files\Wireshark\extcap\wireshark
  2. Configure the COM port — baud rate, parity, and stop bits must match the bus
  3. Set DLT 147 → mbrtu in Edit → Preferences → Protocols → DLT_USER
  4. Double-click the Serial Port Adapter to start capturing

The key filters:

  • Use mbrtu to see all Modbus RTU frames
  • Use mbrtu.unit_id == <address> to filter by slave address
  • Use mbrtu.crc16.incorrect to find CRC errors
  • Use modbus.func_code, modbus.exception_code, and modbus.reference_num for application-layer analysis — these work the same as for Modbus TCP

💡 Tip: Use the free Modbus Frame Decoder Tool to decode any Modbus RTU frame byte by byte — including slave address, function code, register addresses, data values, and CRC-16 validation.

For Modbus TCP analysis, see: Wireshark for Modbus TCP: How to Capture, Filter, and Troubleshoot

Author: Zakaria El Intissar

I'm an automation and industrial computing engineer with 12 years of experience in power system automation, SCADA communication protocols, and electrical protection. I build tools and write guides for Modbus, DNP3, IEC 101/103/104, and IEC 61850 on ScadaProtocols.com to help engineers decode, analyze, and troubleshoot real industrial communication systems.

Leave a Reply

Your email address will not be published. Required fields are marked *