# Buffer value adding - SIA Protocol

**URL:** <https://discourse.nodered.org/t/buffer-value-adding-sia-protocol/26536>\
**Category:** General\
**Created:** [12 May 2020 15:10 UTC](https://discourse.nodered.org/t/buffer-value-adding-sia-protocol/26536 "2020-05-12T15:10:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sabrovich](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Sabrovich](https://discourse.nodered.org/u/Sabrovich)\
**Post date:** [12 May 2020 15:10 UTC](https://discourse.nodered.org/t/buffer-value-adding-sia-protocol/26536/1 "2020-05-12T15:10:05Z")

</div>

Hello,  
I am trying to send alarm alerts messages using SIA - DC09 protocol ( [https://www.yumpu.com/en/document/view/47594214/dc-09-preparing-for-ansi-public-review-security-industry-](https://www.yumpu.com/en/document/view/47594214/dc-09-preparing-for-ansi-public-review-security-industry-) )  
Already look at the forum, don't succeed in finding an answer...

I have to send through TCP Buffer a message once converted should be lokking like that :  
_[**10** ,49,49,70,70,48,48,50,53,34,78,65,75,34,48,48,48,48,82,48,76,48,65,48,91,93,95,49,52,58,53,52,58,50,54,44,48,52,45,49,50,45,50,48,50,48, **13**]_

from a string : "11FF0025"NAK"0000R0L0A0\_14:54:26,04-12-2020"

For this, I use Function : var data = Buffer.from(msg.payload); and TCP Request node.

It works well to send.

In order to be well read, I need to add 0x0a (10) and 0x0d (13) at the beginning and the end of the buffer (bold digit in the message above.

Do you have any idea how I can add these hexa values to my buffer array before sending ?

Thank you in advance

---

<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:** [12 May 2020 15:16 UTC](https://discourse.nodered.org/t/buffer-value-adding-sia-protocol/26536/2 "2020-05-12T15:16:51Z")

</div>

```auto
var data = Buffer.from("\n"+msg.payload+"\r");

```

---

<div class="post-metadata">

**Author:** ![Sabrovich](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Sabrovich](https://discourse.nodered.org/u/Sabrovich)\
**Post date:** [12 May 2020 15:24 UTC](https://discourse.nodered.org/t/buffer-value-adding-sia-protocol/26536/3 "2020-05-12T15:24:40Z")

</div>

Thank you for your help !  
It works with the full fonction :

var data = Buffer.from("\n"+msg.payload+"\r");  
msg.payload = data;  
return msg;

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 May 2020 15:24 UTC](https://discourse.nodered.org/t/buffer-value-adding-sia-protocol/26536/4 "2020-05-26T15:24:53Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
