Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to send the content of text file over PuTTY over a serial port?

I'd like to send the text content of a file over the serial port, over PuTTY. I know that extensions exists such as Xmodem and Zmodem, but they all use some checksum protocols to confirm that a file is sent over the port.

However, my requirements are more simple. I'd like to simply send a bunch of text (in a file) over the serial port in Windows (under Linux this would be must more simple), but my preferred terminal program is PuTTY. Is this possible? Is there another terminal program that has this type of feature built it?

like image 772
jliu83 Avatar asked Jun 14 '15 04:06

jliu83


People also ask

How do I send serial data in PuTTY?

On PuTTY, ensure that correct serial port has been set, and then press the Open button. This will display the terminal emulator window: You can now send commands to the prober. These commands need to be entered without error, and sent by pressing Control+J.

Can you transfer a file with PuTTY?

PuTTY pscp (or scp) provides a file transfer application for Secure Shell (SSH) to copy files either between two directories on the configuration node or between the configuration node and another host.

Does PuTTY support serial connection?

3.7 Connecting to a local serial linePuTTY can connect directly to a local serial line as an alternative to making a network connection. In this mode, text typed into the PuTTY window will be sent straight out of your computer's serial port, and data received through that port will be displayed in the PuTTY window.


1 Answers

Use Plink (a command-line connection tool from PuTTY suite). It's a console application intended to automate connection tasks, like yours. Being a console application, you can redirect its input from a text file:

plink.exe -serial -sercfg ... < input.txt

See Using the command-line connection tool Plink

See also related:

  • How to execute remote command using PuTTY over Telnet.
  • Execute a command on device over serial connection with Plink
like image 116
Martin Prikryl Avatar answered Sep 21 '22 14:09

Martin Prikryl