To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 854
853  |  855
Subject: 
Re: LinuxPPC and "No response from RCX" problem
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sat, 4 Nov 2000 03:50:38 GMT
Viewed: 
2032 times
  
In article <G3Gt27.EFz@lugnet.com>, "Chris"
<chris@starforge.demon.co.uk> wrote:

Hi,

    I recently bought an RIS kit and from my Windows box it works fine.
    When
I try using LinuxPPC off my PPC Amiga I get the following:

[root] /home/chris/nqc/nqc-2.2.r2 >bin/nqc -v -raw 10
Tx: 55 ff 00 10 ef 10 ef
Rx: 55 ff 00 10 ef 10 ef
Tx: 55 ff 00 10 ef 10 ef
Rx: 55 ff 00 10 ef 10 ef
Tx: 55 ff 00 10 ef 10 ef
Rx: 55 ff 00 10 ef 10 ef
Tx: 55 ff 00 10 ef 10 ef
Rx: 55 ff 00 10 ef 10 ef
Tx: 55 ff 00 10 ef 10 ef
Rx: 55 ff 00 10 ef 10 ef
Tx: 55 ff 00 18 e7 18 e7
Rx: 55 ff 00 18 e7 18 e7
Tx: 55 ff 00 18 e7 18 e7
Rx: 55 ff 00 18 e7 18 e7
Tx: 55 ff 00 18 e7 18 e7
Rx: 55 ff 00 18 e7 18 e7
Tx: 55 ff 00 18 e7 18 e7
Rx: 55 ff 00 18 e7 18 e7
Tx: 55 ff 00 18 e7 18 e7
Rx: 55 ff 00 18 e7 18 e7
No reply from RCX


Perhaps timing is a problem.  Try:

nqc -t 1000 -raw 10

This forces a longer (1 second) timeout per packet instead of the
dynamic retry timing.  Is the output any different?

Echo is coming back from the tower, which means communication between
the computer and tower is probably good (there are some weird cases
where the echo comes back even though the cable is bad...for example
shorting TXD and RXD together, but this is rare).

One guess is that the combination of 8 data bits and odd parity (which
the RCX expects) may not be correctly supported by the serial driver.

Looking at the source code, PSerial_unix::SetSpeed() should indicate if
the parity option fails (by returning false), but RCX_Link ignores this
and always assumes the set speed/parity thing has worked.  I assume
you're building your own binary...try instrumenting or stepping through
the SetSpeed() and SetRaw() calls to see if any of the control calls are
failing (which would indicate that the options weren't supported).  If
the calls indicate success, then its still posible that the driver
*thinks* its doing the parity correct, but isn't...

Do you have a second computer (running a different OS) with a terminal
program handy?  If so, hook the two up with a null modem cable.  Hack
RCX_Link::Open() to write an ascii string (e.g. "Hello World") to the
port after opening and setting the speed.  Make sure the terminal on the
second computer is set for 2400 baud, 8 data, 1 start, 1 stop, odd
parity.  See if "Hello World" comes through...if not, then the parity is
probably not happening (try using no parity on the terminal to verify).

This happens no matter the ambient illumination - sunlight, artificial
tungsten
light, darkness - and the RCX is situated exactly 6 inches from the front
of
the IR tower. The only differences here are the computer and OS -
everything
else is the same. I've tried doing

stty -a </dev/ttyS0

when nqc is talking to the IR tower and it reports the baud is 2400, is
that
correct (there's two different values in the source - 2400 and 9600).


The 9600 is just the default speed defined by the serial port class I'm
using.  All communication with the RCX should be at 2400 (except for
fast firmware download which is at 4800).

Dave Baum

--
reply to: dbaum at enteract dot com



Message has 1 Reply:
  Re: LinuxPPC and "No response from RCX" problem
 
(...) This helped me track down the problem - the minute I add the odd parity bit the serial driver changes the word length from 8 to 7. Doesn't look like I can do much about it from the Linux side either. :( Thanks for the help everyone, looks like (...) (24 years ago, 4-Nov-00, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  LinuxPPC and "No response from RCX" problem
 
Hi, I recently bought an RIS kit and from my Windows box it works fine. When I try using LinuxPPC off my PPC Amiga I get the following: [root] /home/chris/nqc/nqc-2.2.r2 >bin/nqc -v -raw 10 Tx: 55 ff 00 10 ef 10 ef Rx: 55 ff 00 10 ef 10 ef Tx: 55 ff (...) (24 years ago, 3-Nov-00, to lugnet.robotics.rcx.nqc)

11 Messages in This Thread:


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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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