after some hours to try everything I found on forum I'm finished to create this topic.
I try to send a string through the serial port of my Raspberry PI3B+ with node-red.
Even I don't hace the correct sentence on the receiver (just a configuration), it works with the simple bash command : echo "Hello" > /dev/ttyAMA0. It works too with /dev/serial0 then the configuiration is OK.
I added a inject node with "hello" and a serial out node to serrial port.
I tried with /dev/serial0 without error but not the slightest character on the receiver.
And with /dev/ttyAMA0 it crashes node-red. Need to delete the node in flows.json file and reboot.
I tried with serial control node and it seems to work: no error and node "connected" with the right parameters.
All other development works fine.
Is someone can help me please?
Thanks a lot.
PS : installation in docker with following version
debian 10 (buster)
node-red 3.1.5
node-red-node-serialport 2.0.2
rebuild --build-from-source done too.
Sorry, the ttyAMA0 doesn't work... even after @TotallyInformation proposal to enable serial port in docker.
I don't know how verify the serial port is really enable.
Serial requires a compiled C/C++ component. In keeping with all Node.js apps that interface with C/C++ components, when changing major versions of Node.js, you should rebuild the dependencies with npm rebuild or bad-things™️ will happen.
So do remember to do that when node.js major versions change. Other nodes of similar ilk will be SQLite, bluetooth, and quite a number of others. Safest simply to build rebuilds into your process when you upgrade to a new major version of Node.JS.