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 / 186
185  |  187
Subject: 
Re: Download problem
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sun, 3 Oct 1999 01:39:35 GMT
Reply-To: 
marcob@equalis.itSPAMCAKE
Viewed: 
4338 times
  
On Fri, 1 Oct 1999 12:59:57 GMT, "Mario Ferrari"
<mario.ferrari@edis.it> wrote:

> Hi Dave and everybody,
> 
> I have a strange problem with an NQC program. It's something Marco Beri and
> I are preparing for the Mindfest.
> 
> The program is rather large if compared to the average NQC programs: about
> 240 lines of code with large inline functions (I know this is not a very
> precise way to measure the program size but just to give you an idea). The
> problem is it compiles ok, but NQC is not able to download it. After some
> "dots" NQC simply writes "error" and exits. The strange point is that the
> download always stops in different points, and Marco was even able to
> succesfully download it after some tries (I wasn't with more than 30 tries).
> I tried both short and long range IR transmission.
> 
> Any idea?
> 
> Mario
> http://www.geocities.com/~marioferrari



Mario,
I just loaded it 6 times in a row without a single error... How? I'm
scared but I have to say it... I tried to load the program in Windows
95. There must be something in NT that is preventing to load big
programs.

I tried to check the serial status before running nqc with command
MODE COM2:

Status for device COM2:
-----------------------
    Baud:            1200
    Parity:          Even
    Data Bits:       7
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     ON
    RTS circuit:     ON

and after:

Status for device COM2:
-----------------------
    Baud:            2400
    Parity:          Odd
    Data Bits:       8
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     ON
    RTS circuit:     OFF

Here is the firmdl.c code where it opens and uses the serial without a
glitch:

   ios.c_cflag = CREAD | CLOCAL | CS8 | PARENB | PARODD;
   cfsetispeed(&ios, B2400);
   cfsetospeed(&ios, B2400);
   tcsetattr(fd, TCSANOW, &ios);

And here is the code in NQC:

    dcb.BaudRate = speed;
    dcb.fBinary = 1;
    dcb.fOutxCtsFlow = 0;
    dcb.fOutxDsrFlow = 0;
    dcb.fDtrControl = DTR_CONTROL_ENABLE;       // DTR flow control
type
    dcb.fDsrSensitivity = 0;   // DSR sensitivity
    dcb.fTXContinueOnXoff = 0; // XOFF continues Tx
    dcb.fOutX = 0;            // XON/XOFF out flow control
    dcb.fInX = 0;             // XON/XOFF in flow control
    dcb.fErrorChar = 0;       // enable error replacement
    dcb.fNull = 0;            // enable null stripping
    dcb.fRtsControl = 0;       // RTS flow control
    dcb.fAbortOnError = 1;     // abort reads/writes on error
    dcb.XonLim = 100;
    dcb.XoffLim = 100;
    dcb.ByteSize = 8 - (opts & kPSerial_DataMask);
    dcb.Parity = (opts & kPSerial_ParityMask) >> kPSerial_ParityShift;
    dcb.StopBits = ((opts & kPSerial_StopMask) >> kPSerial_StopShift);
// 0,1,2
    dcb.XonChar = 1;
    dcb.XoffChar = 2;
    dcb.ErrorChar = 0;
    dcb.EofChar = 0;
    dcb.EvtChar = 0;
    return SetCommState(fFile, &dcb);

What do you think? Wouldn't it be better to have some command line
parameter to overload the previous behaviour?

Ciao.
Marco.



Message is in Reply To:
  Download problem
 
Hi Dave and everybody, I have a strange problem with an NQC program. It's something Marco Beri and I are preparing for the Mindfest. The program is rather large if compared to the average NQC programs: about 240 lines of code with large inline (...) (27 years ago, 1-Oct-99, to lugnet.robotics.rcx.nqc)

14 Messages in This Thread:






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

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