windows 如何使用批处理文件从COM端口读取数据?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3923894/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 07:39:42 来源:igfitidea点击:
How to read data from COM port using batch file?
提问by Victor
Is there a DOS/ Batch command which can be used for reading from the COM port?
是否有可用于从 COM 端口读取的 DOS/Batch 命令?
I tried to look for that but didn't find solution.
我试图寻找它,但没有找到解决方案。
回答by Victor
For reading some information from COM port you can try next command:
要从 COM 端口读取一些信息,您可以尝试下一个命令:
type COM{n}
For sending info to COM port use next command:
要将信息发送到 COM 端口,请使用下一个命令:
echo some text > COM{n}