I haven't played with the --server option. quite frankly I don't know what it
does.
--- In "Jongsoo Kim" <> wrote:
>
> Jon
>
>
>
> I think I am getting to know a little bit more about "xuartctl".
>
> I am trying to figure out the difference of using xuratctl w/ and w/o
> "-server" option.
>
> Based on the manual, "-server" is daemonizing a pseudo-tty.
>
>
>
> I am thinking that may be the reason you have to clean up after reissuing
> xuartctl --port 0 --server command.
>
>
>
> Did you try xuartctl --port 0 without "-server"?
>
> And you may or may not have to clean up.
>
>
>
> Jongsoo
>
>
>
>
>
>
>
>
>
> From: On Behalf Of
> Jon L
> Sent: Tuesday, January 05, 2010 9:53 AM
> To:
> Subject: [ts-7000] Re: Flushing an RX buffer.
>
>
>
>
>
>
>
> --- In <ts-7000%40yahoogroups.com> , "Jon L"
> <jleslie48@> wrote:
> >
> >
> >
> > --- In <ts-7000%40yahoogroups.com> , "Jon
> L" <jleslie48@> wrote:
> > >
> > > Ok, I finally got an RS232 uart to work properly on the TS-7500 (the
> fpga program needed to be upgraded to revision x03)
> > >
> > > but whats interesting is the RX buffer of the uart fills so long as data
> is coming in and queues up.
> > >
> > > So what is the best way to dump this data for the freshest? For example
> say I have a GPS hooked up to a uart, and its constantly spewing data which
> I don't care about. Now say all of a sudden I want the next gps data; I
> don't want wade through the entire /dev/gpsuart file to get to the last
> data; I want to be able to reset /dev/gpsuart, and have it fill fresh when I
> want it.
> > >
> > > Any ideas?
> > >
> > >
> > >
> > > Also what happens if I ignore the Gps data for a loooong time, what is
> the buffer limit on the /dev/gpsuart as set up by
> > >
> > > xuartctl ???
> > >
> >
> >
> > ok, I hooked up my GPS to the /dev/gpsuart and it receives the data just
> fine, but the problem is the queueing of the data.
> >
> > If I ignore the RX for minutes, the buffer fills to around 12,285 bytes
> (any Idea the significance of this amount?) That is fine but if I dump the
> buffer with say "cat /dev/gpsuart >/dev/null" It seems that I just get the
> next section of gps data. There is still a hidden queue of the data
> somewhere queuing up rather than dumping on the floor.
> >
> > I tried "tail /dev/gpsuart" but that only gives me the "tail" of the
> 12,285 section. I was hoping that tail would move the pointer to the end of
> everything. The only thing I've gotten to work so far is if I:
> >
> > "tail -f /dev/gpsuart" then wait xxx seconds until I see the data
> streaming (much slower than the regular tail to screen) and I know I'm
> tailing the current data coming in.
> >
> > This is not a good way to do this as that "wait xxx seconds" is not
> guaranteed to empty and I don't know how to even calculate the xxx, or how
> to program "wait until I seed the data streaming"
> >
> > I'm also concerned about where all this data is being stored, I mean what
> if I don't get to tail -f for days? is this going to grow forever?
> >
> >
> >
> > any ideas?
> >
>
> Ok, so re-issuing the xuartctl --port 0 --server command resets the buffer.
> That's all that I need. there is some cleanup to be done, as when you
> re-issue the xuartctl command, the old one still remains, but that not too
> hard to handle here is the script I use to restart the UART0 port:
>
> ts7500:/home/jon/programs/sjinn# cat uart_setup.sh
> #!/bin/sh
> XUARTID=`pgrep -f "xuartctl --port 0"`
> kill $XUARTID
> PAR1=`xuartctl --port 0 --server --speed 4800 2>&1 |cut -d= -f2`
> echo $PAR1
> ln -sf $PAR1 /dev/testuart
> XUARTID=`pgrep -f "xuartctl --port 0"`
> echo $XUARTID
> ts7500:/home/jon/programs/sjinn#
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|