linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with delayed data from pl2303 usb serial gps
@ 2008-04-18 10:16 Helge Hafting
  2008-04-18 15:20 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Helge Hafting @ 2008-04-18 10:16 UTC (permalink / raw)
  To: linux-kernel, linux-usb

Problem:
I run car navigation software on linux, using a gps.
Getting data from the gps unit in a timely fashion is important, as
the software says thing like "turn left in 50m". That is useless however,
if the message arrives 10s after you passed the intersection!

The gps unit reports location once per second.
I frequently see delays of up to 13 seconds. I drive down a street and
make a turn or stop. Then I look at map display, and count 13 updates
before the map reflects what I did.

This is also a problem when mapping in real-time. I.e. someone drive the car
over a bridge, and I record the bridge start and endpoints on the live 
gps tracklog.
Needless to say, this approach doesn't work if the live tracklog lags behind
reality by 13s. . .

I make sure the pc has a load well below 1, so this is not cpu 
starvation. This even
happens with dual cores. I have observed the problem with two different
machines: a core2duo laptop in 64bit mode, and a via mini-itx in 32-bit 
mode.

I have also seen the problem with various software, a commercial navigation
program reading directly from /dev/ttyUSB0, as well as the open programs
josm and navit, both going via gpsd. gpsd is supposed to run with low 
latency.

The problem is an old one. It is in 2.6.24, and it existed a couple of years
ago too. I have used two different gps units (my old one broke) of
different manufacture. Both uses pl2303 though.

The delay is not constant. Everything may be ok when I start the
software, and then the delay build up gradually over a few minutes.

Is there hope of fixing this, or is the pl2303 something to avoid?

Helge Hafting

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with delayed data from pl2303 usb serial gps
  2008-04-18 10:16 Problem with delayed data from pl2303 usb serial gps Helge Hafting
@ 2008-04-18 15:20 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2008-04-18 15:20 UTC (permalink / raw)
  To: Helge Hafting; +Cc: linux-kernel, linux-usb

On Fri, Apr 18, 2008 at 12:16:08PM +0200, Helge Hafting wrote:
> Problem:
> I run car navigation software on linux, using a gps.
> Getting data from the gps unit in a timely fashion is important, as
> the software says thing like "turn left in 50m". That is useless however,
> if the message arrives 10s after you passed the intersection!

That sounds like a problem either in the device, or in the pl2303 chip,
or possibly, your userspace program.

As a test, enable debugging in the pl2303 driver:
	modprobe pl2303 debug=1
or enable it after it is loaded with:
	echo 1 > /sys/module/pl2303/parameters/debug

and run your program.  Look at the timestamps in the kernel log for when
the pl2303 driver gets your data and compare it to when your userspace
program is getting them.

Let me know if you find anything we can help out with.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-18 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-18 10:16 Problem with delayed data from pl2303 usb serial gps Helge Hafting
2008-04-18 15:20 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).