Sniffers, Analyzers and Serial Tools

USB serial adapters, loopback plugs, terminal and Modbus tools, serial and Ethernet sniffing, Wireshark and scope checks.

A method that works

When a link will not come up, resist changing several things at once. Work from the bottom layer up, and prove each layer before moving on: power and wiring, then electrical signal, then settings, then protocol and addresses, then the PLC program. A cheap USB adapter and a free program can answer, in minutes, the question “is the device talking at all?”, which can otherwise take hours of guessing inside the PLC software.

1Check power, cables and link lightsDoes the device have power? Is the link LED on? Is it the right port?2Confirm that both ends use the same settingsBaud, parity, stop bits, address, protocol. IP address, mask and port.3Test the cable and adaptersLoopback test, continuity, swap the cable, try another adapter.4Talk to the device with a known-good toolA Modbus master, a terminal program, or ping, instead of the PLC program.5Capture the trafficA sniffer shows whether requests go out and whether answers come back.6Read the captureNo request? No answer? Bad CRC? An exception code? Garbled bytes?7Change one thing and retestFix, repeat the capture, and write the working settings in the project.
A bottom-up path for bringing up a communication link. Stop at the first step that fails and fix it before going on.
QuestionTool that answers it
Is there a voltage on the line, and the right polarity?Multimeter
Is the line idle, and are there pulses when data is sent?Multimeter (AC/DC scale), oscilloscope
Does the device answer a simple request?PC with a USB adapter and a master tool
What bytes are really on the wire, in both directions?Serial sniffer, logic analyzer, oscilloscope with decode
Is the Ethernet device reachable?Ping, ARP, port scanner
What is the PLC really sending?Wireshark on a mirror port or a tap

USB serial adapters

Modern laptops have no serial port, so a USB adapter is the first tool to buy. Buy two or three: a USB-RS232 for programming ports and old equipment, a USB-RS485 for Modbus and drive networks, and a spare so you can build a sniffer.

ChipNotes
FTDI FT232R / FT232HThe reference choice: stable drivers, good isolation options, programmable. Counterfeit chips exist and some driver versions refuse them
Silicon Labs CP210xReliable, widely used, good drivers
WCH CH340 / CH341Cheap and common; fine for most work; the quality of the driver install varies
Prolific PL2303Many counterfeit chips: a recent driver may refuse them (a yellow warning in Device Manager). Buy from a source you trust, or avoid
  • Buy isolated for plant work. An isolated adapter protects the laptop from ground differences and surges. It costs more, but a ground loop between a laptop and a VFD panel can destroy an unisolated port.
  • Check the voltage levels. A “USB-serial” cable for a microcontroller is often 3.3 V or 5 V TTL, not RS-232. Plugging it into a ±12 V RS-232 port can damage it. Make sure the adapter says RS-232, RS-422 or RS-485.
  • RS-485 direction control. Good adapters switch the driver on and off automatically. A cheap one may need the software to control RTS, or it leaves the line driven and blocks the other devices.
  • Terminal blocks or a DB9. Screw terminals are easier to use for A, B and ground than a DB9 with a gender changer.
  • Label the COM port. Windows assigns a new port number to each adapter on each USB port; note it in Device Manager and label the adapter.

Loopback plugs, breakout boxes and null modems

