# ERROR: Failed to open serial port /dev/ttyACM2

**URL:** <https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665>\
**Category:** General\
**Created:** [8 November 2018 04:05 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665 "2018-11-08T04:05:35Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [8 November 2018 04:05 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/1 "2018-11-08T04:05:35Z")

</div>

Hi,

How can I change the port ttyACM2 with ttyACM1 with Linux/Stretch in command line ?

Node-red doesn't want to start. Before, with ttyACM1 port (usb port), it was ok.  
I can see the USB ttyACM1 (lsusb /dev) and I know that is the correct port, but how can I change it ?

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [8 November 2018 08:52 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/2 "2018-11-08T08:52:29Z")

</div>

A missing Serial connection shouldn’t stop Node-RED from opening. Please can you start Node-RED from the command line and paste the text here.

---

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [8 November 2018 13:40 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/3 "2018-11-08T13:40:29Z")

</div>

I will do it tonight.  
thanks for your help.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 November 2018 13:46 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/4 "2018-11-08T13:46:08Z")

</div>

It is also worth researching into udev rules to ensure your device shows up as the same /dev device each time it is plugged in. This removes the issue of it being assigned a different device name.

---

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [8 November 2018 13:54 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/5 "2018-11-08T13:54:51Z")

</div>

Ok, thks for this information. I didn,t know that...I will see.

---

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [8 November 2018 22:28 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/6 "2018-11-08T22:28:05Z")

</div>

Here you are the type off message I receive

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/fbf5643964b5bc530395f136cce01de33baf60fd.png)

Before the serial port was on ttyACM1.

I will try to see udev too and keep you in touch.  
thks

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 November 2018 08:53 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/7 "2018-11-09T08:53:21Z")

</div>

You said that node red doesn't start, but that just shows errors because you have asked for ttyACM2 but it is not available, it does not show that node red has crashed.  
For the future it is better to copy/paste terminal output if possible. You can copy from the terminal using Ctrl-Shift-C

---

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [9 November 2018 13:29 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/8 "2018-11-09T13:29:28Z")

</div>

Thank you for your reply Colin.  
Ok, I will copy from the terminal using Ctrl-Shift-C.  
Its very strange, if i do: node-red-start in the consol, Node-Red start correctly but I find old knots, but if i do node-red start (with a space between "red" and "start", Node-red does not start and i have this error.

Do i have to reinstall correctly Node-Red from scratch ?

Thans you for your help

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [9 November 2018 13:43 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/9 "2018-11-09T13:43:23Z")

</div>

`node-red-start` is the command you should be using  
see [https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 November 2018 14:00 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/10 "2018-11-09T14:00:11Z")

</div>

> [@florent](#):
>
> if i do: node-red-start in the consol, Node-Red start correctly but I find old knots, but if i do node-red start (with a space between "red" and "start", Node-red does not start and i have this error.

Look at the output and I suspect you will see that node red is starting in a different folder. The output will tell you where the flows file is. If you see different nodes then you must be running a different flows file.

---

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [9 November 2018 14:18 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/11 "2018-11-09T14:18:48Z")

</div>

I thought too. I think I have a mix somewhere with the old knots and the recent knots I did when the USB Z-wave key was on ttyACM1.

I will see this week-end and keep you in touch

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 November 2018 12:20 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/12 "2018-11-10T12:20:50Z")

</div>

> [@florent](#):
>
> I did when the USB Z-wave key was on ttyACM1.

Did you note the comment from Nick about using UDEV? This is important as Linux will automatically use the next available dev slot if, for example, you get an error that doesn't correctly close and reopen the device. With UDEV, you specify the name that you want and so you always get the same name - no more problems like this.

This is exactly what I do on my live system.

---

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [12 November 2018 03:54 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/13 "2018-11-12T03:54:27Z")

</div>

Hi Colin,  
You were right, node-red was started two differents files depending the "node-red-start(.node-red/flows-raspeberry.jason)" or "node-red start(.node-red/start)".  
ukmoose, I know that is normaly "node-red\_start", but for a unknow raison its was working. Anyway, I will make a fresh and clean installation of Node-red to be sure all is all right.

Thank you again for your help guys, its very appreciate for a beginner as me 😉

ps: TotallyInformation. could you give an exemple ?

Thank you

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 November 2018 06:56 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/14 "2018-11-12T06:56:14Z")

</div>

> [@florent](#):
>
> ps: TotallyInformation. could you give an exemple ?

These should put you on the right track:

[http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/)

> <https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name>

---

<div class="post-metadata">

**Author:** ![florent](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@florent](https://discourse.nodered.org/u/florent)\
**Post date:** [12 November 2018 13:58 UTC](https://discourse.nodered.org/t/error-failed-to-open-serial-port-dev-ttyacm2/4665/15 "2018-11-12T13:58:00Z")

</div>

Thank you
