Re: [node-red] Carriage Return vis Serial Node

3,629 views
Skip to first unread message

Nicholas O'Leary

unread,
Apr 20, 2015, 11:24:21 AM4/20/15
to Node-RED Mailing LIst
Hi Justin,

how exactly are you constructing the payload you want to send to the Serial node?

Nick

On 20 April 2015 at 16:15, Justin Hope <justi...@c2crail.net> wrote:
Good afternoon all,

I have an old embedded Motorola 68000 which I have connected to using the Serial Port Node.  I am able to send information to it but, it doesnt like any form of carriage return.

I would presume I am firing over the commands in ascii but the "\n" just gets added to the text and the processor does nothing.  Should I be approaching it differently? I am using the latest version of node and npm so I doubt its that.

Any pointers are welcome

J
--


************************************************************************************

Think Green!!! Please don't print this e-mail unless you really need to.

************************************************************************************

This e-mail contains proprietary information some or all of which may be
legally privileged. It is for the intended recipient only. If an addressing
or transmission error has misdirected this e-mail, please notify the author
by replying to this e-mail. If you are not the intended recipient you must
not use, disclose, distribute, copy, print, or rely on this e-mail. Whilst
reasonable precautions have been taken to ensure that this message and any
attachments are free from viruses or other malicious code, no guarantee is
implied or given. The views expressed in this communication may not
necessarily be the views held by NXET Trains Limited.


NXET Trains Limited is part of National Express Group. Registered in
England No 7897267.  NXET Trains Limited trades as c2c

Registered Office: National Express House, Birmingham Coach Station, Mill
Lane, Digbeth, Birmingham, B5 6DD

--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lawrence Griffiths

unread,
Apr 20, 2015, 12:54:53 PM4/20/15
to node...@googlegroups.com
Justin I've found with serial port that adding \n \r etc via an inject node string dosen't surfice.
Not sure if this is how your testing cmds to the device?

I pass all mine commands that need <cr> or <lf> via a function node.

msg.payload = msg.payload+"\n"; 
retrun msg;
//\r - Carriage Return   0x0D - 13
//\n - Line Feed          0x0A  - 10

Sander Teunissen

unread,
May 7, 2015, 7:13:08 AM5/7/15
to node...@googlegroups.com
Thanks for this !

Bertus Kruger

unread,
Aug 23, 2015, 4:44:40 PM8/23/15
to Node-RED
Should this be added as a bug?

I also used the Injector to send a string value of "test\n" but it somehow removes the newline character. 

I don't mind having a look at fixing it but I just want to make sure this is an issue vs me using the wrong workflow. 
Reply all
Reply to author
Forward
0 new messages