ItemWhat it isWhat it proves
Loopback plugA DB9 with pin 2 joined to pin 3 (and RTS to CTS, DTR to DSR)The PC port and the driver work: what you type comes back
RS-485 loopbackA and B joined to a second adapter’s A and B on the same PCTwo adapters can talk; the software is set up correctly
Breakout boxA DB9 in-line with LEDs and jumpers for each lineWhich lines are active; swap TXD/RXD without a soldering iron
Null modem adapterCrosses TXD and RXD (pins 2 and 3)Whether a straight or crossed cable is needed
Gender changerMale–male or female–female DB9Makes a cable fit; says nothing about the signals
DB9 male port1234567891 DCD2 RXD3 TXD4 DTR5 GND6 DSR7 RTS8 CTS9 RIPins 2, 3 and 5 are all that many PLC links need.Straight-through cablePC (DTE)Device (DCE)2 RXD2 RXD3 TXD3 TXD5 GND5 GNDComputer to modem-style device: pin 2 to pin 2, 3 to 3.Null modem cable (two computers, or a PC and a PLC port that is also wired as a computer)PCPLC port2 RXD3 TXD3 TXD2 RXDTransmit must always meet receive. With twodevices of the same type, the cable has to crosspins 2 and 3 (a null modem), plus ground on 5.If nothing arrives, swap to the other cable typeor use an adapter: this is the commonestserial fault. Check the PLC manual: some portsare wired DTE, some DCE.Hardware flow control (RTS/CTS) is rarely used with PLCs; if the device asks for it, wire 7 and 8 too.
DB9 pin numbers. A loopback joins pin 2 to pin 3; a null modem crosses them.
RS-232 loopback plugDB9 plugon the adapterpin 2 RXDpin 3 TXDjumperType in a terminal: the characters appear becauseTXD goes straight back into RXD. Remove the jumper:the echo stops. The adapter, driver and software work.RS-485 test with two adaptersPCtwo COM portsAdapter 1 (COM3)Adapter 2 (COM4)A-AB-BOpen a terminal on each port with the same settings and typein one: the text appears in the other. It proves both adapters,the drivers and the settings before you go near the machine.Add a 120 ohm resistor across A and B if the test is erratic at higher baud rates. Only then connect to the real bus.
A DB9 loopback plug for RS-232, and two USB-RS485 adapters on one PC wired A to A and B to B.

Worked example: proving the PC side with a loopback

  • Join pins 2 and 3 of the adapter’s DB9 with a paper clip or a jumper.
  • Open a terminal program, select the adapter’s COM port, 9 600 baud 8N1, and type some letters.
  • The letters appear on the screen only because they come back through the loopback. If they do, the adapter, driver and software are fine; the fault is in the cable, the device or its settings.
  • Remove the loopback: the typing stops echoing. This confirms that the echo was the loopback, not the terminal’s local echo.

Terminal and master/slave test software

ToolUseNotes
PuTTY, Tera TermSimple serial terminalsGood for text protocols and quick tests; set the port, speed and parity
RealTermTerminal with a hex displayShows bytes in hex and ASCII; can send hex strings and capture to a file
DocklightSerial tester and loggerSend scripted sequences, log both directions with time stamps; free for limited use
Modbus Poll / Modbus SlaveModbus master and slave simulators (commercial, trial available)Reads and writes registers; shows the raw frames and error counts
QModMasterFree, open-source Modbus masterRTU and TCP; adequate for quick checks
mbpollFree command-line Modbus masterScriptable; works on Windows, Linux and Raspberry Pi
Vendor toolsDrive and PLC softwareMany drive tools show the communication status and error counts
  • Be the master yourself. Disconnect the PLC from the bus (two masters on one bus corrupt each other’s frames), connect the PC, and read a known register. If the PC gets an answer, the device, wiring and settings are good.
  • Be the slave. If the PLC is the master and you doubt it, connect the PC as a slave simulator with the same address and watch whether requests arrive.
  • Change one setting at a time and note the result. Writing down the sequence keeps you from going around in circles.

Sniffing a serial link

A sniffer listens to a conversation between two devices without taking part. On a serial link there are three approaches.

