如何使用Windows批处理文件从COM端口发送一系列十六进制命令? [英] How can I send a series of hex commands out of a COM port using a Windows batch file?

查看:481
本文介绍了如何使用Windows批处理文件从COM端口发送一系列十六进制命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我有一个包含以下内容的批处理文件...

So far I have a batch file with the following contents...

MODE COM1:19,n,8,1
copy off.hex \\.\com1 /b

off.hex的内容就是我被卡住的地方. 我需要该文件内下面显示的代码.

The contents of off.hex is where I am stuck. I need the code shown below inside that file.

推荐答案

完全不确定任务是什么.如果要获取二进制文件,可能会有所帮助:

Totally not sure what the task is .If you want to get binaries may be this will help you:

@echo off
echo BEEF100500C6FF111101000100>off.txt
echo BEEF030600DCDB690000000000>on.txt

certutil -decodehex off.txt off.bin
certutil -decodehex on.txt on.bin

MODE COM1:19,n,8,1
copy off.bin \\.\com1 /b
copy on.bin \\.\com1 /b

有关证书的详细信息 如果您运行的XP不带CERTUTIL,请检查

Here's more info about CERTUTIL If you are running XP without CERTUTIL check this

这篇关于如何使用Windows批处理文件从COM端口发送一系列十六进制命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