Code Monkey home page Code Monkey logo

grabserial's Introduction

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).

$ grabserial -v -d COM10 -B 9600 -T -R 1h -o "c:\log\%Y-%m-%dT%H-%M-%S.txt"

Start a continous recording with timestamps for each line (-T) (eg: [09:07:47.330944 0.007000]) and create a new file with timestamp %Y-%m-%dT%H-%M-%S at the specified location every hour (-R).

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.

grabserial's People

Contributors

tbird20d avatar alphasierrahotel avatar jetholloway avatar jeroen6 avatar henning-schild avatar ikv avatar tom-mllr avatar zqb-all avatar ericpeers avatar liambeguin avatar vynce avatar simeonmiteff avatar thomas-innok avatar yegorich avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.