Is it possible to send the content of text file ov

2019-01-26 13:06发布

问题:

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?

回答1:

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.