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 / 3862
3861  |  3863
Subject: 
Re: LNPd keeps sending TX_FAILURE
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 7 Jan 2005 03:26:50 GMT
Viewed: 
7146 times
  
I don't use LNPd or BrickOS so I don't know if this will work. It makes
all sorts of problems go away when using the RCX ROM message handling
routines, I don't know how much of the ROM routines are used by LNPd or
whether, if it doesn't, it has replicated the same problems.

Try inserting a 35 millisecond delay between receipt of message from RCX
and transmission of next message from PC. See if that works.

Every character transmitted by RCX is also echoed on the RCX receiver. I
think some of the code you were wading through may be related to
confirming that the echo-ed character matchs the transmitted character;
if it doesn't then I guess this is an error or a collision.



"Tyler Mandry" <tmandry@gmail.com> wrote in message
news:I9x7Do.qxM@lugnet.com...
I'm running LNPd on Gentoo Linux 2.6.7. Everything seems to work fine
except
transmitting messages to the RCX. The |lnptest| application that comes
with LNPd
keeps reporting a |Collision| every time it tries to transmit
something. It does
however correctly report messages that it receives (from the
corresponding
program for the RCX). I tried going in |transceiver.c| of the LNPd
source and
commenting out sections that called |tx_error()|, but then another
section would
call it. In fact, all of the places that could call |tx_error()|
called it when
the one before it was commented out: the {frame error} check in
|rcx_read()| (I
don't pretend to know what a frame error is), the {transmit collision}
check
that compares |rcv_buffer| with |tx_verify|, and
|check_interbyte_timeout()|.

Here's the information I've been able to glean about each of these
errors. It's
not that long of a read. The frame error seems to be triggered if a
call to
|ioctl()| requesting |TIOCGICOUNT|, which apparently ["reads serial
port inline
interrupt counts"], returns a different value than the previous value
in
|rcx_read()|. Doesn't exactly clear things up for me, but hopefully it
will help
determine the problem. |tx_verify| is a global variable and is set by
|rcx_write()| during a write. It is compared to |rcv_buffer|, which is
read from
the transceiver by |rcx_read()| (which does the checking). If they
differ,
|tx_error()| is called which causes LNPd to send |TX_FAILURE|. Both of
these
error checks only call |tx_error()| if the global |active| varible is
true,
which is set in |rcx_write()|. So, it seems that after a write
(|rcx_write()|
called), |rcx_read()| reads back the data that was written (an echo?)
and
compares it to the data that should have been written. It also checks
to make
sure that no "inline interrupts" have been called since the last
write, I'm not
sure exactly what this means, possibly that something was sent to the
transceiver (but don't take my word for it). As for
|check_interbyte_timeout()|,
it's called by |run_transceiver()| when there isn't anything to read
and checks
if the "interbyte timeout" has been reached, which is updated every
|rcx_read()|. I don't know how correct my inferences are, but
hopefully it'll
help those who haven't gone as in-depth into the source as I have to
figure it
out.

Can anyone explain why this might be happening? Transmitting to the
RCX is vital
to the project I'm working on, so any help is greatly appreciated.

Tyler Mandry



Message is in Reply To:
  LNPd keeps sending TX_FAILURE
 
I'm running LNPd on Gentoo Linux 2.6.7. Everything seems to work fine except transmitting messages to the RCX. The lnptest application that comes with LNPd keeps reporting a Collision every time it tries to transmit something. It does however (...) (20 years ago, 7-Jan-05, to lugnet.robotics.rcx.legos, FTX)

6 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