Flipper Zero as a Passive RS-485/Modbus Bus Sniffer: GPIO UART Wiring and Protocol Logging
The Flipper Zero's GPIO header exposes a UART that's already a familiar tool for hardware hacking — reading debug consoles, talking to modules, dumping flash over a serial bootloader. Less obvious is that the same UART, paired with a cheap RS-485 transceiver module, turns the Flipper into a portable passive sniffer for industrial RS-485 and Modbus RTU buses: the kind of wiring that runs between a VFD and its controller, a PLC and its I/O modules, or any of the industrial sensors covered elsewhere on this site. Being able to clip onto an existing RS-485 pair and see the actual Modbus traffic flowing across it, without needing a laptop and a USB-to-RS485 adapter, is a genuinely useful field tool when you're trying to understand what a piece of secondhand industrial gear is actually saying to its controller.
What This Does and Doesn't Do
This build makes the Flipper a passive listener on an RS-485 bus: it reads the differential signal, decodes UART framing, and logs raw bytes (and, with the app extension covered below, parses Modbus RTU frame structure) to the Flipper's screen and storage. It does not transmit onto the bus, and getting that part right matters — RS-485 is a multi-drop differential bus, and an improperly configured transceiver driving its output pins onto a live bus can collide with a legitimate device's transmission and disrupt the very system you're trying to observe. Keep the transceiver's driver-enable pin permanently disabled (tied to receive-only) for this application.
Hardware: Wiring an RS-485 Transceiver to Flipper GPIO
An RS-485 transceiver module (built around a chip like the MAX485 or SN65HVD75) converts the bus's differential A/B signal pair into a single-ended UART-level signal the Flipper's GPIO UART can read directly.
| Transceiver pin | Flipper GPIO pin | Notes |
|---|---|---|
| RO (receiver output) | RX (GPIO 14 / pin 13 on the Flipper header, check your firmware's pin map) | This is the UART data the Flipper reads |
| DE / RE (driver/receiver enable) | Tie RE low (always enabled) and DE low (always disabled) | Keeps the transceiver permanently in listen-only mode — this is what makes the tap passive |
| VCC | 3V3 or 5V per module spec | Confirm your transceiver module's logic level matches the Flipper's 3.3V GPIO before connecting RO directly |
| GND | GND | Common ground with the Flipper; do not assume the bus's ground is at the same potential as your test setup without checking |
| A / B | Bus terminals | Clip onto the existing RS-485 pair; polarity matters, and swapping A/B typically just inverts logic but some transceivers behave oddly — verify with a known-good signal first |
Capturing Raw UART Data
Out of the box, the Flipper's built-in GPIO/UART tools (and the general-purpose "USB-UART Bridge" or GPIO apps depending on firmware) can pass the received serial stream through to a connected computer over USB, effectively turning the Flipper plus transceiver into a USB-to-RS485 read-only adapter you can feed into any serial terminal or Modbus analysis tool on a laptop. This alone is useful: no laptop-side RS-485 adapter needed, just the Flipper and a cheap transceiver board in your pocket.
Decoding Modbus RTU Framing On-Device
Modbus RTU frames follow a defined structure — a slave address byte, a function code, a data payload, and a 16-bit CRC — separated by a minimum silent interval (3.5 character times) that marks frame boundaries. A custom Flipper application (built with ufbt, the unofficial Flipper build tool, against the firmware's GPIO/UART APIs) can:
- Buffer incoming bytes from the UART peripheral.
- Detect frame boundaries using the inter-byte silence timing rather than a fixed delimiter, since Modbus RTU has no start/stop byte.
- Validate the CRC-16 (Modbus uses a specific polynomial, 0xA001 reversed) to confirm a captured frame is actually a valid Modbus frame and not a mid-transmission garbage capture.
- Parse the slave address and function code to show a human-readable summary on the Flipper's screen — read holding registers, write single coil, and so on are the most common function codes you'll see on a typical industrial bus.
- Log parsed frames to the SD card for later review, which is often more useful in the field than trying to read fast-scrolling traffic on the small screen in real time.
This is a genuinely approachable first custom Flipper app if you've wanted to get into firmware development for the device: the logic is straightforward serial parsing rather than anything exotic, and you get an immediately useful tool out of it.
Practical Uses
- Reverse-engineering used industrial equipment: a secondhand VFD, PLC, or sensor array with undocumented or lost configuration can often be understood simply by watching what its existing controller is actually asking for and getting back, without needing to power down the system or risk an active probe.
- Diagnosing a misbehaving Modbus network: address collisions, baud rate mismatches, and wiring polarity problems all show up as garbled or missing frames, and a passive tap lets you confirm what's actually on the wire before suspecting the PLC or sensor logic itself.
- Learning Modbus RTU hands-on: watching real frames from real equipment is a far better way to internalize the protocol's framing than reading the spec alone.
Safety and Practical Notes
- Confirm your transceiver module's logic-level output matches the Flipper's 3.3V GPIO tolerance before wiring RO directly to the Flipper's RX pin; some inexpensive MAX485 breakout boards run at 5V logic and need a level shifter in between.
- Never tie the DE (driver enable) pin high on a bus you don't own or fully understand — this is what prevents accidental transmission onto a live industrial network, which could at minimum cause an error at the controller and at worst disrupt a running process.
- RS-485 networks are often part of real industrial control systems; treat any bus you're not explicitly authorized to tap into as off-limits, the same caution you'd apply to any other live industrial network.
Paired with the CAN bus and general GPIO hardware-hacking capability the Flipper already has, a passive RS-485/Modbus tap rounds out the device as a genuinely useful portable tool for understanding the industrial protocols that show up constantly in secondhand CNC, machine-control, and automation gear.