简体   繁体   English

在另一个应用程序正在使用它时嗅探串行端口 /dev/ttyS0

[英]Sniffing serial port /dev/ttyS0 while another application is using it

My platform: Linux Kubuntu 14我的平台:Linux Kubuntu 14

I am currently working on a project in which my application is communicating with a process via rs232 connected to /dev/ttyS0 serial port.我目前正在开发一个项目,其中我的应用程序通过连接到 /dev/ttyS0 串行端口的 rs232 与进程通信。

Sometimes incoming messages aren't intercepted by my process so I decided to use a sniffing tool called jpnevulator.有时传入的消息不会被我的进程拦截,所以我决定使用一个名为 jpnevulator 的嗅探工具。

From what I see, if I run my application together with the sniffing tool, some messages are intercepted by the sniffing tool and some by my application, but not both.据我所知,如果我将我的应用程序与嗅探工具一起运行,一些消息会被嗅探工具拦截,一些消息会被我的应用程序拦截,但不会两者都拦截。

Is it not possible to listen via sniffing tool on a serial port while another application is using it?当另一个应用程序正在使用它时,是否无法通过串行端口上的嗅探工具进行侦听?

Thanks谢谢

Thanks all for the helpful responses.感谢所有有用的回复。 As suggested in https://unix.stackexchange.com/questions...正如https://unix.stackexchange.com/questions 中所建议的...

I used interceptty to link a pseudo terminal to the serial port I am listening to and connected my application to the pseudo terminal and it worked.我使用拦截将伪终端链接到我正在侦听的串行端口并将我的应用程序连接到伪终端并且它工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM