To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.javaOpen lugnet.robotics.rcx.java in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / Java / 214
213  |  215
Subject: 
RCX <-> PC communication
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Tue, 10 Sep 2002 07:29:50 GMT
Viewed: 
4207 times
  
Ok, here's a little something to think about:

I have been testing the three communication protocol stacks of LeJOS 2.0
(josx.rcxcomm package; LLC, LNP and F7 protocols).

Simple application: Array (size 20) of ints on both PC and RCX. Got both a
sender and a receiver end on pc and rcx, use matching sender/receiver, the
follwing code (simplified):

Sender:

DataOutputStream out = new DataOutputStream(<portX-outstream>);
for (n=0; n<20; n++) { out.writeInt(data[n]); out.flush(); }

Receiver:

DataInputStream in = new DataInputStream(<portX-instream>);
for (n=0; n<20; n++) { data[n] = in.readInt(); }


I get the following results:

F7 (RCXF7Port) :
PC -> RCX: 2.44 sec/int
RCX -> PC: 0.48 sec/int

LLC (RCXPort) :
PC -> RCX: not working (only a few of the 20 numbers got transmitted,
some of them incorrectly)
RCX -> PC: 0.32 sec/int

LNP (RCXLNPPort) :
PC -> RCX: fast, but not all numbers arrive, about 3/20 are missing
RCX -> PC: 0.16 sec/int

Errrr - so can somebody give me explanations to the following questions:

a) How come that LLC and LNP are not working (or only partially working) in
direction PC -> RCX; aren't they supposed to be implemented as reliable
protocols? And why are they perfectly working in the other direction?

b) How come that F7 (described as the least reliable of the three protocols)
works best (although slowest, that is correct)?

Did anybody have similar experiences or any idea what is going on here?

Thanks for reading,
Kaspar



Message has 4 Replies:
  Re: RCX <-> PC communication
 
Hi Kaspar, Did you compile the PC end program using javac and did you add pcrcxcomm.jar from the lejos lib directory to your CLASSPATH? Could you give some more details about your problem (what platform are you working on? complete code...)? Wap (...) (22 years ago, 12-Sep-02, to lugnet.robotics.rcx.java)
  Re: RCX <-> PC communication
 
(...) I have not done any experimenting with Data Streams yet since I can get by with bytes. I have tried both the RCXPort and the RCXF7Port. The big advantage of the RCXPort using the LLC protocol is that if the RCX gets out of range or behind an (...) (22 years ago, 13-Sep-02, to lugnet.robotics.rcx.java)
  Re: RCX <-> PC communication
 
(...) Lawrie Griffiths asked me to forward the following to you: RCXPort should be about twice as fast as RCXF7Port. Do you have a serial or USB tower? I am concerned that you don't get complete reliabilty with RCXPort - I do with a USB Tower. (22 years ago, 14-Sep-02, to lugnet.robotics.rcx.java)
  Re: RCX <-> PC communication
 
(...) Kaspar, There is a bug with serial towers with RCXPort in lejos 2.0. This causes the problem you are seeing. There is a fixed version in (URL) fixes RCXPort, but I haven't put the fix in the LNP versions yet. I only have a USB Tower, and (...) (22 years ago, 16-Sep-02, to lugnet.robotics.rcx.java)

5 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