I'm trying to get the serial data send to my hardware in the debug output.I'm not sure whether it will send the data without any function node.below is the flow i have created.Kindly guide me to get serial data in the debug.currenlty it shows msg.payload as " " only. check the screenshots below.
If any node with some script is required I request you to give that also as I am at all into coding.
Im using putty in my laptop to send serial data to my hardware running nodered using RS232.whenever I type something I can see in the nodered debug Im getting the outout as shown in the picture.
So I guess data is reaching till my hardware.I just want to see the exact character as I type in putty in the debug tab.
you cant have two things talking to the same serial port - so either you can use putty OR you can use Node-RED. If you want to do what you suggest you need two serial ports connected back to back with a crossover cable
actually I am connected with cross over cable from laptop to the device where NodeRED in running. I have a seperate hardware where I am running NodeRED.So the connection is exactly same as you showed.
Hi dceejay
/dev/ttyCOM0 shows in the pallet as connected. If I change any of the character it says not connected. So I think it's properly talking with the serial port.
If I use msg.payload.length it gives the character count in the debug tab. I hope this will give you some good crack. I tried msg.payload.string hoping that it may return the character but it doesn't.
That doesn't make sense. Do you mean that no debug message appears at all, even if you keep sending data? Try it with split into fixed lengths of 1 (or another count) characters and send buffers.
When set to string do you get one message in the debug each time you send a character?
var newMsg = { payload: msg.payload.length };
return newMsg;
if I use this I am getting the number of characters typed during the time interval.see the image.
if I replace the command like this and change ascii to binary I am getting the payload as below.with ascii string payload filed shows nothing.( what are the other options available to replace "length"? any changes here will give me the character I am typing ?)
for the first reply of yours,
when I did split into fixed length of I debug output is as below.
yes , I am getting one message in debug each time I send a character.
I hope this inputs helps you to understand the behavior. Thank you so much for your inputs.
So all your characters are coming through as zeros. I presume you are confident that you have the baud rate correct. If you run something other than node-red on the receiver end are you able to receive correctly?