RS-232: one receiver per directionPLC / masterTXD pin 3Device / slaveRXD pin 2PLC to device (TX data)device to PLC (TX data)USB adapter 1RX only (COM5)USB adapter 2RX only (COM6)common ground (pin 5) to both adaptersRS-485: one adapter on the busABto the busUSB-RS485receive only (COM7)listening node: no terminatorLaptop with capture software (timestamps from all ports on one clock)RS-232: merge COM5 and COM6 in the log to see both sidesConnect only the receive pins of the adapters; never connect an adapter’s TX to the line you are monitoring.
A serial tap: the original two devices stay connected, and two receive-only adapters copy each direction into the PC.
MethodHowGood forLimits
RS-485 (party line)Connect a USB-RS485 adapter to the A/B pair and set it to receive onlyModbus RTU: master and slaves share the same wires, so one adapter sees both directionsAdd it with a short stub; do not add a third terminator; the adapter must not drive the line
RS-232 tap with two adaptersA Y-cable or breakout: the PC’s RXD pins listen to the PLC’s TXD and the device’s TXD on separate COM portsAny RS-232 linkTwo ports, two logs to merge by time stamp; do not connect the PC’s transmit pins
Software port monitorWatch a COM port that a program on the PC is already usingDebugging what the PC software is sendingOnly sees the PC’s own traffic
Logic analyzerClip leads on the TX/RX lines or the 5 V/3.3 V UART side; decode UART or ModbusTiming, gaps, and signals the PC adapter cannot captureNeeds logic-level signals; use an RS-485 receiver or a differential probe
Oscilloscope with serial decodeProbe the line; the scope decodes UARTSeeing signal quality at the same time as the bytesDifferential signals need two channels or a differential probe
  • Receive only. A tap must never transmit on the line. On RS-232 leave the sniffer’s TXD unconnected; on RS-485 turn off its driver (receive only).
  • Time stamps. With two adapters, log with time stamps so the two directions can be put in order.
  • Same settings. The sniffer must use the same baud rate and parity as the link, or it shows garbage even when the link is fine.
  • Capture to a file. A log you can search and send to the manufacturer is worth more than a moving screen.

Meter and oscilloscope checks

With a multimeter

MeasurementExpectedWhat a wrong reading means
Idle voltage A to B (power on, no traffic)About +0.2 to +5 V with bias; B positive of A on most devicesAbout 0 V means no bias, and a noisy line; a negative reading means A and B are swapped on the meter or on the bus
Resistance across A and B (power off)About 60 Ω with two 120 Ω terminatorsAbout 120 Ω: only one terminator; very high: none; very low: a short or too many terminators
Voltage during traffic (DC scale, averaging)The reading flickers slightlyA steady reading means no traffic; frozen at a rail means a device is holding the line
RS-232 idle (TXD to ground)About −5 to −12 V when idleAbout 0 V: port off or unconnected; +V: wrong polarity or an RS-485 port
Ground difference (between the two devices’ grounds)Under a few voltsMore than a few volts: the common-mode range is exceeded; add a ground wire or isolation
Shield continuityContinuous end to end, grounded at one pointBroken shield or grounded at both ends in a noisy plant

With an oscilloscope

UART logic level at the PLC pin (1 = high, 0 = low). LSB first.startD0D1D2D3D4D5D6D7stopstartD0D1D2D3D4D5D6D7stop1001 hex = 0000 000103 hex = 0000 0011104 µs per bit1.04 ms per character (10 bits)RS-485 line: A − B voltage, the same bits (idle is mark, B above A)+2 V to +5 V = 0 (space)−2 V to −5 V = 1 (mark)A − B below −200 mV is a 1; above +200 mV is a 0. Labels differ by maker: swap the wires if the data is inverted.
The letter pattern for 01 03 at 9 600 baud, 8N1: the TTL level on the top, and the differential RS-485 signal on the bottom.
Cleansharp edges, flat topsReflections (no terminator, long stub)overshoot and ringing after each edgeNoise (drive nearby, poor shield)spikes on the flat partsClean: terminate both ends, one daisy chain. Ringing: fix termination and stubs. Noise: check shield bonding, keep away fromdrive cables, use twisted pair, add isolation. A scope on the differential pair shows in a minute what hours of guessing cannot.
Three scope views of an RS-485 pair: a clean signal, reflections from a missing terminator, and noise spikes from a drive.
  • Bit time. At 9 600 baud one bit is 104 µs. Measure the shortest pulse; if it is half or double, the baud rate is wrong by that factor.
  • Idle level. The line should sit at a clean idle (mark) level between frames. A mid-level line is floating: add bias.
  • Edges. Rounded, slow edges mean too much capacitance (a long cable or no matching termination); ringing after each edge means reflections (a missing or doubled terminator, or a long stub).
  • Amplitude. RS-485 should show at least ±1.5 V differentially at the receiver. Much lower means a loaded line or a bad driver.
  • Gaps. A Modbus RTU frame must have no gap longer than 1.5 character times inside the frame, and at least 3.5 character times between frames. At 9 600 baud, that is 1.6 ms and 3.6 ms.
  • Collision. Two devices transmitting at the same time show a distorted waveform with a doubled amplitude and some bits wrong: look for two masters, or a slave answering to the wrong address.

