Hi,I have a I have a beaglebone black board and I want to control one serialport, there have 6 serialports(/dev/ttyS0-/ dev/ttyS5). The node-RED flow is simple as follows:
But after deployment, there has an error message:” Permission denied, cannot open /dev/ttyS2". i run this
chmod a+rw /dev/ttyS2
so serialport can be connected because There is a small green dot below the”serial out” icon.
But after reboot, it can not be opened and I need to use “chmod a+rw /dev/ttyS2” again. I know serialport should be authorized before using.I want to serialports could be connected automatically after the BBB is powered on. should I login Node-red as root mode or edit the settings.js ? I am a new user of beaglebone black board and Node-RED. How to do? I hope someone can help me solve this problem, Here I express my gratitude in advance to those who can help me.
Hardware is beaglebone instead of Pi. So,I think the command "sudo usermod -a -G tty pi" is invalid. The Node-red service is automatically started after power on, so I am not sure about the login user of Node-red. I use this command and got some informations:
debian@beaglebone:~$ ls -l /dev/ttyS*
crw------- 1 debian tty 4, 64 Feb 12 2021 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Feb 12 10:56 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Feb 12 10:56 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Feb 12 10:56 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 Feb 12 10:56 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 Feb 12 10:56 /dev/ttyS5
should I login Node-red as root mode or edit the settings.js ?which one ID is Node-red default user and group?
@dceejay , i agree that should have been the default, all fixed now!
Setting up bb-node-red-installer (1.2.9-0rcnee2~buster+20210212) ...
Creating/updating node-red user account...
groupadd: group 'gpio' already exists
Updating node-red user to group gpio
Updating node-red user to group dialout
bb-node-red-installer:Installed