To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3442
3441  |  3443
Subject: 
Re: some measurements in lnp, please comment!
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 12 Sep 2003 05:25:02 GMT
Reply-To: 
Dick Swan <dickswa@sbcglobalSAYNOTOSPAM.net>
Viewed: 
3854 times
  
"Brian B. Alano" <alano@bloomington.in.us> wrote in message
news:HL30D6.1rDC@lugnet.com...
In lugnet.robotics.rcx.legos, Kenneth Johansen wrote:


so i guess that im asking, anyone know the bandwidth  and • practical
throughput that the lnp protocol supports?

regards
kenneth johansen
kennethj@stud.cs.uit.no
Old thread, but oh, well.
4800 baud is 4800 bits per second or 600 bytes per second. If you • assume 50%
overhead, which is optimistic, that's 300 bytes per second. So I • think anything
over 200 bytes per second is pretty good.

I'm not familiar with LNP, but I do have a good handle on infra-red
messaging in general.

There are 11 (and not 10) bits per transmitted byte (1 start bit, 8
data bits, 1 parity bit and 1 stop bit). So theoretical maximum is 467
bytes/second (4800/11).

I just measured a firmware download and it achieved 377 bytes/second
or 22600 bytes transmitted in 60 seconds. This may be an extreme
example because the PC-RCX messages are very long (typically 200+
bytes). Of course, this is not using the LNP protocol.

I wanted to test the other extreme (very short messages). I don't use
LNP, but with a bunch of software tuning I've achieve 95 "pings" per
second using the serial tower. Each ping is a two byte message and two
byte reply. This is also a very respectable 380 bytes per second.
Furthur examination of the difference between this and theoretical
maximum is delays in the PC (Pentium 4 @ 1.7 GHz) adding about 3
millseconds per ping. And to get this bit rate, I've had to tune the
"Windows Hardware Parameters" to get the serial port to interrupt on
every received character vs use of the internal 16-character buffer
with interrupts when it is nearly full or delay between characters.

To calculate the LNP bandwidth, take this raw rate of 350-380
characters per second and subtract out the LNP protocol overhead.

The case with the USB tower is not nearly as good. The best I've been
able to achieve with my "ping" program is 31 messages per second. I'm
reasonably convinced that the delay is probably because of USB polling
(vs interrupts on a single character). The Lego supplied USB Tower
drivers typically add over 15 milliseconds to a transmit and wait for
reply sequence.



Message is in Reply To:
  Re: some measurements in lnp, please comment!
 
(...) Old thread, but oh, well. 4800 baud is 4800 bits per second or 600 bytes per second. If you assume 50% overhead, which is optimistic, that's 300 bytes per second. So I think anything over 200 bytes per second is pretty good. (21 years ago, 12-Sep-03, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR