Port /dev/ttyUSBx denied

Bonjour,
Depuis le passage à la v3 de Node Red , je ne peux plus accéder a mon boitier Rflink, qui est branché sur un port Usb d'un raspberry3b+. J'utilise la palette " node-red-node-serialport" et je suis sous Node.js v16.6 . J'obtiens cette erreur quand je "deploy" :
"[serialconfig:5fefad5a76dd3e43] serial port /dev/ttyUSB1 error: Error: Error: Permission denied, cannot open /dev/ttyUSB1"
Est ce que ce problème peut etre lié a la version 3 de Node Red? sous la version précédente v2.x, tout se passait bien.

Did you change node.js versions when you upgraded Node-RED? If so, you need to do a rebuild of your nodes.

cd ~/.node-red
npm rebuild

Bonjour @TotallyInformation
merci pour votre reponse
J'ai planté node red et quand je l'ai redémarré, je suis passé en version 3, j'ai vu qu'il fallait Node.js v16, donc je suis monté de version. ça fonctionnait toujours pas alors j'ai tout réinitialisé, dont tous mes flows. Est ce que je peux exécuter ce que vous me dites ou c'est trop tard.

If you deleted everything, you will not be able to get anything back unless you have a backup.

It is likely that you did not delete the ~/.node-red/node_modules folder though and that is where the node packages are kept.

When node.js changes major version is is normal for the C++ libraries to need recompiling which is what the rebuild command does amongst other things. The serialport node uses some compiled C++ and so needs rebuilding. It never hurts to run rebuild other than it may take a bit of time on a Pi.

merci pour vos réponses @TotallyInformation
j'ai tout réinstallé, Node red V3 et node.js v16.6.0, j'ai restauré mes flows , j' ai recompilé comme vous me l'avez suggéré, mais j'ai toujours ce problème

"[serialconfig:5fefad5a76dd3e43] serial port /dev/ttyUSB1 error: Error: Error: Permission denied, cannot open /dev/ttyUSB1"

Is the user running node red in the dialout group?

bonsoir @Colin
je ne suis pas très fort dans linux, dites moi comment je peux voir ça s'il vous plait!

Run the command
groups
to see the groups the logged in user is in. If not in dialout then you need to add the user to that group. I always have to look up how to do that. Reboot after fixing it.

pi adm dialout cdrom sudo audio video plugdev games users input render netdev docker gpio i2c spi

ça me renvoie ça . Je vous avoue que je ne comprends pas ce que ça veut dire

The user is in the dialout group, so that is not the problem. I don't know why you get the error.

Merci quand même, je vais continuer à chercher
bonne soirée :smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.