Reading a Modbus capture

Request: read 2 holding registers from address 0 of slave 101slave03function00 00start address00 02quantityC4 0BCRC lo hiResponse: 4 data bytes follow (two 16-bit registers, high byte first)01slave03function04bytes00 0Aregister 0 = 1001 02register 1 = 2585A 60CRC lo hiException response: illegal data address (the high bit of the function code is set)01slave83fn+0x8002code 2C0 F1CRC lo hiModbus TCP: the same request, a 7-byte header (MBAP) and no CRC (TCP checks the data)00 01transaction00 00protocol 000 06length 601unit03function00 00start00 02quantitySilence of at least 3.5 character times separates RTU frames. The CRC is sent low byte first.
A request, a normal response and an exception response, with the CRC computed for each.
FrameBytes (hex)Meaning
Request01 03 00 00 00 02 C4 0BSlave 01, function 03 (read holding registers), start address 0000, quantity 0002, CRC (low byte first)
Response01 03 04 00 0A 01 02 5A 60Slave 01, function 03, byte count 04, register 0 = 000A (10), register 1 = 0102 (258), CRC
Exception01 83 02 C0 F1Slave 01, function 03 + 80 = 83 (an error), exception code 02 (illegal data address), CRC
Exception codeNameUsual cause
01Illegal functionThe device does not support that function code (reading with 04 when it needs 03, or writing a read-only value)
02Illegal data addressThe register does not exist: an off-by-one error or the wrong register map
03Illegal data valueQuantity too large, or the value is outside the allowed range
04Slave device failureThe device had an internal error while carrying out the request
05–06Acknowledge / busyThe device is busy; try again later
0A–0BGateway path unavailable / target failed to respondA gateway could not reach the device behind it
  • Request seen, no response. The device did not hear the request (wrong address, baud, polarity) or chose not to answer (CRC error, parity error). Check the settings and the A/B wires.
  • Response with an exception. The link works; the problem is the request. Compare the address and function with the register map.
  • Response with a bad CRC. Noise, wrong termination, or a data-rate mismatch.
  • Garbled bytes with the right pattern. If 01 03 arrives as 80 or FE, the baud rate or bit order is off; if bytes are always doubled or shifted, parity or stop bits are different.
  • Two requests and no gap. A master that sends the next request before the slave replied has a timeout that is too short.
  • Responses from several devices at once. Two devices share an address.

Symptoms and likely causes

SymptomLikely causesFirst check
No bytes at allCable open, wrong port, master not polling, A/B not connectedMeter on the line during a poll; loopback test of the PC
Request seen, no responseWrong address, baud or parity; A/B swapped; slave powered offCompare settings; swap A and B; try another address
Garbage charactersBaud rate or data bits mismatch; 7/8 bit; wrong voltage levelsSet the PC to match the device and scan the bauds
Works for a while, then stopsGround loop, noise from a drive, loose terminal, intermittent connectorLook for errors with a scope when it fails; check shields and routing
Works with a short cable, not a long oneMissing termination or bias; too high a baud rateTerminate both ends, add bias, lower the baud rate
One device fails, the others workWrong address, long stub, bad connector, faulty transceiverTest it alone with the PC
Random CRC errorsElectrical noise, reflections, bad groundingScope for ringing; separate the cable from power wiring; use shielded pair
Values wrong but communication fineOff-by-one address, scaling, word order, signed against unsignedCompare to the device display; check the register map
Everything stops when one device is plugged inA failed driver holding the line, or two mastersUnplug devices one by one until it recovers
PLC shows a fault, PC worksPLC port settings or program, timeout too short, wrong protocol selectedCompare the PLC port settings with those that worked on the PC

