I'm currently trying to access data on both directions of a serial port connected to an an app.
What i'm trying to do is:
ttymxc0 <-----> socat sniff <------> ttyV0 <------> Application
ttymxc0 is the real port and ttyV0 is the virtual one.
I found that socat command that worked on Ubuntu 16.04: http://www.iheartrobotics.com/2010/02/debugginng-serial-interfaces.html
But when i use it on an embedded system using buildroot, i obtain this error:
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
I tried to look on the access properties of my files without success. It works when you don't ask to print input and output, but that's not useful for my usage
Any ideas of what could be different between buildroot and Ubuntu in this case?