<legend id='0DXD4'><style id='0DXD4'><dir id='0DXD4'><q id='0DXD4'></q></dir></style></legend>
    <i id='0DXD4'><tr id='0DXD4'><dt id='0DXD4'><q id='0DXD4'><span id='0DXD4'><b id='0DXD4'><form id='0DXD4'><ins id='0DXD4'></ins><ul id='0DXD4'></ul><sub id='0DXD4'></sub></form><legend id='0DXD4'></legend><bdo id='0DXD4'><pre id='0DXD4'><center id='0DXD4'></center></pre></bdo></b><th id='0DXD4'></th></span></q></dt></tr></i><div id='0DXD4'><tfoot id='0DXD4'></tfoot><dl id='0DXD4'><fieldset id='0DXD4'></fieldset></dl></div>

    • <bdo id='0DXD4'></bdo><ul id='0DXD4'></ul>

    1. <tfoot id='0DXD4'></tfoot>

      <small id='0DXD4'></small><noframes id='0DXD4'>

      在不关闭连接的情况下更改 C# 中的波特率

      Change baud rate in C# without closing connection(在不关闭连接的情况下更改 C# 中的波特率)
        <tbody id='LMVOy'></tbody>
        1. <small id='LMVOy'></small><noframes id='LMVOy'>

              <i id='LMVOy'><tr id='LMVOy'><dt id='LMVOy'><q id='LMVOy'><span id='LMVOy'><b id='LMVOy'><form id='LMVOy'><ins id='LMVOy'></ins><ul id='LMVOy'></ul><sub id='LMVOy'></sub></form><legend id='LMVOy'></legend><bdo id='LMVOy'><pre id='LMVOy'><center id='LMVOy'></center></pre></bdo></b><th id='LMVOy'></th></span></q></dt></tr></i><div id='LMVOy'><tfoot id='LMVOy'></tfoot><dl id='LMVOy'><fieldset id='LMVOy'></fieldset></dl></div>

                <bdo id='LMVOy'></bdo><ul id='LMVOy'></ul>
                <tfoot id='LMVOy'></tfoot>

              • <legend id='LMVOy'><style id='LMVOy'><dir id='LMVOy'><q id='LMVOy'></q></dir></style></legend>
                本文介绍了在不关闭连接的情况下更改 C# 中的波特率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我对以下链接有类似的问题.如何在不关闭连接的情况下更改波特率?.但我使用 C# 而不是 java.我从波特率 300 开始.然后握手后我必须将波特率更改为 4800.我向设备发送命令来执行此操作.我改变了我的串口的波特率.之后,我永远无法继续与设备通信.(如果我保持在 300 波特并以 300 波特向设备发送命令,我可以继续通信)

                I have a similar problem to the following link. How to change baud rate without closing the connection?. But i use C# in stead of java. I am beginning with baud rate 300. Then after a hand shake i have to change my baud rate to 4800. I send a command to the device to do this. And I change my serialport's baud rate. After that i can never continue the communication with the device. (If i stay in 300 baud and send command to the device for 300 baud i can continue the communication)

                我有一个第三方软件也可以从这个设备读取数据.当该软件运行时,我正在监听端口.它发送与我发送到设备相同的命令.它向设备发送设置 4800 波特的命令,并可以从设备中获得答案.它不会在波特率更改期间关闭或重新打开端口.我必须做同样的事情.但是,当我发送命令更改为 4800 波特时,我从来没有得到设备的答复.

                I have a third party software which also reads from this device. I am listening the port when that software is running. It sends the same commands that i am sending to the device. It sends command to set 4800 baud to the device and can get the answer from the device. It does not close or reopen the port during baud change. I have to do the same thing. But when i send command to change to 4800 baud i get no answer from the device ever.

                我在等你的答案.谢谢,费尔达

                I am waiting for your answers. Thank you, FERDA

                这是串口监控程序的输出进程ReadY.vshost.exe"打开的端口(PID:2608)

                This is the output from serial port monitoring program Port opened by process "ReadY.vshost.exe" (PID: 2608)

                01 42 30 03 71 .B0.q

                01 42 30 03 71 .B0.q

                答案:09.08.2011 10:55:40.81864(+0.2656 秒)

                Answer: 09.08.2011 10:55:40.81864 (+0.2656 seconds)

                06.

                请求:09.08.2011 10:55:41.06864(+1.2500 秒)

                Request: 09.08.2011 10:55:41.06864 (+1.2500 seconds)

                2F 3F 31 31 39 39 39 30 30 34 21 0D 0A/?11999004!..

                2F 3F 31 31 39 39 39 30 30 34 21 0D 0A /?11999004!..

                答案:09.08.2011 10:55:41.58464(+0.5156 秒)

                Answer: 09.08.2011 10:55:41.58464 (+0.5156 seconds)

                2F 53 54 52 34 5F 42 53 4D 31 33 31 0D 0A/STR4_BSM131..

                2F 53 54 52 34 5F 42 53 4D 31 33 31 0D 0A /STR4_BSM131..

                请求:09.08.2011 10:55:42.31864(+0.2969 秒)

                Request: 09.08.2011 10:55:42.31864 (+0.2969 seconds)

                06 30 34 31 0D 0A .041..

                06 30 34 31 0D 0A .041..

                推荐答案

                根据我的经验,波特率开关需要关闭和重新打开串行端口硬件:我建议尝试一下.发送波特率切换命令然后关闭端口,设置波特率然后重新打开端口.打开/关闭端口应该对另一侧的设备是透明的(除非您使用 CTS/RTS/DTR/DSR 线路).

                In my experience baud rate switches require closing and reopening the serial port hardware: I would suggest trying that. Send the baud rate switch command then close the port, set the baud rate and then re-open the port. Opening/closing the port should be transparent to the device on the other side (unless you are using the CTS/RTS/DTR/DSR lines).

                这篇关于在不关闭连接的情况下更改 C# 中的波特率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                Parameter count mismatch with Invoke?(参数计数与调用不匹配?)
                How to store delegates in a List(如何将代表存储在列表中)
                How delegates work (in the background)?(代表如何工作(在后台)?)
                C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)
                Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                <i id='Qdi7a'><tr id='Qdi7a'><dt id='Qdi7a'><q id='Qdi7a'><span id='Qdi7a'><b id='Qdi7a'><form id='Qdi7a'><ins id='Qdi7a'></ins><ul id='Qdi7a'></ul><sub id='Qdi7a'></sub></form><legend id='Qdi7a'></legend><bdo id='Qdi7a'><pre id='Qdi7a'><center id='Qdi7a'></center></pre></bdo></b><th id='Qdi7a'></th></span></q></dt></tr></i><div id='Qdi7a'><tfoot id='Qdi7a'></tfoot><dl id='Qdi7a'><fieldset id='Qdi7a'></fieldset></dl></div>
                  <legend id='Qdi7a'><style id='Qdi7a'><dir id='Qdi7a'><q id='Qdi7a'></q></dir></style></legend>

                      <tbody id='Qdi7a'></tbody>
                    • <bdo id='Qdi7a'></bdo><ul id='Qdi7a'></ul>

                          <small id='Qdi7a'></small><noframes id='Qdi7a'>

                          <tfoot id='Qdi7a'></tfoot>