# MQTT with Arduino Nano + NodeRed

**URL:** <https://discourse.nodered.org/t/mqtt-with-arduino-nano-nodered/37351>\
**Category:** General\
**Created:** [11 December 2020 13:22 UTC](https://discourse.nodered.org/t/mqtt-with-arduino-nano-nodered/37351 "2020-12-11T13:22:03Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [12 December 2020 07:15 UTC](https://discourse.nodered.org/t/mqtt-with-arduino-nano-nodered/37351/18 "2020-12-12T07:15:16Z")

</div>

> [@knolleary](#):
>
> The question is about Comms between nano and Node-RED. Whether that is serial or MQTT is all part of the discussion in this topic.

OK, in this case I re-form my question:

# What's the most stable and universal way to connect to an Arduino Nano via USB?

By "stable" I mean:

- it should handle Xon/Xoff buffer overflow control
- parity check
- auto reconnection
- port releasing

I have 25+ years of experience with serial com. and I've learned without these things it's causing many troubles. And there are many cases even on this forum too to show I'm right, like here:

> [@Arduino serial port closed](https://discourse.nodered.org/t/arduino-serial-port-closed/20350):
>
> I'm using an Arduino Uno R3 for my project and running into an issue where the serial port randomly closes and does not reconnect. This is the error I receive: "Arduino serial port closed" These are the environment details: Node Red is running on a Windows machine I use node-red-node-arduino to connect to and monitor the Arduino Arduino is located in a different room than the machine which runs Node Red Arduino is connected to the computer via USB to ethernet adapter 6 analogue pins and 11 d…

I'd like to avoid cases like that.

---

_[View the full topic](https://discourse.nodered.org/t/mqtt-with-arduino-nano-nodered/37351)._
