Troubleshooting
Error messages here were checked on the v1.3.4 Release build, either by triggering them or from the program's own text. The Windows screens are real screenshots; the Linux, license and update messages have no screenshots, and their text comes from the program.
Each problem is laid out as symptom → cause → fix. Messages are quoted exactly as the program shows them, so you can search this page for the text on your screen.
Contents
1. A TCP device does not connect
During a run, the channel card shows Not answering yet, the Log shows a message like the one below, and steps are judged DISCONNECT:
Channel A (TCP 192.0.2.10:502) is not answering yet: timed out. The run goes on; each step that talks to it connects again.
Check the reason in the Actual column (or the command-line output):
| Message | Cause | Fix |
|---|---|---|
connect failed: connection refused | The IP answers, but nothing is listening on that port | Check the port (Modbus TCP defaults to 502); check that the device's Modbus TCP function is on; when practising with Slave, check that the Slave has Listen pressed |
connect failed: timed out | The IP cannot be found, or packets are blocked | Check the IP and that the PC and device are on the same subnet; test with ping; check whether Windows Firewall or a network firewall blocks port 502 |
Time out or disconnect | The connection succeeded, but the device did not answer this request | Check the Slave ID; devices behind a gateway need the right Slave ID; check that the timeout is long enough |
When practising with Slave: the Slave's Listen IP defaults to 127.0.0.1, which only accepts connections made to 127.0.0.1 on this PC; connecting to another address such as 127.0.0.100 fails. To let other PCs or PLCs on the network connect, set the Listen IP to an adapter's address, or 0.0.0.0 (all adapters), in Device → Edit Device....
2. An RTU device does not connect
| Symptom | Cause | Fix |
|---|---|---|
Before the run: Channel A (RTU COM3 9600) could not connect: the port does not exist (check the COM number in Device Manager); exit code 2 on the command line | No such serial port: the USB-to-serial cable is not plugged in properly, or the COM number is wrong | Check the COM number under Device Manager → Ports (COM & LPT) |
could not connect: the port is in use by another program | Another program has the serial port open | Close the other program using the port (including another Roach Modbus Tool window) |
Linux: could not connect: permission denied (add the user to the dialout group, then log in again) | The account has no permission for the serial port | See section 3 |
Every step gives Time out or disconnect | Wrong serial settings or Slave ID, or wrong wiring | Check that baud rate, data bits, parity and stop bits match the device; check the Slave ID; on RS-485, check whether A/B (D+/D−) are swapped and the termination resistors |
| Occasional timeouts | Line noise, or a timeout that is too short | Lengthen the timeout and add retries; on long RS-485 runs, add termination resistors and use shielded twisted pair |
3. Linux: serial port missing or permission denied
No /dev/ttyUSB*
- After plugging in the USB-to-serial cable, run
ls /dev/ttyUSB* /dev/ttyACM*to check the device appears. - If it does not, run
sudo dmesg | tailto see whether the system recognised the cable and which driver it loaded. - The serial port list shows
/dev/ttyUSB*,/dev/ttyACM*,/dev/ttyAMA*, the/dev/ttyS*ports that actually exist, and/dev/rfcomm*. Other paths can be typed into the serial port field.
The device exists but will not open
The account must be in the dialout group:
sudo usermod -aG dialout $USERLog out and back in for it to take effect. Check with groups that the output includes dialout.
4. Steps show DISCONNECT or time out
| Result | Meaning |
|---|---|
| DISCONNECT | The device did not respond (connection failed or timed out); see sections 1 and 2 |
FAIL, with a note like slow: 12.3 ms > 10 ms | The device responded, but slower than the step's Max response (max_ms) |
SKIP, with the note on_error skip | An earlier step failed to communicate and on_error is skip, so the rest of the case was skipped |
Whether to carry on after a communication failure: with On comm error at the bottom left set to Skip rest of case (skip), one communication failure skips the rest of that case, and the next case runs as usual. With Continue (continue), the next step runs. Tests that expect disconnections, such as power cycling, should use Continue; see Concepts › 4. Handling communication failures.
Occasional timeouts: lengthen the timeout in the channel settings, or add retries (how many times each failed step is retried).
The device is still booting: make the first step a Wait Until (compare: false) so the run starts once the device responds. See the example in Power-cycle test.
5. Wrong values read
| Symptom | Cause | Fix |
|---|---|---|
A float reads as a tiny (such as -2.4178e-41) or huge number | Wrong byte order | Try float_cdab or another format; see Floats, longs and byte order |
| The values are off by one address | The manual counts from 1 (40001, 400001) or uses PLC addresses, while the tool uses 0-based protocol addresses | 40001 in the manual is address 0x0000; subtract 1 as the manual describes |
| Negative numbers read as large numbers near 65535 | The Unsigned format is in use | Use the signed format |
| The write PASSes but the read-back gives the old value | The device takes a while to update after a write | Add a Wait after the write, or use Wait Until to wait for the value |
| Reads 0 where the value written on the other side was expected | The gateway is not forwarding | See Gateway forwarding |
6. A script does not load
Opening the script shows Failed to load file name, and the script is not loaded:

