To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 22163
22162  |  22164
Subject: 
RE: Writing a pbForth console
Newsgroups: 
lugnet.robotics
Date: 
Fri, 30 Jan 2004 22:09:30 GMT
Original-From: 
Robert Merrison <bob@jobbernowlANTISPAM.com>
Viewed: 
765 times
  
Thanks, that's exactly what I needed to know. The only problem was that I
wasn't waiting for the flow control characters, everything seems to be
working beautifully now.

Bob

-----Original Message-----
From: news-gateway@lugnet.com [mailto:news-gateway@lugnet.com]On Behalf
Of Ralph Hempel
Sent: 30 January 2004 20:31
To: lego-robotics@crynwr.com
Subject: RE: Writing a pbForth console


I'm not sure what you mean by this.

First, are you sending using the old serial tower or the new USB tower?

The serial tower required a "warmup" if it's been idle for more than 2
seconds or so. Just send a garbage character (CR is usually OK) and wait
about 100 msec before sending anything else.

When you send messages to pbForth form the console, there is no magic
stuff around the bytes. If you type, for example, "COLD" then exactly
those characters are sent out, and they may be followed by CRLF.

Now, with that in mind, pbForth needs some way to do flow control
so that you don't swamp the interpreter with characters, so after you
send CRLF, it sends back 0x13 (XOFF) to tell you it's getting ready to
process your line of input.

WHen it's done generating any output and is ready for more input, it
will send 0x11 (XON) to let you know you can start sending again.

If you want to send raw ASCII text through a proxy, just be sure to strip
out any wierd header stuff and buffer your input according to pbForth's
XON/XOFF rules....

I hope this helps. If not, send a more detailed description of
the problem (and maybe some notes like "I send this and expected that
but instead it did such and such...")

Ralph

-----Original Message-----
From: news-gateway@lugnet.com [mailto:news-gateway@lugnet.com]On Behalf
Of Robert Merrison
Sent: Friday, January 30, 2004 12:22 PM
To: lugnet.robotics@lugnet.com
Subject: Writing a pbForth console


Hi,
I am currently attempting to write a program which, when run on my
computer, will accept network connections over the internet and act as a
proxy between the remote user and my brick, which is running pbForth. I am
unable to find, however, any documentation as to what kind of data I need • to
send to the brick besides the standard text. Through experimentation, I • have
had some success sending a byte of all zeros upon first connection, and
ending any commands with carriage return, newline, and then null, but this
doesn't seem to work correctly when no communication with the brick has
taken place for a while (something to do with 'warming up' the brick?). I
have tried looking everywhere I can think of to work out what I need to • do,
including the BricxCC code, and the pbForth GUI code, but I'm not familiar
with Delphi or TCL. If anyone could point me in the direction of some kind
of information about what I need to do, I would be very grateful.

Cheers,
Bob





Message has 1 Reply:
  RE: Writing a pbForth console
 
Great news! Can you tell us a little more about your project? Ralph (...) (20 years ago, 30-Jan-04, to lugnet.robotics)

Message is in Reply To:
  RE: Writing a pbForth console
 
I'm not sure what you mean by this. First, are you sending using the old serial tower or the new USB tower? The serial tower required a "warmup" if it's been idle for more than 2 seconds or so. Just send a garbage character (CR is usually OK) and (...) (20 years ago, 30-Jan-04, to lugnet.robotics)

4 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