Interceptty

From Wildsong
Jump to navigationJump to search

Interceptty is this nice little tool that pretends to be a serial port.

It can be used to capture data on its way to a real serial port for doing debugging or reverse engineering, or it could talk to a program or file to simply capture output from a program that expects to be talking to a device.

For example, I wanted to configure a vmware machine to direct its console output to a serial port so that I could capture all boot-time messages for analysis, but I did not want to bother to plug in anything to ttyS0.

So I installed interceptty on the Linux host and ran this command

interceptty -s ’ispeed 9600 ospeed 9600’ -l /dev/ttyS0 @/tmp/sersock |
                              interceptty-nicedump

Then I set vmware to use /tmp/sersock as its ttyS0 device

This spits out the data originally destined for ttyS0 in the window that I run it from.

Note that with VMWare version 5 this is no longer necessary; just set the serial device to point at a file in VMware and you are done.