| Message | Cause | Fix |
|---|---|---|
invalid JSON at line 6, column 51: ... | JSON syntax error: an extra or missing comma, unmatched brackets, or a string missing a quote | Open the file in a text editor and look at the line and column given (or just before them). The most common cause is a comma after the last item, such as { "address": "0x0000", } in the screenshot |
Goto was removed: every case runs once per round, in list order. ... | An older script uses goto | Use If/Else for branching, Call for shared steps, and End Case or End Round for ending early; see Unsupported syntax |
main_case is not the first case ...: cases now run in list order, so move that case to the top and remove main_case | An older script names a main_case that is not the first case | Move that case to the top and delete main_case |
case "name" has a malformed step at index N: ... | The step at position N+1 has a field error (the index counts from 0) | Fix it as the text after the colon says; how each field is written is in the command reference |
On the command line, the same messages start with The script is not valid: ... and the exit code is 2.
7. No exit code from a command-line run
Symptom: RoachModbusTool --run-script test.json returns to the prompt at once, and %ERRORLEVEL% or $LASTEXITCODE is always 0.
Cause: the Windows version is a GUI program, so Command Prompt and PowerShell do not wait for it to finish after starting it.
Fix: wait for the program to finish explicitly.
start /wait "" RoachModbusTool.exe --run-script test.json --report out.xlsx
echo %ERRORLEVEL%$p = Start-Process RoachModbusTool.exe -ArgumentList '--run-script test.json --report out.xlsx' `
-Wait -PassThru -NoNewWindow
$p.ExitCodeWhat each exit code means is in Command-line runs. The Linux AppImage needs nothing special: echo $? gives the exit code.
8. License problems
The license status is shown on the license label at the bottom left (see Getting started › 3. License).
| Message | Cause | Fix |
|---|---|---|
Your trial has ended / Your 30-day trial has ended (or the trial record was altered). | The 30-day trial has ended | Buy with Help → License → Buy License..., then enter the key with Help → License → Enter License... |
This license needs an online check before it can be used. | Licensed, but not verified online for more than 14 days | Connect the PC to the internet and restart the app, or enter the key again with Help → License → Enter License... |
License server unreachable. Offline use continues for N day(s). | The license server could not be reached at startup (a reminder only) | Nothing to do; go online once within N days |
Could not reach the license server. Check your internet connection and try again. | The server could not be reached while entering a key | Check the network, and whether a company firewall or proxy blocks HTTPS |
This license is already active on 3 computers, the most it allows. | One key works on at most 3 PCs at a time | Release one with Help → License → Remove License... on that PC, or remove a device in the Polar customer portal, then enter the key on this PC |
That license key was not accepted. | The key was mistyped, or is not a valid key | Copy the full key from the purchase confirmation email and paste it |
That license key is not for Roach Modbus Tool. | The key belongs to another product | Check which product was bought |
This license is no longer active on this computer. | This PC was removed in the customer portal | Enter the key again to activate it |
A temporary network outage does not invalidate the license: when the server cannot be reached or is busy, a license that was verified keeps working, as long as the connection returns within 14 days.
9. Update fails or only offers Open download page
| Message | Cause | Fix |
|---|---|---|
Could not check for updates. | The update server cannot be reached | Check the network, then try Help → Check for Updates... again. A failed automatic check at startup shows no message |
Only Open download page, with Automatic update is not available: The folder ... is not writable. below | The app's folder is not writable (for example, it is in C:\Program Files) | Click Open download page and download by hand; or move the app to a writable folder (such as D:\Tools\RoachModbusTool), after which Update now works |
Only Open download page, with This copy is not running as an AppImage. below | On Linux, the app is not running as an AppImage (it was extracted, for example) | Run the AppImage, or download the new version by hand |
... You can download the new version from the website instead. | Downloading or installing the update failed | Download the new version from the website as the message says. A download that fails verification is not installed, and the current version keeps working |
10. The Linux AppImage does not start
| Symptom | Cause | Fix |
|---|---|---|
Permission denied | The AppImage is not executable | chmod +x RoachModbusTool-x86_64.AppImage |
AppImages require FUSE to run. or errors about libfuse.so.2 | The system has no FUSE 2 (not installed by default since Ubuntu 22.04) | Ubuntu 22.04: sudo apt install libfuse2; Ubuntu 24.04: sudo apt install libfuse2t64. Or, without installing it, run ./RoachModbusTool-x86_64.AppImage --appimage-extract-and-run |
Roach Modbus Tool needs a graphical desktop: no display was found (DISPLAY and WAYLAND_DISPLAY are not set). | The window was started without a desktop (over SSH, for example) | Start it from a desktop session, or use ssh -X. To only run scripts, --run-script needs no desktop |
libOpenGL.so.0: cannot open shared object file | An older AppImage on a system without OpenGL libraries (a server or minimal install) | Update to the latest version: the AppImage now bundles the OpenGL libraries and uses them when the system lacks them |
11. Reading frames in the Communication Log
When you suspect the device is answering wrongly, look at the raw frames sent and received.
- Script mode: turn on View → Communication Log, and a Traffic tab appears at the bottom.
- Poll/Slave mode: the Log panel at the bottom of the window.

| Column | Meaning |
|---|---|
| Time | Time |
| Type | TX sent, RX received, INFO connection events |
| Source | Which channel (A/B) or device |
| Event | Request, Response and so on |
| Raw frame (hex) | The raw frame in hex |
The drop-down at the top filters to TX, RX or INFO only.
Reading a Modbus TCP frame
Taking "read 2 registers from 0x0000" in the screenshot as the example:
TX 00 02 00 00 00 06 01 03 00 00 00 02
RX 00 02 00 00 00 07 01 03 04 12 34 10 01| Bytes | TX (request) | RX (response) |
|---|---|---|
| 1–2 | 00 02 transaction ID; the response carries the same ID | 00 02 |
| 3–4 | 00 00 protocol (always 0) | 00 00 |
| 5–6 | 00 06 6 more bytes follow | 00 07 7 more bytes follow |
| 7 | 01 Slave ID | 01 |
| 8 | 03 function code (read holding registers) | 03 |
| After that | 00 00 start address, 00 02 count | 04 data byte count, 12 34 = 0x1234, 10 01 = 0x1001 |
Common readings
- TX with no RX: the device did not respond. Check the Slave ID and the connection; see sections 1 and 2.
- The RX function code has 0x80 added (such as
83): the device returned an exception, and the next byte is the exception code:01function not supported,02address does not exist,03invalid value,04device failure. - The RX Slave ID differs from the TX one: another device on the line uses the same Slave ID, or the gateway is misconfigured.
RTU frames have no first 6 bytes: they start at the Slave ID and end with 2 extra CRC bytes.
