Serial port not working_Proxmox - Node-red

I am running into problems with a USB-serial port. I get the following error while starting node-red.
22 May 20:31:54 - [error] serial port /dev/ttyUSB0 error: Error: Error: No such file or directory, cannot open /dev/ttyUSB0

I have checked the ports. and it is listed below, only it's not working in node-red. Anyone got some tips?
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 8087:0aaa Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Reboot and look in syslog to see what it has connected as. You should see something like

usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

You should be able to find that after reboot by using the command
grep -i serial /var/log/syslog

Hi Colin,

This is what I receive

May 22 20:31:37 ProxNodeRed-1 Node-RED[138]: 22 May 20:31:37 - [info] serial port /dev/ttyUSB0 closed
May 22 20:55:38 ProxNodeRed-1 systemd[1]: Started controls configuration of serial ports.
May 22 20:55:42 ProxNodeRed-1 Node-RED[139]: 22 May 20:55:42 - [error] serial port /dev/tty error: Error: Error: No such device or address, cannot open /dev/tty
May 22 20:55:42 ProxNodeRed-1 Node-RED[139]: 22 May 20:55:42 - [info] serial port /dev/tty1 opened at 57600 baud 8N1
May 22 20:55:42 ProxNodeRed-1 Node-RED[139]: 22 May 20:55:42 - [info] serial port /dev/tty2 opened at 57600 baud 8N1
May 22 20:56:35 ProxNodeRed-1 Node-RED[139]: 22 May 20:56:35 - [info] serial port /dev/tty closed
May 22 20:57:11 ProxNodeRed-1 Node-RED[139]: 22 May 20:57:11 - [info] serial port /dev/tty1 closed
May 22 20:57:11 ProxNodeRed-1 Node-RED[139]: 22 May 20:57:11 - [info] serial port /dev/tty1 opened at 115200 baud 8N1
May 22 20:57:22 ProxNodeRed-1 Node-RED[139]: 22 May 20:57:22 - [info] serial port /dev/tty2 closed
May 22 20:57:22 ProxNodeRed-1 Node-RED[139]: 22 May 20:57:22 - [info] serial port /dev/tty2 opened at 115200 baud 8N1
May 22 20:57:37 ProxNodeRed-1 Node-RED[139]: 22 May 20:57:37 - [error] serial port /dev/tty error: Error: Error: No such device or address, cannot open /dev/tty
May 22 21:01:50 ProxNodeRed-1 Node-RED[139]: 22 May 21:01:50 - [info] serial port /dev/tty closed
May 22 21:01:50 ProxNodeRed-1 Node-RED[139]: 22 May 21:01:50 - [error] serial port /dev/ttyUSB0 error: Error: Error: No such file or directory, cannot open /dev/ttyUSB0
May 22 21:20:55 ProxNodeRed-1 Node-RED[139]: 22 May 21:20:55 - [info] serial port /dev/ttyUSB0 closed
May 22 21:20:55 ProxNodeRed-1 Node-RED[139]: 22 May 21:20:55 - [info] serial port /dev/tty1 closed
May 22 21:21:43 ProxNodeRed-1 Node-RED[139]: 22 May 21:21:43 - [info] serial port /dev/tty2 closed
May 22 21:21:43 ProxNodeRed-1 Node-RED[139]: 22 May 21:21:43 - [error] serial port /dev/tty error: Error: Error: No such device or address, cannot open /dev/tty
May 22 21:21:54 ProxNodeRed-1 Node-RED[139]: 22 May 21:21:54 - [info] serial port /dev/tty closed
May 22 21:21:54 ProxNodeRed-1 Node-RED[139]: 22 May 21:21:54 - [info] serial port /dev/tty1 opened at 115200 baud 8N1
May 22 21:27:10 ProxNodeRed-1 systemd[1]: setserial.service: Failed to reset devices.list: Operation not permitted
May 22 21:27:17 ProxNodeRed-1 Node-RED[149]: 22 May 21:27:17 - [info] serial port /dev/tty1 opened at 115200 baud 8N1

Something is pretty seriously wrong I think. Doubt this is a node-red issue.

What device is this? A Pi?

Maybe check the full dmesg command output to see any other errors related to serial/usb.

Also ls -la /dev/t* and check for the presence of the appropriate dev "files" along with their user/group ownership. On my Pi2, most tty's are owned by root:tty but USB port devices are owned by root:dialout.

Hi Thanks for you feedback.

The device is a a Intel NUC, node-red is running on ubuntu server on Proxmox,

