http://www.azstarnet.com/~ymg/files/slsnif-0.4.0.tar.gz
[slsnif.git] / README
1         slsnif - Serial line sniffer
2
3
4
5   Copyright (C) 2001 Yan "Warrior" Gurtovoy
6
7   slsnif operates by opening a pty and linking it to the serial port.
8   It takes following parameters / options:
9
10   1. Serial port to open (required).
11   2. Name of the file to direct output to (optional, defaults to stdout).
12   3. Desired baudrate (optional, defaults to 9600 baud).
13   4. Timestamp On/Off (optional, defaults to Off).
14   5. Print number of bytes transmitted On/Off (optional, defaults to Off).
15   6. Optional colors for timestamp, number of bytes transmitted,
16      and normal output.
17   7. Lock port On/Off (optional, defaults to On).
18   8. Second serial port to open. If specified, this port will be used
19      instead of a pty, thus providing an ability to log data between
20      two serial ports.
21
22   See man page for details on syntax, here are a couple of examples...
23   
24   Examples:
25     slsnif /dev/ttyS1
26         -- opens port /dev/ttyS1, sets speed to 9600 baud, output is sent
27            to stdout
28     slsnif /dev/ttyS0 -l log.txt
29         -- opens port /dev/ttyS0, sets speed to 9600 baud, output is sent
30            to file log.txt
31     slsnif /dev/ttyS2 --log log1.txt -s 2400
32         -- opens port /dev/ttyS2, sets speed to 2400 baud, output is sent
33            to file log1.txt
34     slsnif /dev/ttyS1 --speed 4800
35         -- opens port /dev/ttyS1, sets speed to 4800 baud, output is sent
36            to stdout.
37     slsnif -p /dev/ttyS0 /dev/ttyS1
38         -- opens ports /dev/ttyS0 and /dev/ttyS1. No pty is opened
39            in this case. Data coming from /dev/ttyS1 is considered
40            to be coming from a device and data coming from /dev/ttyS0
41            is considered to be coming from host. This consideration
42            is purely cosmetic, it only affects the way output works,
43            i.e. which chunks of data will be placed on lines that
44            begin with 'Device' and which chunks will go on lines
45            that begin with 'Host'. If pty is used, data from pty is
46            considered to be 'from host' and data from port is 'from
47            device'.
48     slsnif -h
49         -- displays help.           
50
51   RC file:
52     slsnif can read some of options from a configuration file
53     '.slsnifrc', located in user's home directory. The following
54     options can be specified in this file:
55     
56       RC-file option        corresponding command line option
57       ------------------    ---------------------------------
58       TOTALBYTES ON/OFF     -b (--bytes)
59       TIMESTAMP  ON/OFF     -t (--timestamp)
60       NOLOCK     ON/OFF     -n (--nolock)
61       COLOR      <color>    --color <color>
62       TIMECOLOR  <color>    --timecolor <color>
63       BYTESCOLOR <color>    --bytescolor <color>
64
65     Valid values for <color> are:
66       black, red, green, yellow, blue, magenta, cyan, white,
67       brightblack, brightred, brightgreen, brightyellow,
68       brightblue, brightmagenta, brightcyan, and brightwhite.
69             
70     Options provided on the command line always override the
71     ones read from the rc-file.
72     
73     An example of rc-file with comments (slsnifrc-example) is
74     included in the distribution.
75    
76   How to use it:
77     - start slsnif on a given port, note pty it has opened.
78     - configure controlling software for the device being debugged to use this
79       pty instead of the real port, start controlling software.
80     - when you're done, stop slsnif by hitting <Ctrl + C>.
81       
82   slsnif is free software; you can redistribute it and/or modify
83   it under the terms of the GNU General Public License as published by
84   the Free Software Foundation; either version 2 of the License, or
85   (at your option) any later version.
86
87   This program is distributed in the hope that it will be useful,
88   but WITHOUT ANY WARRANTY; without even the implied warranty of
89   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
90   GNU General Public License for more details.
91
92   You should have received a copy of the GNU General Public License
93   along with this program; if not, write to the Free Software
94   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
95
96 Comments are welcome.
97
98         - Yan "Warrior" Gurtovoy <ymg@azstarnet.com>