# TCP Port Listener

**URL:** <https://forum.inductiveautomation.com/t/tcp-port-listener/88072>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 29, 2024, 12:23pm UTC](https://forum.inductiveautomation.com/t/tcp-port-listener/88072 "2024-03-29T12:23:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SMarcin](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@SMarcin](https://forum.inductiveautomation.com/u/SMarcin)\
**Post date:** [March 29, 2024, 12:23pm UTC](https://forum.inductiveautomation.com/t/tcp-port-listener/88072/1 "2024-03-29T12:23:52Z")

</div>

Hello,

Are there any Passive TCP Listerning drivers available for Ignition?  
I have n-number of devices that are sending data to my ip on a specific port every minute. Built-in TCP Driver does not support passive listening and instead requires me to put in a specific ip address.

Any solutions?

---

<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:** [March 29, 2024, 12:30pm UTC](https://forum.inductiveautomation.com/t/tcp-port-listener/88072/2 "2024-03-29T12:30:25Z")

</div>

Hmm, there used to be a passive TCP driver written by a third party floating around the forum, but I'm not sure it has been kept up to date for 8.x or not...

Does each device connect to its own port?

---

<div class="post-metadata">

**Author:** ![SMarcin](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@SMarcin](https://forum.inductiveautomation.com/u/SMarcin)\
**Post date:** [March 29, 2024, 12:34pm UTC](https://forum.inductiveautomation.com/t/tcp-port-listener/88072/3 "2024-03-29T12:34:24Z")

</div>

No, they all connect to the same port which is 502. Using Node-Red, i used to distinguish the devices by the first part of the received message, which was something like: "MyNameIsDeviceNumber5;HereIsMyInfoInHex"

The device sends a "hello" packet. If i respond to that packet, the device sends me the data which i described above.

Now i want to migrate from Node-Red to Ignition, and im surprised that there are no built-in tcp port listener drivers available.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 29, 2024, 1:34pm UTC](https://forum.inductiveautomation.com/t/tcp-port-listener/88072/4 "2024-03-29T13:34:47Z")

</div>

It is possible to do this just with jython, by creating the appropriate java socket. It requires some management of persistence, and a long-lived listening thread, which can be tricky.

Some reading material:

[https://forum.inductiveautomation.com/search?q=long-lived%20thread%20order%3Alatest](https://forum.inductiveautomation.com/search?q=long-lived%20thread%20order%3Alatest)

---

<div class="post-metadata">

**Author:** ![SMarcin](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@SMarcin](https://forum.inductiveautomation.com/u/SMarcin)\
**Post date:** [March 29, 2024, 2:12pm UTC](https://forum.inductiveautomation.com/t/tcp-port-listener/88072/5 "2024-03-29T14:12:22Z")

</div>

So i have came up with a diffrent approach which is using Node-Red to receive TCP data and then sending it to ignition OPC UA server. That way i will only need to learn how to proficiently use OPC UA.

---

<div class="post-metadata">

**Author:** ![drojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drojas/32/3403_2.png) [@drojas](https://forum.inductiveautomation.com/u/drojas)\
**Post date:** [March 29, 2024, 2:22pm UTC](https://forum.inductiveautomation.com/t/tcp-port-listener/88072/6 "2024-03-29T14:22:35Z")

</div>

I have used @chi TCP driver in the past and works just fine for passive TCP listening.

> **[GitHub - chi-Ignition/generic-tcp-driver: A universal tcp client/server driver...](https://github.com/chi-Ignition/generic-tcp-driver/tree/master)**
>
> master
