A Modbus TCP tester for ESP32 and Raspberry Pi projects
Your board is on the Wi-Fi and your code compiles. A separate client or server that you didn't write tells you which end has the bug.
You wrote a Modbus TCP server
Point FieldKit’s client at your board.
- Find devices confirms that your port answers, with Modbus or without it.
- Quick read shows whether your byte order and addressing match what you intended.
- Bad requests show up by exception name. Advanced raw request lets you test the edge addresses and quantities for writes.
- Live monitoring polls at 1 to 60 second intervals, handy for spotting a leak or a stall over a long run.
If your server should accept 0xFF or 0 as the Unit ID as well as 1, try all three. What the guide recommends.
You wrote a Modbus TCP client
Start FieldKit’s Server on the iPhone and point your board at the address on screen, port 1502. Now you have a server you didn’t write. Edit values on screen and check that your code sees them. Writes from your code appear in the register map about twice a second, and counters show requests, responses and exceptions.
Ask for an address outside the map and you’ll get exception 02. Ask for a function it doesn’t support and you’ll get 01. That lets you test your error handling, and you won’t have to break anything real.
Read the frames
The frame decoder splits a hex dump from your serial log into fields and checks the length and CRC. The frame byte by byte explains each one. For automated tests, a pymodbus server runs on a laptop.
Limits to know
The FieldKit server runs in the foreground and speaks Modbus TCP only, without RTU over TCP. It’s best for interactive checks. Use pymodbus in a test suite or for runs that should go unattended.