# Sending command to TCP device

**URL:** <https://forum.inductiveautomation.com/t/sending-command-to-tcp-device/12864>\
**Category:** Ignition\
**Created:** [March 29, 2017, 4:27pm UTC](https://forum.inductiveautomation.com/t/sending-command-to-tcp-device/12864 "2017-03-29T16:27:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KRoberts](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@KRoberts](https://forum.inductiveautomation.com/u/KRoberts)\
**Post date:** [March 29, 2017, 4:27pm UTC](https://forum.inductiveautomation.com/t/sending-command-to-tcp-device/12864/1 "2017-03-29T16:27:38Z")

</div>

We have a new device that uses TCP to send messages (commands) / receive messages (output). The sent message requires a checksum. Can I set this up as an OPC-UA Server TCP device and use it that way or is this a pure scripting requirement. If it’s scripting, can you provide some sample code?

---

<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:** [March 29, 2017, 9:48pm UTC](https://forum.inductiveautomation.com/t/sending-command-to-tcp-device/12864/2 "2017-03-29T21:48:20Z")

</div>

You could use an expression tag to run an expression (most likely, you’ll need to run a script) that writes back to the Writeable tag created by the TCP driver.

The exact way that checksum is calculated is up to your device; you’ll need to dive into the documentation to find out what it expects.
