1 slsnif - Serial line sniffer
5 Copyright (C) 2001 Yan "Warrior" Gurtovoy
7 slsnif operates by opening a pty and linking it to the serial port.
8 It takes following parameters / options:
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,
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
22 See man page for details on syntax, here are a couple of examples...
26 -- opens port /dev/ttyS1, sets speed to 9600 baud, output is sent
28 slsnif /dev/ttyS0 -l log.txt
29 -- opens port /dev/ttyS0, sets speed to 9600 baud, output is sent
31 slsnif /dev/ttyS2 --log log1.txt -s 2400
32 -- opens port /dev/ttyS2, sets speed to 2400 baud, output is sent
34 slsnif /dev/ttyS1 --speed 4800
35 -- opens port /dev/ttyS1, sets speed to 4800 baud, output is sent
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
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:
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>
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.
70 Options provided on the command line always override the
71 ones read from the rc-file.
73 An example of rc-file with comments (slsnifrc-example) is
74 included in the distribution.
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>.
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.
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.
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
98 - Yan "Warrior" Gurtovoy <ymg@azstarnet.com>