# Sending Hexadecimal commands to a DX 200 controller via TCP

**URL:** https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224
**Category:** General
**Created:** [13 April 2022 07:56 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224 "2022-04-13T07:56:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Vedant](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@Vedant](https://discourse.nodered.org/u/Vedant)
#### Post date: [13 April 2022 07:56 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224/1 "2022-04-13T07:56:45Z")

</div>

Hello Everyone! I am trying to send some hexa decimal commands to a DX200 controller via tcp request node and ideally it should respond with some data. Right now it is not sending anything. I have defined the ip address and port in the tcp request node. I am new to node red, please help me with your kind suggestions.

 ![complete flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/c/0c554e46475123ceaf146a0da523ddd526f5f0d2.png)  
 ![functionnode](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/5/450f94b0f733351ff39eacbe56fbd4c13f56bb79.png)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [13 April 2022 11:46 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224/2 "2022-04-13T11:46:45Z")

</div>

Well from the little we can see it would seem to be sort of right... but  
a) do you really mean port 80 ? That is usually for web / http so why not use an http request node ?  
b) have you added a debug node before the tcp node to inspect exactly what you are sending and if it is correct.  
c) how have you configured the tcp node to respond ? after a timeout ? after a specific character ?

---

<div class="post-metadata">

### Author: ![Vedant](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@Vedant](https://discourse.nodered.org/u/Vedant)
#### Post date: [13 April 2022 12:35 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224/3 "2022-04-13T12:35:54Z")

</div>

Thank you for your quick response! I have added a debug node before the tcp node and it prints buffer of 32 bytes as I defined in the function node. I have configured the tcp node after a fixed timer of 100 ms.

 ![tabla](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4f4cbafd8f9c8fc1a6a68429a83b258c06e7823b.png)  
 ![tanla](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/00961ba34a9b844dd2d7af66eecc939b2e4a4335.png)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [13 April 2022 12:40 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224/4 "2022-04-13T12:40:02Z")

</div>

great - so as long as those bytes are correct and the device ip address **and PORT** are correct then it should work... but I still think port 80 is meant to be http...

---

<div class="post-metadata">

### Author: ![Vedant](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@Vedant](https://discourse.nodered.org/u/Vedant)
#### Post date: [13 April 2022 12:43 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224/5 "2022-04-13T12:43:36Z")

</div>

Oh, I will check again the port but do I need to define another function or something in order to get the data from the controller or it would display in the debug window?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [13 April 2022 12:44 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224/6 "2022-04-13T12:44:25Z")

</div>

It should just display something (you have set it to be a buffer) so yes a buffer.

---

<div class="post-metadata">

### Author: ![Vedant](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@Vedant](https://discourse.nodered.org/u/Vedant)
#### Post date: [13 April 2022 12:47 UTC](https://discourse.nodered.org/t/sending-hexadecimal-commands-to-a-dx-200-controller-via-tcp/61224/7 "2022-04-13T12:47:52Z")

</div>

Thank you so much Sir for your help and quick responses! I will update you with the resullts.
