To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 283
282  |  284
Subject: 
RE: Checksum download of text to RCX
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Sun, 2 Apr 2000 20:38:13 GMT
Viewed: 
2117 times
  
I wrote a simple addition to pbforth that allows it to receive text with a
checksum across every line. Every line is ACK/NAK-ed and if necessary
resent. Timeouts are not implemented.

This is a neat idea, Ernst. I think it would be a good addition to the pbForth
system if we can allow the user to use it for text uploads and then switch
to normal mode for interactive use.

Now, the main word looks like this:

: PBX-RECEIVE    ( -- )
   BEGIN pbx.buf DUP size-of-pad pbx.ACCEPT EVALUATE AGAIN ;

1) This is an endless loop. The protocol terminates by throwing a user
interrupt when it receives an ETX (^C). This is easy to implement and has
the advantage that the interpreter returns to a known state when the
transmission is cancelled by the user. OTOH, this is abusing the exception
mechanism a bit. Any thoughts on the necessity of using a different
termination mechanism?

I'll have to think about this a bit..

2) PBX (=PBforth Xfer) uses its own buffer, pbx.buf. I would like to use the
TIB instead to conserve memory. This feels allowable because both ACCEPT and
pbx.ACCEPT use the same communication channel; just a different protocol.
Any thoughts?

Using the TIB is fine, since only one channel can be active at a time. It would
be best if PBX-RECEIVE could filter lines with/without sums. Maybe a special
leadin char to indicate the line needs a checksum?

As a marginal note: Using PBX, I uploaded quite large files without a single
line needing retransmission, whereas ascii-xfer uploads failed miserably
10 out of 10 times. The most important difference between the two (apart
from the checksum) seems to be that when using PBX, the RCX doesn't talk
back ('ok', 'redefine ...', etc.). Does anybody know for sure whether a more
silent RCX results in a better transmission?

Again, I'm not sure if shutting the RX up helps much. I'm going to release a
new version in the next two weeks, and I really like the idea of PBX. Maybe
we can integrate it into the kernel if we have the leadin/checksum mode
option...

Thanks for sharing this with us, Ernst.

Cheers,

Ralph Hempel - P.Eng

--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbFORTH>
--------------------------------------------------------
Reply to:      rhempel at bmts dot com
--------------------------------------------------------



Message has 1 Reply:
  Re: Checksum download of text to RCX
 
(...) would (...) Can do... Currently a line is transmitted as <text>NL<checksum>, so a checksummed line can already be distinguished from a non-checksummed, CR-terminated line. Adding a line header (any objections against STX?) is more failsafe, of (...) (24 years ago, 3-Apr-00, to lugnet.robotics.rcx.pbforth)

Message is in Reply To:
  Checksum download of text to RCX
 
I wrote a simple addition to pbforth that allows it to receive text with a checksum across every line. Every line is ACK/NAK-ed and if necessary resent. Timeouts are not implemented. Now, the main word looks like this: : PBX-RECEIVE ( -- ) BEGIN (...) (24 years ago, 2-Apr-00, to lugnet.robotics.rcx.pbforth)  

3 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