crw-rw-rw- 1 nobody nogroup 5, 0 May 22 20:29 /dev/tty
crw--w---- 1 root tty 136, 0 May 22 21:27 /dev/tty1
crw--w---- 1 root tty 136, 1 May 22 21:27 /dev/tty2

FTDI USB serial devices usually register as /dev/ttyUSB0 1 2 etc. Redo the ls command as sudo. Also redo the grep but try grep usb and grep FTDI instead of serial. See if you can find where it registered. Also you may need to add your user to the dialout group in order to have permission to access the port.

If that is really all you have, then there is a problem with your installation of Ubuntu I think. Perhaps related to Proxmox which I've never used. Does it actually have access to the physical usb ports?

From what you've shown us so far, no usb port devices are being created. dmesg or the commands Dave has mentioned should show that. The full dmesg while harder to follow due to volume will show you the full story from boot.

Thanks for your help, i will try again tonight and let you know what the results are.
Duncan

I made a fresh install with a new Ubuntu, still no luck with the serial port. any other sugestions?

pi@Prox-Node-Red:~$ sudo grep -i USB /var/log/syslog
May 23 20:40:02 Prox-Node-Red Node-RED[541]: 23 May 20:40:02 - [error] serial port /dev/ttyUSB error: Error: Error: No such file or directory, cannot open /dev/ttyUSB
May 23 20:49:50 Prox-Node-Red Node-RED[414]: 23 May 20:49:50 - [error] serial port /dev/ttyUSB error: Error: Error: No such file or directory, cannot open /dev/ttyUSB
May 23 20:50:07 Prox-Node-Red Node-RED[414]: 23 May 20:50:07 - [info] serial port /dev/ttyUSB closed

What does lsusb report ?
Mine looks like

Bus 001 Device 003: ID 148f:2770 Ralink Technology, Corp. RT2770 Wireless Adapter
Bus 001 Device 012: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 011: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 010: ID 05e3:0604 Genesys Logic, Inc. USB 1.1 Hub

so you should have an FTDI line at least
then run dmesg | grep usb | grep FTDI
I get

usb 1-4.4.4.1: FTDI USB Serial Device converter now attached to ttyUSB2
usb 1-4.4.4.2: FTDI USB Serial Device converter now attached to ttyUSB3

So you can see where it installs to... if it does

This is what I get but it still doesnt work in node-red?

pi@Prox-Node-Red:/dev$ dmesg | grep usb | grep FTDI
[ 2.297350] usb 1-3: Manufacturer: FTDI
[ 5.248994] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 5.253192] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
[ 1313.769642] usb 1-3: Manufacturer: FTDI
[ 1313.772794] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
[ 1860.073540] usb 1-2: Manufacturer: FTDI
[ 1860.076697] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 2879.710561] usb 1-3: Manufacturer: FTDI
[ 2879.713528] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
[89372.475172] usb 1-4: Manufacturer: FTDI
[89372.478246] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0

I only see the tty1 files, and no USB
pi@Prox-Node-Red:/dev$ ls
console core fd full initctl log mqueue null ptmx pts random shm stderr stdin stdout tty tty1 tty2 urandom zero
pi@Prox-Node-Red:/dev$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 8087:0aaa Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

so you should have a /dev/ttyUSB0
try ls -l /dev/ttyUSB0 and
sudo ls -l /dev/ttyUSB0
and also while we are at it groups

Hi dcejay, I don't have /dev/ttyUSB0?

Last login: Thu May 23 21:20:04 2019 from 192.168.1.109
pi@Prox-Node-Red:~ ls -l /dev/ttyUSB0 ls: cannot access '/dev/ttyUSB0': No such file or directory pi@Prox-Node-Red:~ sudo ls -l /dev/ttyUSB0
[sudo] password for pi:
ls: cannot access '/dev/ttyUSB0': No such file or directory

OK . reboot with adapter plugged in. Then run groups and then sudo ls /dev/ttyU*

dceejay,

This is the result. Because the Ubuntu is running on a Proxmox VM, is it possible the port isn't mapped from one machine to the other?

pi@Prox-Node-Red:~ groups pi sudo pi@Prox-Node-Red:~ sudo ls /dev/ttyU*
[sudo] password for pi:
ls: cannot access '/dev/ttyU*': No such file or directory
pi@Prox-Node-Red:~$

Ok. Will hand you over to proxmox folk as it’s not a NodeRed problem

Yes, as you will see by looking through dmesg from last boot. I think you will find no such devices are created.

Hi Thanks guys for your time and patience. When I solve this problem I will post it here. Maybe it can help someone else.

1 Like