# Communication with a TCP Device

**URL:** <https://forum.inductiveautomation.com/t/communication-with-a-tcp-device/95190>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [August 27, 2024, 7:30am UTC](https://forum.inductiveautomation.com/t/communication-with-a-tcp-device/95190 "2024-08-27T07:30:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [August 27, 2024, 9:23am UTC](https://forum.inductiveautomation.com/t/communication-with-a-tcp-device/95190/3 "2024-08-27T09:23:21Z")

</div>

Unfortunately, the TCP Device Driver is extremely basic, and only good for sending strings back and forth.  
If you want more complex communication you may need to do this via scripting, or if there are other 3rd part modules that can be used on the exchange.

I found this out on a thread from a while back here:

> [@Opening Sockets to TCP devices using scripting](https://forum.inductiveautomation.com/t/opening-sockets-to-tcp-devices-using-scripting/76860):
>
> Hey all, We've got some machines that will be sending and receiving data to our Ignition using python TCP APIs, and then ideally writing these to tags. In a testing python prgram that was developed, a socket to the relevant port is opened and made as an object in the code. This socket is then used in an endless while loop to pull the data out in a continuous stream. Is there a best practice to stream data over a socket like this in Ignition. We have two options in my mind: Using Gateway Ti…

Worth noting if you do go down the scripting route, make sure you use the Jython Java TCP socket module and not the built-in python socket, as it is filled with memory leaks.

---

_[View the full topic](https://forum.inductiveautomation.com/t/communication-with-a-tcp-device/95190)._
