以特定方式打开串行端口 [英] opening a serial port in a specific way
本文介绍了以特定方式打开串行端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在这里!
为阿斯金感到抱歉,但也许有人有时间来当菜鸟.
需要以这种方式打开COM端口:
hi here!
sorry for askin that but maybe someone has time for a rookie .
need to open a com port in that way:
I/O Request (DOWN)
IOCTL_SERIAL_SET_BAUD_RATE: Set baud rate
Baud Rate=38400
I/O Request (UP)
IOCTL_SERIAL_SET_BAUD_RATE: Set baud rate
I/O Request (DOWN)
IOCTL_SERIAL_CLR_RTS: Clear RTS
I/O Request (UP)
IOCTL_SERIAL_CLR_RTS: Clear RTS
I/O Request (DOWN)
IOCTL_SERIAL_SET_DTR: Set DTR
I/O Request (UP)
IOCTL_SERIAL_SET_DTR: Set DTR
I/O Request (DOWN)
IOCTL_SERIAL_SET_LINE_CONTROL: Set line control
WordLength=8
StopBits=1 stop bit
Parity=No parity
I/O Request (UP)
IOCTL_SERIAL_SET_LINE_CONTROL: Set line control
I/O Request (DOWN)
IOCTL_SERIAL_SET_CHARS: Set special characters
EofChar=0x0
ErrorChar=0x0
BreakChar=0x0
EventChar=0x0
XonChar=0x7f
XoffChar=0x7e
I/O Request (UP)
IOCTL_SERIAL_SET_CHARS: Set special characters
I/O Request (DOWN)
IOCTL_SERIAL_SET_HANDFLOW: Set handshake information
ControlHandShake=1
FlowReplace=0
XonLimit=2048
XoffLimit=512
I/O Request (UP)
IOCTL_SERIAL_SET_HANDFLOW: Set handshake information
I/O Request (DOWN)IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts
ReadIntervalTimeout=1
ReadTotalTimeoutMultiplier=0
ReadTotalTimeoutConstant=0
WriteTotalTimeoutMultiplier=30
WriteTotalTimeoutConstant=100
I/O Request (UP)
IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts
I/O Request (DOWN)
IOCTL_SERIAL_PURGE: Purge requests
Purge mask=TXCLEAR: Write requests, RXCLEAR: Write buffer
I/O Request (UP)
IOCTL_SERIAL_PURGE: Purge requests
I/O Request (DOWN)
IOCTL_SERIAL_SET_WAIT_MASK: Set current event mask
WaitMask=RXCHAR: Any Character received
I/O Request (UP)
IOCTL_SERIAL_SET_WAIT_MASK: Set current event mask
Write Request (DOWN)
Buffer size: 0x1 bytes
F0
Write Request (DOWN)
Buffer size: 0x2 bytes
28 01
I/O Request (DOWN)
IOCTL_SERIAL_PURGE: Purge requests
Purge mask=TXCLEAR: Write requests, RXCLEAR: Write buffer
I/O Request (UP)
IOCTL_SERIAL_PURGE: Purge requests
(向下)表示已发送到com端口的数据
(向上)表示从com端口进行确认,我以防万一.
需要一个小应用(vb/32bit)来运行上面的设置.
该应用程序应从一个小gui窗口开始,在该窗口中可以手动设置COM端口号,并使用确定"按钮进行确认.
关闭应用程序,COM端口必须返回Windows默认设置.
谢谢
(down) means data sent to com port
(up) means confirmation from com port, i added just in case .
need a small app(vb/32bit) to run settings above.
the app it should start with a small gui window where com port number can be set manually and an "ok " button to confirm .
closing the app, com port must return to windows default settings .
thank you
推荐答案
需要一个小应用(vb/32bit)来运行上面的设置.
您可以使用Google可以为您找到的免费终端程序之一(Hyperterm,腻子等),也可以自己编写.
need a small app(vb/32bit) to run settings above.
You could use one of the free terminal programs that Google will find for you (Hyperterm, putty etc), or you could write it yourself.
这篇关于以特定方式打开串行端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文