Sniffing Ethernet with Wireshark

Wireshark is a free packet analyzer that understands most industrial protocols. Select the network adapter, start the capture, send some data, stop, and read the packets. A capture can be saved and sent to a manufacturer’s support team.

Option 1: port mirroring (SPAN) on a managed switchManaged switchmirror port 1 → port 8PLCport 1HMI / SCADAport 2Laptop: Wiresharkport 8 (mirror)copy of port 1The PLC link is not interrupted. The laptop port receives a copy of everything on port 1, in both directions.Option 2: an inline passive tap between PLC and switch: copies both directions to two monitor ports for the capture machine.
Capturing Ethernet traffic: a mirror (SPAN) port on a managed switch copies the PLC’s traffic to the laptop, or an inline tap sits between two devices.
Capture: Ethernet 3 Filter: modbusNo.TimeSourceDestinationProtocolInfo410.000192.168.10.20192.168.10.10Modbus/TCPQuery: Trans 1, Unit 1, Func 3: Read Holding Registers420.004192.168.10.10192.168.10.20Modbus/TCPResponse: Trans 1, Unit 1, Func 3: Read Holding Registers570.504192.168.10.20192.168.10.10Modbus/TCPQuery: Trans 2, Unit 1, Func 3: Read Holding Registers580.506192.168.10.10192.168.10.20Modbus/TCPResponse: Trans 2, Unit 1, Exception: Illegal Data Address731.004192.168.10.20192.168.10.10Modbus/TCPQuery: Trans 3, Unit 1, Func 16: Write Multiple Registers741.007192.168.10.10192.168.10.20Modbus/TCPResponse: Trans 3, Unit 1, Func 16: Write Multiple RegistersPacket 57 (selected), decoded:Modbus/TCP: Transaction Identifier: 2, Protocol Identifier: 0, Length: 6, Unit Identifier: 1Modbus: Function Code: Read Holding Registers (3), Reference Number: 4999, Word Count: 2Packet 58 replies with Exception Code: Illegal Data Address (2): the register 4999 does not exist in the deviceA reply that takes 2 ms is the normal case here; a long gap, repeated retransmissions or a reset would show up in the Time and Info columns.
A Wireshark capture filtered to Modbus TCP: queries and responses, one exception reply, and the decoded fields of the selected packet.
ProtocolDisplay filterWhat to look for
Modbus TCPmodbus or tcp.port == 502Requests and responses by transaction ID; exception responses; no reply
EtherNet/IP and CIPenip || cipList Identity replies, connection set-up (Forward Open), and cyclic I/O packets on UDP 2222
Siemens S7s7comm or tcp.port == 102Read and write requests; set-up communication; errors when PUT/GET is disabled
PROFINETpn_dcp or pn_ioDCP identify requests and replies show device names; cyclic data
OPC UAopcuaHello, open secure channel, session set-up; security errors
Everything to one deviceip.addr == 192.168.1.10Whether it answers at all
Problemstcp.analysis.flagsRetransmissions, resets, zero windows
Resets and refused connectionstcp.flags.reset == 1The server closed the connection or has no service on that port
ARP troublearpRequests with no replies mean the device is not on the network or has a different address; duplicate IP warnings
  • Start with ARP and ping. If the PLC does not answer ARP, nothing above it will work. If it answers ARP and ping but not the protocol, look at the port, the protocol settings and any firewall.
  • Look at the handshake. A TCP connection starts with SYN, SYN/ACK, ACK. A SYN with no reply means no route or a firewall; a reset after SYN means nothing is listening on the port.
  • Time. Set the time column to “since previous displayed packet” to find delays, such as a slow response to a request.
  • Wireshark does not need the PLC’s permission, but capturing on a plant network can be restricted. Get approval before connecting a laptop.

