Has anyone here had any luck in finding a way to monitor (eavesdrop, snoop, trace, etc.) the raw data on an existing serial connection? There are commands like: watch, portmon and ttysnoop on other OSs, but I have not been able to find anything for OS-X.
The application? I am trying to find out the modem setup (AT commands) that takes place between a communications program and a modem. The modem is actually connected by USB. But, I am able to talk to it using cu (or screen) to the (/dev/ttyx) device. So, it seems that I should be able, somehow, to look at the raw data exchange when the comm program has control of the port. Note, obvious tricks like:
# cat </dev/tty.foobar
do not work.
Any help or pointers appreciated.