# Hex serial output

**URL:** <https://discourse.nodered.org/t/hex-serial-output/67707>\
**Category:** General\
**Created:** [14 September 2022 14:56 UTC](https://discourse.nodered.org/t/hex-serial-output/67707 "2022-09-14T14:56:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![173](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@173](https://discourse.nodered.org/u/173)\
**Post date:** [14 September 2022 14:56 UTC](https://discourse.nodered.org/t/hex-serial-output/67707/1 "2022-09-14T14:56:27Z")

</div>

Hi to everybody,

I am working with serial-in/out nodes from node-red-node-serialport 0.11.0.  
I have a hex message that I want to out directly but the module deliver the string as ASCII string or binary buffers.

Any idea to do that?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![austine-aj](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/austine-aj/32/67751_2.png) [@austine-aj](https://discourse.nodered.org/u/austine-aj)\
**Post date:** [15 September 2022 06:29 UTC](https://discourse.nodered.org/t/hex-serial-output/67707/2 "2022-09-15T06:29:25Z")

</div>

you can use function node to convert the binary (using "Buffer.from([binary])" ) to get output

---

<div class="post-metadata">

**Author:** ![173](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@173](https://discourse.nodered.org/u/173)\
**Post date:** [15 September 2022 07:55 UTC](https://discourse.nodered.org/t/hex-serial-output/67707/3 "2022-09-15T07:55:39Z")

</div>

> [@austine-aj](#):
>
> Buffer.from([binary])

But this would be to have again this data in node red and process it, isn't it?  
what I want is to deliver via serie as hex string (it will be delivered to a external physical device) this output or do a trick to achieve the output ascii string will be the hex output that i need ....  
Thanks again

---

<div class="post-metadata">

**Author:** ![austine-aj](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/austine-aj/32/67751_2.png) [@austine-aj](https://discourse.nodered.org/u/austine-aj)\
**Post date:** [15 September 2022 10:08 UTC](https://discourse.nodered.org/t/hex-serial-output/67707/4 "2022-09-15T10:08:27Z")

</div>

I was in need of the same thing, to give a hexa output.. which I managed to obtain buffer from binary code and sent it to the device.. that is a bit complicated.. but works( still searching for better way)

---

<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 September 2022 10:29 UTC](https://discourse.nodered.org/t/hex-serial-output/67707/5 "2022-09-15T10:29:58Z")

</div>

[node-red-contrib-buffer-parser](https://flows.nodered.org/node/node-red-contrib-buffer-parser) is idea for breaking down and building up buffers without deferring to function nodes & buffer objects.

---

<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:** [14 November 2022 10:30 UTC](https://discourse.nodered.org/t/hex-serial-output/67707/6 "2022-11-14T10:30:09Z")

</div>

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