# Sending out command from ignition to a device via TCP/IP

**URL:** <https://forum.inductiveautomation.com/t/sending-out-command-from-ignition-to-a-device-via-tcp-ip/65179>\
**Category:** Ignition\
**Created:** [October 13, 2022, 3:19pm UTC](https://forum.inductiveautomation.com/t/sending-out-command-from-ignition-to-a-device-via-tcp-ip/65179 "2022-10-13T15:19:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 13, 2022, 4:49pm UTC](https://forum.inductiveautomation.com/t/sending-out-command-from-ignition-to-a-device-via-tcp-ip/65179/3 "2022-10-13T16:49:22Z")

</div>

The TCP driver is geared much more toward ASCII text.

You will probably have to open raw sockets yourself. You can do this with the Python standard library, but Jython's implementation has some potential resource leaks. You're probably going to have a better time using Java's standard library.

There's some valuable discussion (and some example scripts) in this thread, as a starting point:

> [@Communicating with external applications over TCP/IP socket /websockets using gateway scripts](https://forum.inductiveautomation.com/t/communicating-with-external-applications-over-tcp-ip-socket-websockets-using-gateway-scripts/20455):
>
> How can we communicate Ignition with external applications over TCP/IP sockets or websockets using gateway Jython scripts,? Does the gateway scripts have libraries for TCP sockets or websockets communication? I don't see it in python gateway script library documentation. Has anyone developed a module for it (either commercial or free module). The existing TCP/IP module in Ignition is specifically designed for bar code reader which is not generic in nature. Can JAVA/Jython combination be used so…

---

_[View the full topic](https://forum.inductiveautomation.com/t/sending-out-command-from-ignition-to-a-device-via-tcp-ip/65179)._
