# Serial port modifications

**URL:** <https://discourse.nodered.org/t/serial-port-modifications/80187>\
**Category:** General\
**Created:** [31 July 2023 12:32 UTC](https://discourse.nodered.org/t/serial-port-modifications/80187 "2023-07-31T12:32:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadirm](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@nadirm](https://discourse.nodered.org/u/nadirm)\
**Post date:** [31 July 2023 12:32 UTC](https://discourse.nodered.org/t/serial-port-modifications/80187/1 "2023-07-31T12:32:09Z")

</div>

Hi all,

I am developing a node-red flow using a raspberry pi's serial port com and baud rate, and I'm looking for a way to dynamically change the com port and baud rate from a message or a global variable.

I was unable to succeed despite trying a few options.

I'd be happy to check any solutions you know of 🙂

Thanks.

---

<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:** [31 July 2023 15:41 UTC](https://discourse.nodered.org/t/serial-port-modifications/80187/2 "2023-07-31T15:41:03Z")

</div>

Hi @nadirm - pretty sure this is not possible (the serial node was not designed to be re-mapped at runtime)

You can however use env variables. Typically, you set an env var then node-red uses its value at startup.

[https://nodered.org/docs/user-guide/environment-variables](https://nodered.org/docs/user-guide/environment-variables)

---

<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:** [29 September 2023 15:41 UTC](https://discourse.nodered.org/t/serial-port-modifications/80187/3 "2023-09-29T15:41:54Z")

</div>

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