ERROR: Failed to open serial port /dev/ttyACM2


#1

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.


#2

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.


#3

I will do it tonight.
thanks for your help.


#4

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.


#5

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


#6

Here you are the type off message I receive

Before the serial port was on ttyACM1.

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


#7

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


#8

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


#9

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


#10

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.


#11

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


#12

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.


#13

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 :wink:

ps: TotallyInformation. could you give an exemple ?

Thank you


#14

These should put you on the right track:

http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/


#15

Thank you