Subject:
|
Re: Receiving messages on PC
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sat, 31 Jan 2004 14:06:58 GMT
|
Viewed:
|
5124 times
|
| |
| |
In lugnet.robotics.rcx.nqc, David Burkett wrote:
> Hi,
> I'm sure this issue has come up before, but I can't find an answer to my exact
> question in the archives: Are there any utilities that can be used (preferably
> a Windows command line utility) to receive the messages sent by SendMessage()?
> Or any C/C++/Java library (again, preferably for Windows) that can be used to
> set up a listener for incoming messages within a running program? I want to get
> data off of the RCX onto my PC, but I'm not very good at writing code for
> low-level interaction with raw devices, nor do I even know how to make sure the
> USB tower is trying to receive information in the first place. Thanks for your
> help!
I have just posted MSGMON, a very rough (!!!) WIN32 command-line program that
will receive one-byte messages from the RCX using a USB tower. This should get
you started, although it will need a lot of work to make this into anything
resembling a useful library. You can download the program with source code from
the following location:
http://www.drvegetable.com/download/samplecode/
The important points are:
1. Open the LEGO USB tower using CreateFile() with the filename "\\.\LEGOTOWER1"
2. Read bytes from the tower and look for valid SendMessage commands in the
input stream
3. Whenever a valid SendMessage is detected, print out a message containing the
received byte.
As I said this is very rough and would need a lot of work in order to be used
with an RS-232 tower or to recognize other messages.
Let me know if you have any questions or how you make out with this. I hope
this helps, and good luck!
- Chris.
|
|
Message has 1 Reply:
Message is in Reply To:
| | Receiving messages on PC
|
| Hi, I'm sure this issue has come up before, but I can't find an answer to my exact question in the archives: Are there any utilities that can be used (preferably a Windows command line utility) to receive the messages sent by SendMessage()? Or any (...) (21 years ago, 30-Jan-04, to lugnet.robotics.rcx.nqc)
|
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
|
|
|
|