File: README.md

package info (click to toggle)
grabserial 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 188 kB
  • sloc: python: 988; sh: 89; makefile: 7
file content (60 lines) | stat: -rw-r--r-- 2,091 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
grabserial
==========

Grabserial - python-based serial dump and timing program - good for
embedded Linux development

See http://elinux.org/Grabserial for documentation and examples.

For help with command line options, use: grabserial -h

Installation
------------
If you have the python 'serial' module, you can just place grabserial
in a directory on your path, or add the directory containing grabserial
to your path, or just invoke grabserial directly.

This should work:

    $ sudo cp grabserial /usr/local/bin
    $ grabserial

You can also install this as a python module with: 'python setup.py install'
(Some users have reported problems with this - let me know if it doesn't
work for you.)

Examples
--------

    $ grabserial -d /dev/ttyUSB0 -e 30 -t -m "^Linux version.*"

Grab serial input for 30 seconds (-e 30), displaying the time for each
line (-t), and re-setting the base time when the line starting with
"Linux version" is seen.

    $ grabserial -d COM4 -T -b 115200 -e 3600 -Q -o "%" -a

Log serial data from COM4, with system timestamp (-T)
with settings 115200:8N1:xonxoff=0:rtscts=0 (-b 115200)
to the output file "2017-06-13T22:45:08" (-o "%"), for 1 hour (-e 3600)
and then restart (-a) to create new log.

    $ 'grabserial -d /dev/ttyUSB2 -C -q "nsh>" -c free

Send the 'free' command to the serial port (-c free), and show output
until a prompt of "nsh>" is seen (-q "nsh>"). Suppress the command echo
and shell prompt (-C).

Notice - New Default ‘-o’ Behavior
----------------------------------
Using the '-o' option, as in the second example above, with a generic '%'
or a specific pattern that includes a '%d' (date) reference will now close
the output file and open a new one if the system date changes while the
program is running.

If the command from the second example above is started at 11:30pm (system
time), the program will capture data for one hour but **will produce two
output files**; one with the date and time it was started and another with
the date and time that the program first outputs data after the system
time passes midnight.