# Modbus TCP previews correct output, but receiving end gets garbage

**URL:** <https://discourse.nodered.org/t/modbus-tcp-previews-correct-output-but-receiving-end-gets-garbage/78322>\
**Category:** General\
**Tags:** modbus, docker\
**Created:** [10 May 2023 15:22 UTC](https://discourse.nodered.org/t/modbus-tcp-previews-correct-output-but-receiving-end-gets-garbage/78322 "2023-05-10T15:22:11Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![Darren](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/darren/32/92202_2.png) [@Darren](https://discourse.nodered.org/u/Darren)\
**Post date:** [19 May 2023 12:22 UTC](https://discourse.nodered.org/t/modbus-tcp-previews-correct-output-but-receiving-end-gets-garbage/78322/22 "2023-05-19T12:22:34Z")

</div>

The more I and my colleague look at it, the more it looks like bytes are being swapped around, similar to the issue observed [here](https://discourse.nodered.org/t/scaled-value-while-reading-modbus/75871/), except my modbus master and slave are entirely in node-red, so I don't know why this is happening.

as a test, I broadcast `12345` on `4008`, and receive as much in my node-red client, but my colleague receives alternating `FF 00` and `00 FF` his end.

He said:

> Almost like it’s only using 8 bits and maxing out at 255, then either shifting or endian swapping it

---

_[View the full topic](https://discourse.nodered.org/t/modbus-tcp-previews-correct-output-but-receiving-end-gets-garbage/78322)._
