When I launch a very light nodejs app (https://github.com/Jeija/mansonnode)* with
$ node server.js /dev/ttyUSB0
I get complains :
/dev/ttyUSB0 could not be opened, exiting.
Make sure you have the permission to open the port and that it exists.
*(I had to modify 2 or 3 lines of hcs.js in order for it to be compatible with the syntax updates of the nodejs version provided in ubuntu 20.04 repositories)
Would you guys have an idea how to get it reaching the USB device please? Regards
edit1
This https://github.com/esp8266/source-code-examples/issues/26#issuecomment-719459204 didn't work neither, and :
$ groups $USER
user : adm tty dialout
Does the app is a standalone user itself that I should add to the groups tty and dialout ? I know nothing about JS/node.
The only physical peripherals plugged into the laptop are a wireless mice dongle and the manson HCS USB-A cable.
edit2
most recent devices plugged since 2min ago :
$ find /dev/bus/usb/ ! -type d -mmin -2
/dev/bus/usb/001/012
$ udevadm info /dev/bus/usb/001/012
P: /devices/pci0000:00/0000:00:14.0/usb1/1-2
N: bus/usb/001/012
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-2
E: DEVNAME=/dev/bus/usb/001/012
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=
E: TYPE=0/0/0
E: BUSNUM=001
E: DEVNUM=012
E: MAJOR=189
E: MINOR=11
E: SUBSYSTEM=usb
E: USEC_INITIALIZED=
E: ID_VENDOR=Silicon_Labs
E: ID_VENDOR_ENC=Silicon\x20Labs
E: ID_VENDOR_ID=10c4
E: ID_MODEL=CP2102_USB_to_UART_Bridge_Controller
E: ID_MODEL_ENC=CP2102\x20USB\x20to\x20UART\x20Bridge\x20Controller
E: ID_MODEL_ID=
E: ID_REVISION=0100
E: ID_SERIAL=Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001
E: ID_SERIAL_SHORT=
E: ID_BUS=usb
E: ID_USB_INTERFACES=:ff0000:
E: ID_VENDOR_FROM_DATABASE=Silicon Labs
E: ID_MODEL_FROM_DATABASE=CP210x UART Bridge
E: ID_PATH=pci-0000:00:14.0-usb-0:2
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_2
E: ID_MM_TTY_MANUAL_SCAN_ONLY=1
edit0 for @user3840170 :
$ id
gives:
uid=1000(me) gid=1000(me) groups=1000(me),4(adm),5(tty),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),121(lpadmin),131(lxd),132(sambashare)
and
$ getfacl /dev/ttyUSB0
(no matter whether the USB device is powered ON or not) gives, when plugged to the laptop USB port :
getfacl: Removing leading '/' from absolute path names
# file: dev/ttyUSB0
# owner: root
# group: dialout
user::rw-
user:me:rw-
group::rw-
mask::rw-
other::---