我正在尝试访问连接到应用程序的串行端口的双向数据。我想做的是:ttymxc0 <-----> socat嗅探器 <------> ttyV0 <------> 应用程序。ttymxc0是实际的端口,ttyV0是虚拟端口。
我发现在Ubuntu 16.04上有效的socat命令: http://www.iheartrobotics.com/2010/02/debugginng-serial-interfaces.html 但是当我在使用buildroot的嵌入式系统上使用它时,我会得到以下错误:
我发现在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中会有差异?