After a few hours figuring how to compiling static interceptty (autoconf and automake is something unknown for me) I've been able to run it on the drone. And it worked as expected and I could sniff data from ttyPA1 (ttyPA2 is broken, this thread started on that) and get the some interesting stuff. I even managed to power the motors (uncontrolled, but they rotatedMAPGPS wrote: I have compiled Interceptty for ARM, and it can run on my AR.Drone to simulate a "fake" /dev/ttyPA2, logging NavData.
Unfortunately Interceptty has not yet implemented ioctl() calls, thus program.elf can not trigger NavData via ioctl(). Need to find a new serial port sniffer.

As said above, ioctl() TCGETS and TCSETS calls just set tty parameters, as stty does. Interceptty is can try to run stty (-s parameter) but program.elf does it rigth, so no need to worry about this. The ioctl() TCFLSH calls I saw are due the broken navboard and shouldn't happen in normal operation.
Here on some commands and snips.
Code: Select all
# mv /dev/ttyPA1 /dev/ttyPA1-orig
# ./interceptty -o ttyPA1.out /dev/ttyPA1-orig /dev/ttyPA1 &
# program.elf
CTRL+\
# kill %1
# mv /dev/ttyPA1-orig /dev/ttyPA1
Code: Select all
< 0xe0 RST?
> 0xe0
> 0x00
< 0x01 MOTOR 1
> 0x01
< 0x40 (@) GET INFO
> 0x40 (@)
> 0x01
> 0x0b
> 0x03
> 0x00
> 0x01
> 0x01
> 0x09
> 0x0a
> 0x07
> 0x0a
> 0x0a