如何知道串行通信时的错误列表? [英] How do I know the lists of error while serial communications?

查看:65
本文介绍了如何知道串行通信时的错误列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想制作一个代码,通过串口通讯将数据发送到另一台服务器。

但只接受发送但是没有从对应部分接收任何其他数据或错误消息。



所以我 - 发送部分申请 - 必须假设发送是否正常。



这些发送错误的结果如何以及何种类型。

如果可能的话,让我告知另一种可能的检查算法或协议。



提前谢谢。



我的尝试:



过去1周,我考虑过这个协议但是失败了。

Hi,

I want to make a code which send data to another server via serial communications.
But only sending is accepted but no receiving any other data or error messages from counter part.

So I - sending part application - must assume whether the sending is ok or not.

How and what kind of these sending error kinds of results.
And if possible, let me inform about another possible check algorithm or protocol.

Thank you in advance.

What I have tried:

Last 1 week, I have considered this protocol but failed.

推荐答案

如果你有单向通信,你可以检测不到这样的错误。您在发送方面所能做的就是在写入设备时检查接口错误。但是当设备成功打开时,串行接口通常不会发生这种情况。



但你可以使用硬件握手,它使用串行接口的其他线路(RTS, CTS,DTR)。这至少要检测其他站点是否存在并且可以接收数据。
If you have a uni direction communication you can't detect such errors. All you can do on the sending side is checking for interface errors when writing to the device. But such will usually not happen with serial interfaces when the device has been opened successfully.

But you may use hardware handshaking which uses additional lines of the serial interface (RTS, CTS, DTR). This allwos at least to detect if the other site is present and can receive data.


这篇关于如何知道串行通信时的错误列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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