# How to send this HEX command to my device using Node-red

**URL:** <https://discourse.nodered.org/t/how-to-send-this-hex-command-to-my-device-using-node-red/74419>\
**Category:** General\
**Created:** [30 January 2023 13:25 UTC](https://discourse.nodered.org/t/how-to-send-this-hex-command-to-my-device-using-node-red/74419 "2023-01-30T13:25:00Z")\
**Posts on this page:** 1\
**Showing post:** 32

<div class="post-metadata">

**Author:** ![NabilHaidar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nabilhaidar/32/75253_2.png) [@NabilHaidar](https://discourse.nodered.org/u/NabilHaidar)\
**Post date:** [31 January 2023 10:00 UTC](https://discourse.nodered.org/t/how-to-send-this-hex-command-to-my-device-using-node-red/74419/32 "2023-01-31T10:00:50Z")

</div>

Thanks for replying, yes the content of the function and the reply before was for this:

> [@marcus-j-davies](#):
>
> ```auto
> var buf = Buffer.from([0xaa,0x3f,0x00,0xf011]); /* 170, 63, 0, 17 */
> msg.payload = buf;
> return msg;
> 
> ```

Then I rewrote it in this form:

> [@magicfire](#):
>
> ```auto
> var buf = Buffer.from([0xaa, 0x3f, 0x00, 0x00, 0xf0, 0x11]);
> msg.payload = buf;
> return msg;
> 
> ```

- I have changed the Serial Port Setting to delivering binary buffer.
- The error:

> [@NabilHaidar](#):
>
> "TypeError: The List[1]" argument must be an instance of Buffer or Unit8Array. Received type is string (' ')"

is coming from the Serial Node and not from the debugger attached to it. The serial node will stay waiting until I redeploy something and then also no response from the debugger attached to the serial node.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-send-this-hex-command-to-my-device-using-node-red/74419)._