Getting the traffic: mirror ports and taps

On a switched network, a laptop plugged into a spare port sees only broadcast traffic and its own. To see another device’s conversation you must have the traffic copied to you.

MethodHow it worksNotes
Mirror (SPAN) portA managed switch copies the traffic of one or more ports to a chosen portNeeds a managed switch and permission to change it; can drop packets on a busy link
Network tapA small inline device passes the traffic and copies it to a monitor portPassive; does not change the switch; the device breaks the link for a moment when installed
HubAn old repeater hub shares everything with every portRarely used; limited to 10 Mbit/s; not for modern networks
Capture on the PC itselfWireshark on the engineering laptop sees its own trafficEnough when the laptop is one of the two ends
Packet capture in the deviceSome PLCs and switches can capture internallyCheck the manufacturer’s tools

Other network tools

ToolUse
pingIs the device reachable? Run a continuous ping while wiggling a cable to find an intermittent connection
arp -aShows the IP and MAC address pairs the PC knows; a duplicate IP appears as the same MAC for two devices, or a MAC that changes
IP scanner (Advanced IP Scanner, Angry IP Scanner, nmap)Finds the devices on a subnet; use carefully on a live plant network
Vendor discovery toolsRSLinx/Studio 5000 browse, TIA Portal accessible devices, PRONETA, BOOTP/DHCP tool: find a device with an unknown address
Cable testerChecks each pair of an RJ45 cable; some measure length
Managed switch diagnosticsPort counters (CRC errors, collisions, speed and duplex) show a bad cable or a mismatch
Speed and duplexA port forced to 100 full next to one on auto negotiates down to half duplex and produces errors

Cautions

  • Get permission. Plugging a laptop into a production network or opening a control panel needs approval, and some sites forbid it.
  • Never transmit when sniffing. A serial tap that drives the line, or a laptop that sends traffic to a PLC network, can stop a machine.
  • Reading is safer than writing. Do not write to registers or tags on a running machine unless you know what they do.
  • Isolate. Use an isolated adapter and take care with panel voltages; follow the lockout and arc-flash rules of the plant.
  • Remove your test gear. Take out taps, temporary terminators and jumpers when finished, and restore the settings you changed.
  • Secure the data. Captures can contain passwords and process data: store and share them with care.

Related

FAQ

What is the cheapest way to see what is on an RS-485 line?

A USB-RS485 adapter (a few dollars to a few tens) in receive-only mode, plus a terminal or Docklight in hex mode. Set the same baud rate and parity, and the master’s requests and the slaves’ responses both appear.

Can I sniff Modbus RTU while the PLC is connected?

Yes, on an RS-485 bus: attach the adapter in parallel with a short stub. Do not add termination or bias, and do not let the adapter transmit.

Why does Wireshark not show any packets from my PLC?

On a switched network you only see traffic addressed to your own PC. Use a mirror port or a tap, or capture on the PLC’s own engineering computer.

What does a CRC error mean?

The receiver computed a different check value from the one in the frame, so at least one bit changed in transit. It is usually noise or a mismatched baud rate; the device discards the frame and the master sees a timeout.

Do I need a logic analyzer?

Not for most jobs. A USB adapter and a meter solve most serial problems; a scope or logic analyzer helps with timing, noise and signal-quality questions.

References

  • Modbus Organization, MODBUS over Serial Line Specification and Implementation Guide V1.02 (frame format, timing, CRC, exception codes).
  • TIA/EIA-485-A and TIA/EIA-232-F (electrical characteristics).
  • Wireshark Foundation, Wireshark User’s Guide and display filter reference.
  • Rockwell Automation, EtherNet/IP Network Troubleshooting notes; PROFIBUS & PROFINET International, PROFINET Commissioning Guideline.

Last reviewed: October 2026. Speeds, lengths, node counts and menu names are typical: confirm against the specification and the manufacturer’s documentation for the devices you use.