# Send message on tcp node

**URL:** <https://discourse.nodered.org/t/send-message-on-tcp-node/73643>\
**Category:** General\
**Created:** [13 January 2023 15:41 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643 "2023-01-13T15:41:08Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [13 January 2023 15:41 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/1 "2023-01-13T15:41:08Z")

</div>

Hello  
I have an interconnection project with a system communicating in TCP via port 3005.  
I set up a TCP request node with the site's IP address and port 3005. As input I put a null inject for the test.

When I click on inject the tcp node shows connect.  
Now I have to send a connection request to the system with the following frame:  
23 30 30 30 30 31 34 0F 27 78 FF 01 37 0D

What type of data should I use (string number or other)?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [13 January 2023 16:01 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/2 "2023-01-13T16:01:24Z")

</div>

> [@LinkView\_Maze](#):
>
> 23 30 30 30 30 31 34 0F 27 78 FF 01 37 0D

Using a `function` node connected to the TCP input, the below will send a buffer of bytes

```javascript
const byteArray = [0x23,0x30,0x30,0x30,0x30,0x31,0x34,0x0F,0x27,0x78,0xFF,0x01,0x37,0x0D]
const dataBuffer = Buffer.from(byteArray)
return {payload:dataBuffer}

```

You could do this directly in the `inject` node also, by setting the payload type as `buffer`, and remove `0x`, but as this is hexadecimal - I _think_ it will error if using `inject`

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [13 January 2023 16:42 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/4 "2023-01-13T16:42:44Z")

</div>

Hello  
Great the 1st solution is the correct one. I have feedback from the server.

On the other hand, it comes back in the raw form. How can I reconstruct the frame to do an analysis?

the cat will have to tell me:  
23 30 30 30 30 31 15 0E 27 78 FF 01 01 01 0D  
 ![return tcp first message](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74df528321bc30fc0838a4a550d8aeb779d911ae.jpeg)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [13 January 2023 17:00 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/5 "2023-01-13T17:00:08Z")

</div>

> [@LinkView\_Maze](#):
>
> How can I reconstruct the frame to do an analysis?

That will be based on the systems documentation in question.  
its a buffer of bytes (like we sent) and its responded with its buffer.

You will need to understand what this buffer contains, in order to make is useable for you.

I do at this point suggest to use the excellent node.

> **[node-red-contrib-buffer-parser](https://flows.nodered.org/node/node-red-contrib-buffer-parser)**
>
> Node-red nodes to convert values to and from buffer/array. Supports Big/Little Endian, BCD, byte swapping and much more

By our very own @Steve-Mcl  
This Node will help you label and partition the buffer into a usable object, but ultimately, you need to understand the contents of this buffer, to be able to partition it

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [13 January 2023 19:10 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/6 "2023-01-13T19:10:01Z")

</div>

For the concordance no worries I have a whole document but for that I have to reformat my frames before.

in my previous example:  
23 = # start message  
30 30 30 30 31 35 = total message length with 23 and OD included  
the rest is as posted  
OD = /r end of message

except that I receive a lot of messages at the same time and I have to reconstitute them according to 30 30 30 30 3x 3x how can I do?

 ![return tcp first message full](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/76f87c2b2af6394664f2fa009acf73754204ae59.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [13 January 2023 19:28 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/7 "2023-01-13T19:28:03Z")

</div>

> [@LinkView\_Maze](#):
>
> OD = /r end of message

1. setup the TCP to split on `0D` so that each communication is an "single packet"
2. check each packet starts with 23
3. convert the first part of the message to get the ID or length (or whatever you need)
4. route the remainder of the buffer to a buffer-parser, setup to interpret for the type of message received on step 3

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [14 January 2023 09:15 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/8 "2023-01-14T09:15:44Z")

</div>

Thank you how do I cut the buffer as soon as I receive a 0D?

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [14 January 2023 14:00 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/9 "2023-01-14T14:00:29Z")

</div>

I found the solution to have a single message now I isolated the start 23 the length of the total message (30 30 30 30 30 30) and the command code (340A = 2612 after having reversed the two digits).

![size message](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/1/515cd89763f1a52c53c66c9d85eda506e8e6055c.jpeg)

how I have to do so that each message is translated according to a concordance table (which I have) I have to analyze each buffer to recover the code and transcribe it.

sorry for the questions but i'm a beginner in TCP and buffer.

FYI json flow

```auto
[{"id":"ad0170f0.40b16","type":"tab","label":"ORBILITY","disabled":false,"info":""},{"id":"f0e94466.839b88","type":"tcp request","z":"ad0170f0.40b16","server":"93.177.69.133","port":"3005","out":"sit","splitc":" ","name":"","x":590,"y":80,"wires":[["a7d28b8c.49a728"]]},{"id":"7b2cada6.e99494","type":"inject","z":"ad0170f0.40b16","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":40,"wires":[["cad09232.42b39","9bcc76b.56efc88"]]},{"id":"cad09232.42b39","type":"function","z":"ad0170f0.40b16","name":"#9999","func":"const byteArray = [0x23,0x30,0x30,0x30,0x30,0x31,0x34,0x0F,0x27,0x78,0xFF,0x01,0x37,0x0D]\nconst dataBuffer = Buffer.from(byteArray)\nreturn {payload:dataBuffer}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":40,"wires":[["f0e94466.839b88"]]},{"id":"a7d28b8c.49a728","type":"buffer-parser","z":"ad0170f0.40b16","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"hex","name":"start","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"size","offset":1,"length":6,"offsetbit":0,"scale":"1","mask":""},{"type":"hex","name":"clé","offset":7,"length":2,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":790,"y":80,"wires":[["1b5e44ed.9d79ab"]]},{"id":"1b5e44ed.9d79ab","type":"debug","z":"ad0170f0.40b16","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":80,"wires":[]},{"id":"9bcc76b.56efc88","type":"trigger","z":"ad0170f0.40b16","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-20","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":170,"y":120,"wires":[["78f312d4.aa3d2c"]]},{"id":"78f312d4.aa3d2c","type":"function","z":"ad0170f0.40b16","name":"#9997","func":"const byteArray = [0x23,0x30,0x30,0x30,0x30,0x31,0x33,0x0D,0x27,0x78,0xFF,0x01,0x0D]\nconst dataBuffer = Buffer.from(byteArray)\nreturn {payload:dataBuffer}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":120,"wires":[["f0e94466.839b88"]]},{"id":"7c4b1f63.c2143","type":"function","z":"ad0170f0.40b16","name":"#2406","func":"const byteArray = [0x23,0x30,0x30,0x30,0x30,0x31,0x35,0x66,0x09,0x78,0xFF,0x01,0x00,0x00,0x0D]\nconst dataBuffer = Buffer.from(byteArray)\nreturn {payload:dataBuffer}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":220,"wires":[["f0e94466.839b88"]]},{"id":"ce7e4a0b.c58148","type":"inject","z":"ad0170f0.40b16","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":220,"wires":[["7c4b1f63.c2143"]]}]

```

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [14 January 2023 17:49 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/10 "2023-01-14T17:49:12Z")

</div>

> [@LinkView\_Maze](#):
>
> sorry for the questions but i'm a beginner in TCP and buffer.

Don't be! its why the forums are here.

I do suggest (if not already using) use the buffer-parser node, its perfect for these types of environments

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 January 2023 09:33 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/11 "2023-01-15T09:33:53Z")

</div>

> [@LinkView\_Maze](#):
>
> how I have to do so that each message is translated according to a concordance table (which I have) I have to analyze each buffer to recover the code and transcribe it.

You need to use something to identify the response and direct it to a specific parser (as I said before)...

> [@Steve-Mcl](#):
>
> route the remainder of the buffer to a buffer-parser, setup to interpret for the type of message received on step 3

eg:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/8/386ccdf42ee410e0ec009942900c9f3f9f41fd16.png)

demo flow (import using `ctrl-i`):

```auto
[{"id":"7b2cada6.e99494","type":"inject","z":"ad0170f0.40b16","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":295,"y":160,"wires":[["cad09232.42b39"]],"l":false},{"id":"cad09232.42b39","type":"function","z":"ad0170f0.40b16","name":"#9999","func":"const byteArray = [0x23,0x30,0x30,0x30,0x30,0x31,0x34,0x0F,0x27,0x78,0xFF,0x01,0x37,0x0D]\nconst dataBuffer = Buffer.from(byteArray)\nreturn {payload:dataBuffer}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":160,"wires":[["a7d28b8c.49a728"]]},{"id":"a7d28b8c.49a728","type":"buffer-parser","z":"ad0170f0.40b16","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"hex","name":"start","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"size","offset":1,"length":6,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16le","name":"clé","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"buffer","name":"data","offset":9,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":570,"y":200,"wires":[["212da6fcb2c4e528"]]},{"id":"78f312d4.aa3d2c","type":"function","z":"ad0170f0.40b16","name":"#9997","func":"const byteArray = [0x23,0x30,0x30,0x30,0x30,0x31,0x33,0x0D,0x27,0x78,0xFF,0x01,0x0D]\nconst dataBuffer = Buffer.from(byteArray)\nreturn {payload:dataBuffer}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":200,"wires":[["a7d28b8c.49a728"]]},{"id":"7c4b1f63.c2143","type":"function","z":"ad0170f0.40b16","name":"#2406","func":"const byteArray = [0x23,0x30,0x30,0x30,0x30,0x31,0x35,0x66,0x09,0x78,0xFF,0x01,0x00,0x00,0x0D]\nconst dataBuffer = Buffer.from(byteArray)\nreturn {payload:dataBuffer}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":240,"wires":[["a7d28b8c.49a728"]]},{"id":"ce7e4a0b.c58148","type":"inject","z":"ad0170f0.40b16","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":295,"y":240,"wires":[["7c4b1f63.c2143"]],"l":false},{"id":"aab0085b86ba368a","type":"inject","z":"ad0170f0.40b16","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":295,"y":200,"wires":[["78f312d4.aa3d2c"]],"l":false},{"id":"2db36df574901360","type":"switch","z":"ad0170f0.40b16","name":"9999 \\n 9997 \\n 2406 \\n other","property":"payload[\"clé\"]","propertyType":"msg","rules":[{"t":"eq","v":"9999","vt":"num"},{"t":"eq","v":"9997","vt":"num"},{"t":"eq","v":"2406","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":770,"y":200,"wires":[["d6c58a522011f202"],["53e4663efcab6397"],["9b619c4c55f3504e"],[]]},{"id":"d6c58a522011f202","type":"buffer-parser","z":"ad0170f0.40b16","name":"parse 9999 type","data":"payload.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint16le","name":"num1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16le","name":"num2","offset":2,"length":1,"offsetbit":0,"scale":"/ 100","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload.parsed","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":960,"y":160,"wires":[["1b5e44ed.9d79ab"]]},{"id":"53e4663efcab6397","type":"buffer-parser","z":"ad0170f0.40b16","name":"parse 9997 type","data":"payload.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint16le","name":"num1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16le","name":"num2","offset":2,"length":1,"offsetbit":0,"scale":"/ 100","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload.parsed","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":960,"y":200,"wires":[["32044cf957826b16"]]},{"id":"9b619c4c55f3504e","type":"buffer-parser","z":"ad0170f0.40b16","name":"parse 2406 type","data":"payload.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint16le","name":"num1","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint16le","name":"num2","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"byte","name":"byte","offset":4,"length":1,"offsetbit":0,"scale":"/ 100","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload.parsed","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":960,"y":240,"wires":[["fec8ce59c151dea9"]]},{"id":"212da6fcb2c4e528","type":"function","z":"ad0170f0.40b16","name":"Size Str to Number","func":"msg.payload.size = Number(msg.payload.size)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":685,"y":200,"wires":[["2db36df574901360"]],"icon":"node-red-dashboard/ui_numeric.png","l":false}]

```

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [15 January 2023 12:41 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/12 "2023-01-15T12:41:53Z")

</div>

I had done a similar thing but I do not go back through a parse node.

what is node 123?

 ![Screenshot_20230115_084736_Chrome](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/d/8d8b4b29429bffba0c874ec47cc3b9885ae31331.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 January 2023 17:48 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/13 "2023-01-15T17:48:20Z")

</div>

> [@LinkView\_Maze](#):
>
> what is node 123

Just a function node

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [17 January 2023 09:32 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/14 "2023-01-17T09:32:43Z")

</div>

Hi,

I have made good progress on the subject but I still have two points that I cannot resolve.

- I receive a payload with an event in HEXA on 2 bits "002b" which must be transcribed into numeric (without inversion of the HEXA bits) to have the value "43"
- On the second part of the capture we see that the buffer does [819], which makes me understand, that it cut the messages badly. how can i resolve this?

 ![Capture d'écran_20230117_101600](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/5/35b36ff33f1868d250cddf3392f0ae80ba301a43.png)

 ![flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c8d40af513bda4207ef4deeced670371b5098130.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 January 2023 10:26 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/15 "2023-01-17T10:26:00Z")

</div>

> [@LinkView\_Maze](#):
>
> I receive a payload with an event in HEXA on 2 bits "002b" which must be transcribed into numeric (without inversion of the HEXA bits) to have the value "43"

Use `uint16` instead of `int16`.

INT16 is "16 bit Integer" (e.g. -32768 ~ 32767)  
UINT16 is "Unsigned 16 bit Integer" (e.g. 0 ~ 65535)

e.g.:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/7/97c427cb5d1b25e6805f902cdc98873a362bc356.png)

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [17 January 2023 11:56 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/16 "2023-01-17T11:56:03Z")

</div>

I configured my node buffer-parser in unit16(le) but the result is 0018 and is not converted

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/58a4c162a2d91894d87e3f7526651c877de6987f.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 January 2023 12:04 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/17 "2023-01-17T12:04:51Z")

</div>

> [@LinkView\_Maze](#):
>
> I configured my node buffer-parser in unit16(le) but the result is 0018 and is not converted

You have not set that one to uint. it is set to "hex" which is shorthand for "hexadecimal string" (e.g. 0x0018 === 24 decimal)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/090757b36c4d38d800245676a81acf0b930efe36.png)

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [28 January 2023 17:39 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/18 "2023-01-28T17:39:17Z")

</div>

can the tcp node be configured by msg? I would like to make a msg.url and msp.port in the same style as that of Http with msg.url

---

<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:** [28 January 2023 19:51 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/19 "2023-01-28T19:51:54Z")

</div>

Yes if you read the help text it can.

---

<div class="post-metadata">

**Author:** ![LinkView\_Maze](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@LinkView\_Maze](https://discourse.nodered.org/u/LinkView_Maze)\
**Post date:** [29 January 2023 13:26 UTC](https://discourse.nodered.org/t/send-message-on-tcp-node/73643/20 "2023-01-29T13:26:25Z")

</div>

Thank you
