ts-7000
[Top] [All Lists]

RE: [ts-7000] Re: Flushing an RX buffer.

To: <>
Subject: RE: [ts-7000] Re: Flushing an RX buffer.
From: "Jongsoo Kim" <>
Date: Tue, 5 Jan 2010 14:35:01 -0500


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" <> 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#



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU