ERROR: Failed to open serial port /dev/ttyACM2

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.

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.

I will do it tonight.
thanks for your help.

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.

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

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

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

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

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

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.

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

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.

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

These should put you on the right track:

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

Thank you