Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #13024

Re: Simple protocol analyzer?

From Les Cargill <lcargill99@comcast.com>
Newsgroups comp.arch.embedded
Subject Re: Simple protocol analyzer?
Date 2013-08-07 08:06 -0500
Organization A noiseless patient Spider
Message-ID <kttgm2$906$1@dont-email.me> (permalink)
References <vradnSIUxLKwt5zPnZ2dnUVZ5qudnZ2d@giganews.com> <ktrb3v$ih6$1@reader1.panix.com> <y_ydnU1gndpIpJzPnZ2dnUVZ5h2dnZ2d@giganews.com> <ktrge0$hrt$1@reader1.panix.com> <MdednQUFYega0pzPnZ2dnUVZ5vednZ2d@giganews.com>

Show all headers | View raw


Tim Wescott wrote:
> On Tue, 06 Aug 2013 18:48:32 +0000, Grant Edwards wrote:
>
>> On 2013-08-06, Tim Wescott <tim@seemywebsite.really> wrote:
>>
>>>> http://elinux.org/Grabserial
>>>
>>> Grant, that's about as perfect as a command-line utility can get.  It
>>> does just what I want, and the command-line clunkiness doesn't intrude
>>> too badly.  It's going to save me tons of time over having to write
>>> something.
>>
>> Well, it'll save you a few minutes over having to write something
>>
>> ;)
>>
>>
>>    #!/usr/bin/python import serial,time p = serial.Serial('/dev/ttyS1',
>>    9600)
>>    while 1:
>>        line = p.readline() print time.time(),line
>>
>> In that version, the timestamp is associated with the end of the line.
>> If you want the timestamp for the start of the line, it's a bit more
>> complicated:
>>
>>    #!/usr/bin/python import serial,time p = serial.Serial('/dev/ttyS1',
>>    9600)
>>    while 1:
>>        first = p.read(1) stamp = time.time() rest = p.readline() print
>>        stamp, first+rest
>
> If I were to write it in python I'd first have to learn python, though.
>
> This is better.
>


In the long run, you are better off with at least one scripting 
language. Python has good market share now; might as well be it.

I think there's a problem or two with Python that Tcl does not
have*, but anything is better than nothing.

*they are all a compromise, and I am biased.

--
Les Cargill

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Simple protocol analyzer? Tim Wescott <tim@seemywebsite.really> - 2013-08-06 11:54 -0500
  Re: Simple protocol analyzer? Grant Edwards <invalid@invalid.invalid> - 2013-08-06 17:17 +0000
    Re: Simple protocol analyzer? Tim Wescott <tim@seemywebsite.really> - 2013-08-06 13:00 -0500
      Re: Simple protocol analyzer? Grant Edwards <invalid@invalid.invalid> - 2013-08-06 18:48 +0000
        Re: Simple protocol analyzer? Tim Wescott <tim@seemywebsite.really> - 2013-08-06 14:33 -0500
          Re: Simple protocol analyzer? Frank Buss <fb@frank-buss.de> - 2013-08-07 14:52 +0200
          Re: Simple protocol analyzer? Les Cargill <lcargill99@comcast.com> - 2013-08-07 08:06 -0500
          Re: Simple protocol analyzer? Grant Edwards <invalid@invalid.invalid> - 2013-08-07 14:48 +0000
          Re: Simple protocol analyzer? rickman <gnuarm@gmail.com> - 2013-08-07 23:25 -0400
            Re: Simple protocol analyzer? John Devereux <john@devereux.me.uk> - 2013-08-08 08:44 +0100
              Re: Simple protocol analyzer? Grant Edwards <invalid@invalid.invalid> - 2013-08-08 12:57 +0000
        Re: Simple protocol analyzer? Clifford Heath <no.spam@please.net> - 2013-08-07 22:42 +1000
          Re: Simple protocol analyzer? Grant Edwards <invalid@invalid.invalid> - 2013-08-07 15:02 +0000
            Re: Simple protocol analyzer? Grant Edwards <invalid@invalid.invalid> - 2013-08-07 15:15 +0000
            Re: Simple protocol analyzer? Clifford Heath <no.spam@please.net> - 2013-08-08 08:50 +1000

csiph-web