Socat串口嗅探

时间:2016-08-10 08:44:30

标签: serial-port buildroot socat

我目前正在尝试访问连接到应用程序的串行端口的两个方向上的数据。
我想做的是:
ttymxc0< -----> socat嗅探< ------> ttyV0< ------>申请书 ttymxc0是真实端口,ttyV0是虚拟端口。

我发现在Ubuntu 16.04上运行的socat命令: http://www.iheartrobotics.com/2010/02/debugginng-serial-interfaces.html

但是当我在使用buildroot的嵌入式系统上使用它时,我得到了这个错误:

socat -d /dev/ttymxc0,raw,echo=0 SYSTEM:'tee input.txt | socat - "PTY,link=/tmp/ttyV0,raw,echo=0,waitslave" | tee output.txt'
 socat[3167.1996369920] E address "GOPEN..." in intermediate context, leftdirs=4, rightdirs=7, with 1 parameter(s) is not available
 socat[3167.1996369920] W cannot restore terminal settings on fd 3: Bad file descriptor

我试图查看我的文件的访问属性但没有成功。它可以在您不要求打印输入和输出时起作用,但这对我的使用没有用

在这种情况下,buildroot和Ubuntu之间可能有什么不同的想法?

0 个答案:

没有答案