监控RS-232端口 [英] monitor the RS-232 port

查看:133
本文介绍了监控RS-232端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在从事一个使用RS-232作为通信媒体的行业项目.

由于不方便调试通信程序,因此我想开发一个小工具来在工作程序与硬件通信时监视RS-232软件包.

我的问题是:如何打开其他程序已经打开的RS-232端口?

谁能给我一些想法?

谢谢!

Hi,
I am working on an industry project which is using RS-232 as communicaion media.

Because the inconvenience in debugging the communication procedure, I want to develop a little tool to monitor RS-232 packages when the working program is communicating with hardware.

My question is: How can I open the RS-232 port that is already opened by other program?

Can anyone give me some ideas??

Thanks!

推荐答案

我有一个非常不同的建议,这是因为我也从事该行业,并且没有多少问题可以隐藏在通信链中.
与硬件的通信监视非常普遍.您可能想监视RS-232,如果您想对由您无法访问的软件/固件执行的工程通信进行反向工程,这将非常有用.这就是为什么我对您的问题投反对票"5"的原因. (我几乎忘了,有一个应用程序可以对其进行监视:请参阅我的其他答案.)

但是,如果要监视自己的软件,则需要将用于可选监视的工具永久地嵌入到低级通信功能中.我认为,这是您的情况,因为您提到了调试方面的不便,但您并未说这是不可能的.没有调试器的最佳且非侵入式监视方式之一就是写入系统事件日志.

对于更高级的示例,我最近开发了一种通过双模式工作的应用程序来开发Windows服务的框架:作为Windows服务和GUI(此外,作为服务安装程序).因此,这些选项可以分别以不同的详细程度打开/关闭UI控件或系统事件日志中的日志记录.如果您为所有通信创建了这样一个基本工具,那么它将在以后得到回报,因为您可能会遇到大量的诊断/调试问题,我将保证.

祝你好运,
-SA
I have a very different suggestion, and this is because I also work in the industry and no how many problems can be hidden inside communication chains.
Monitoring of communications with hardware is very common. You probably want to spy on RS-232, and this can be extremely useful if you want to reverse engineer communications performed by software/firmware not accessible to you. That''s why I voted "5" for your question. (I almost forgot, there is an application to monitor it: please see my other answer.)

However, in case you want to monitor your own software, you need to embed a tool for optional monitoring permanently into you low-level communication functions. I think, this is your case, because you mention inconvenience in debugging, but you did not say it is impossible. One of the best and non-intrusive ways of monitoring without debugger is writing to the system event log.

For a more advanced example, I recently developed a framework for development of Windows Services through the application working in dual-mode: as a Windows Service and a GUI (additionally, as a service installer). So the options could separately switch on/off logging in the UI control or System event log on different level of verbosity. If you create such a fundamental tooling for all your communications, it will pay off later because of massive diagnostics/debugging problems you may face down the road, I''ll guarantee that.

Good luck,
—SA


您可能想看看使用 Portmon [ ^ ].
You may want to look at using Portmon[^].


串行端口监视器从这里下载,过去5年一直在使用它

此处 [ ^ ]

窍门:SerialPort Monitor不是免费版本..在评估期结束后,您还可以通过更改系统日期来使用它..,
Serial Port Monitor download from here, am using this from past 5 Years

Here[^]

Trick: SerialPort Monitor is not a Free Version.., after completion of your evaluation Period also you can use it by changing your system date..,


这篇关于监控RS-232端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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