Serial in and out not working

Hi,

I have a project where i'm using multiple barode readers. They are connected to a Raspberry pi 4 on bookworm version. Node-RED version: v3.1.5 Node.js version: v18.19.0. Now when using the flow 'serial request' i can push an inject and it works (i get the right barcode in my debug messages) but when i'm using seperate 'serial in' and 'serial out' flows, i do not get any output. Is there a clear reason for this? Happy to add more information.

possibly due to incorrect end of line settings (i.e. the request may be adding a CR or LF. Do you add those when sending via serial-out?)

If you are really struggling to make progress and want to fully understand the issue, then you can install a serial monitor program and compare the serial data sent via serial-request vs the data sent via serial-out. The differences should be immediately obvious.

Sadly i cannot install serial monitor program (work PC). It looks like there is a default added end character 'CR'. I'm not sure where to add this in my properties of my serial port. I tried adding it to "Optionally wait for a start character of", "Split input" and "Add character to output messages" but i always get this in my debug screen: msg.payload : undefined undefined.
Edit: I ofcorse could add a serial monitor to my Raspberry Pi, so i did and i only get the barcode (like: 101401582) but in my Manual of my 'SparkFun 2D Barcode Scanner Breakout' it says it should add a CR at the end. Not really sure what to do now.

What do you send to the serial-out node - show me.

Thank you very much with helping, it works now. Somehow it only works when i send a hex instead of a string. According to my manual it should work both but apparently not....

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