Node-red-node-serialport 0.6.8 not working (0.4.2 do)

That is incorrect. Node-RED does not have to run as root in order to use the serialport.

1 Like

When i run as user pi or any other new user the serialport-node V0.4.2 connects, the V0.6.8 not. As user root it works. All users are in the group "dialout".

I am sure, that i do not fully understand that all, but that is what i observed.

can you do an ls -la \dev\... to list the owner and group assigned to the ports?

root@siot:~# ls -la /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Dec 9 21:41 /dev/ttyUSB0

This is surely some other issue with snap - I run on a Pi with the pi user in dialout and it all works fine.

snaps don't (yet) support hot-plug serial ports - coming shortly... but not there yet.
(though I thought he had moved off snaps to a more conventional install now...)

I had no problems with serial port inside snap (See above). I described the whole install process. After that - node-red run as root and serial port worked perfect.

But I switched back to nativ (traditional) Installation, because the NMCLI does not work so easily inside snap.

I also described that there are differences between the versions of serialport. But maybe because of other dependencies, I donā€™t know. I am not that Ubuntu/Linux crack.

Thx.

Sorry to disagree - but you did have a problem. You had to run Node-RED as root and that IS a problem except in the most isolated of systems.

Julian, well yes and no .. In general running as root is a problem... but with snaps although the snap is running as "root" it is a chrooted root inside a tightly contained box (see my post above 21d ago) so you it can't get out. But yes - it's another way of doing things that isn't quite mainstream so has it's wrinkles and quirks we all have to work out yet.

2 Likes

Ah, thanks for that.