snooper - serial line snooping tool
Jun-ichiro itojun Itoh <itojun@mt.cs.keio.ac.jp>
$Id: README,v 1.2 1998/08/13 09:17:25 itojun Exp $


What's this?
	The tool is for snooping communication between two devices
	that communicate with RS232C serial line.

Machine configuration
	There are 3 machines/modems to take part in the configuration.
	We will denote those machines as follows:
		partyA		a computer 
		partyB		computer/modem/digi-cam/whatever
		console		The computer you are using to snoop
				the communication between A and B.

	Say, you would like to snoop the following configuration.
		partyA ---cableAB--- partyB
	In that case you should connect "console" between partyA and
	cableAB, as follows:
		partyA ---cableX--- console ---cableAB--- party B
	cableX must be cross-cable (a cable to connect two computers).

Configuration of software
	% cd build
	% ./configure
	% make depend
	% make
	% make install

Command-line options
	% snooper [-options] dev0 dev1
		-bBAUD	specifies baud rate.
		-u	don't use uucp locking (questionable option)
		dev0	name of serial device 0.
		dev1	name of serial device 1.

Keyboard command
	snooper has a set of commands, that acts similar to that of vi.
	Note that the characters transmitted into serial port will not be
	forwarded, in command parameter input mode.  You should set-up log
	file and so forth, while the serial line has no activity.

	L	Switch textual log file.
		You'll asked to answer the filename of the log file.

		You should use file system on memory (say /tmp in some
		configuration), or fast disk, so that no characters were lost.

	B	Switch binary log file.
		You'll asked to answer which line to log, and the filename
		of the log file.

		Please note that the binary log will be based on "input"
		seen from the console.  Therefore, If you would like to make
		a log of input of line 0 (thus the output from device
		connected to line 0), you shold specify line 0.
		You should use file system on memory (say /tmp in some
		configuration), or fast disk, so that no characters were lost.

	m	add memo line to the log file.
		memo line contains date string, and arbitrary string you've
		given.

	Q	Quit.

	c	Reset the counter.

	b	Change baudrate.

	C	Make console to act as one of the serial lines.
		Tap ESC to go back to command mode.
		Tap ^V to quote the next char (so that you can send ESC).
		Tap ^X to input char by 2 hex digits. (so that you can send
		any control character as you like)
		By tapping any other key, that character will be sent to the
		line.

	^L	Repaint the screen.

Todo
	- Screen resize-aware
	- Tuning
		repaint control, timeout value
	- Modem control lines
		are the line status properly copied?
	- Multilingualization
		it would be nice if we can see Japanese chars on screen.
	- Portability check
		termio interface
		curses variants
		header files
	- Line check while in command parameter input

Warranty and redistribution
	Absolutely no warranty.  Pray before try.  Freely redistributable.

Copyright
	Copyright(c) 1997 by Jun-ichiro Itoh.  All rights reserved.

Contacting the author
	send e-mail to: Jun-ichiro itojun Itoh <itojun@mt.cs.keio.ac.jp>
	for bug reports, you can use
		http://www.itojun.org/cgi-bin/gnats-send-pr

Revision history
    97/8/13
	portability fixes.
    97/2/12
	binary log file was added.
    97/2/11
	memo option was added.
    97/2/10
	project started
