5

I found that putty sends to my serial device \r when I hit enter. Is there a way how to make putty to send \n?

I found that it is possible to press CTRL+J to send \n - but I would like to press just enter.

Someone advised to set Terminal->"Implicit CR in every LF". But this does not work for me (I assume it is for what putty receives not send).

(I'm using putty release 0.66)

Vit Bernatik
  • 3,566
  • 2
  • 34
  • 40
  • I think you want `Implicit LF in every CR` option. I think you chose the wrong one? – Baddack Aug 10 '16 at 21:16
  • 1
    like I said before and tested it again now: those parameters are for what putty receives... I did what you said and guess what? My program writes back to putty what it receives printf("cmd: 0x%02x\r\n",char); before I press enter I got "cmd: 0x0d"+new line. Now I'm getting "cmd: 0x0d"+two new lines... (extra new line putty transforms from \r I'm sending). But Like I said before I'm interested what putty sends, not what putty receives.... – Vit Bernatik Aug 11 '16 at 07:33
  • You will most likely need to use a different terminal program or write your own. Where I work, we manufacture large machines that communicate via serial port and require CRLF, so I wrote my own terminal program to handle it all correctly. You might check out [Hyper Terminal](http://www.hilgraeve.com/hyperterminal/). – Baddack Aug 11 '16 at 17:43

1 Answers1

0

I've not been able to find a way to make putty do this. I found this guy who forked putty to make it transmit CRLF on Enter: https://www.grzegorz.net/ but that's not what your asking for.

Using Tera Term however: you can configure to either use CR/LF/CR+LF on Enter (Tera Term: http://www.teraterm.org/) - which fulfils your requirement to transmit LF on Enter key press.

enter image description here

Alex D
  • 71
  • 6