# Generic TCP Driver

**URL:** <https://forum.inductiveautomation.com/t/generic-tcp-driver/59642>\
**Category:** Ignition\
**Created:** [May 16, 2022, 10:59pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642 "2022-05-16T22:59:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![hazey](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hazey](https://forum.inductiveautomation.com/u/hazey)\
**Post date:** [May 16, 2022, 10:59pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/1 "2022-05-16T22:59:04Z")

</div>

Hi guys I have a scale that is a TCP Client and sends the weight via TCP. I have set up the Generic TCP driver to act as a TCP Server but I am getting the following fault.

_TcpServerDriver[CheckWeigher2] 17May2022 08:56:02 MessageHandler received message from unknown device /155.155.155.176:59416._

I have assistnet software that I can use as a TCP Server and I can receive the message OK in that software. I can also set up assisnet to be a client and I can send a message to the Generic TCP driver and receive it OK in Ignition. But directly to scale I get error.  
Any help would be appreciated thanks.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 16, 2022, 11:05pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/2 "2022-05-16T23:05:28Z")

</div>

What version of Ignition are you using and is this a 3rd party driver? We don’t have one that acts as a TCP server.

---

<div class="post-metadata">

**Author:** ![hazey](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hazey](https://forum.inductiveautomation.com/u/hazey)\
**Post date:** [May 16, 2022, 11:12pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/3 "2022-05-16T23:12:20Z")

</div>

Kevin version is 8.1.16 and the Driver is Generic TCP Server, one from here [chi-Ignition · GitHub](https://github.com/chi-Ignition)

Just to add we could open a TCP socket connection to act as Server correct? Just I am not up to speed on achieving that.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 16, 2022, 11:16pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/4 "2022-05-16T23:16:50Z")

</div>

You’re going to need to get help from @chi with this, it’s his driver. I don’t know anything about it.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 16, 2022, 11:18pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/5 "2022-05-16T23:18:09Z")

</div>

From a quick browse of the source, though, it looks like the driver has settings to either accept all connections or you need to specify the host/IP of the clients that will connect.

---

<div class="post-metadata">

**Author:** ![hazey](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hazey](https://forum.inductiveautomation.com/u/hazey)\
**Post date:** [May 16, 2022, 11:20pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/6 "2022-05-16T23:20:07Z")

</div>

Kevin yes tried both combinations same result.  
Using Host/IP I can get some connection, I get a messagecount but not much data, should be 114 bytes, only shows a few random characters.

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [May 17, 2022, 12:29pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/7 "2022-05-17T12:29:54Z")

</div>

So the error `MessageHandler received message from unknown device...` is gone now and the driver receives a message from your device, but not the data you are expecting?  
Please post the message configuration.

By the way, if you are not connecting multiple devices or need the message buffering provided by the driver, a simple listening socket might be an easier solution for your use case. See [this thread](https://forum.inductiveautomation.com/t/udp-driver-altering-data/10322/13) for an example.

---

<div class="post-metadata">

**Author:** ![hazey](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hazey](https://forum.inductiveautomation.com/u/hazey)\
**Post date:** [May 17, 2022, 7:57pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/8 "2022-05-17T19:57:31Z")

</div>

Chi yes by connecting with Host/IP the error will go and I can get a couple of characters but not the 114 bytes of the message.

 ![TCP](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3d4be991f4e95a3bdd7e99c6ef344f74216bc681.png)

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [May 18, 2022, 6:04am UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/9 "2022-05-18T06:04:41Z")

</div>

That sounds like your data isn’t really a string. The driver expects an ISO-8859-1 ascii string. If your data is not a string, try `Raw String` instead.  
You can also try to set the logger `TcpServerDriver[DRIVER_NAME].Folder[xxx]` to `Trace`. That will write the received raw data bytes to the gateway log.

---

<div class="post-metadata">

**Author:** ![hazey](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hazey](https://forum.inductiveautomation.com/u/hazey)\
**Post date:** [May 18, 2022, 11:06am UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/10 "2022-05-18T11:06:12Z")

</div>

Chi thanks I have set Trace to check. Message is in HEX can this driver handle that? thanks Hazey

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [May 18, 2022, 7:57pm UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/11 "2022-05-18T19:57:19Z")

</div>

Without knowing the meaning of that 114 bytes your best chance is to configure an `Unsigned Byte` array with 114 bytes length. Then you may try to guess the content(meaning of the single bytes.  
It would be much easier to contact the device manufacturer and ask for a documentation of the data packet.

---

<div class="post-metadata">

**Author:** ![Eric\_Bauer](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@Eric\_Bauer](https://forum.inductiveautomation.com/u/Eric_Bauer)\
**Post date:** [May 27, 2025, 1:53am UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/12 "2025-05-27T01:53:26Z")

</div>

Hi Chi,

I started working with your driver. I am also seeing this error in the log files about receiving a message from an unknown device. I've tried accepting all connections, and also defining a list of hostname/alias pairs, but I can't get it to work either way. I am running version **8.1.47** on Maker Edition. Is that a possible problem?

Thanks,

Eric

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [May 27, 2025, 11:59am UTC](https://forum.inductiveautomation.com/t/generic-tcp-driver/59642/13 "2025-05-27T11:59:42Z")

</div>

Maker Edition should not make a difference.  
It is possible that the combination of UDP and 'Accept All' ist not working. Try setting the log level to 'debug'. There should at least be a hint of what is not working.
