Serial forwarder just passes messages from the serial port
to a network port. You can configure the MOTECOM variable
for your application to go directly to the serial port,
just use the value you would use for SF.
MS
Miky Mike wrote:
Thank you for the suggestions.
I looked deeper at the application AntiTheft and i managed to do my own
application. I can now read messages sent by motes to the PC serial port
and show them in my java GUI.
I was wondering if there is a possibility of not using the
SerialForwarder and still receive the messages in the format i sent,
example:
typedef nx_struct mymessage {
nx_uint8_t moteID;
} mymessage;
Michael
On Wed, Jul 16, 2008 at 6:04 AM, Michael Schippling [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
Listen uses, I believe, PacketSource.readPacket() to get a message.
There is a parallel PacketSource.writePacket(data) method which
sends an appropriately formatted packet after doing magical
protocol and crc transformations. Formatting the data
is tricky, my code does it by brute force. The MIG message
class generator may provide some utility in this respect
but I tend to want to do things myself.
In the T1 tools tree you can find
java/net/tinyos/oscope/OscopeResetMsg.java
which is the class for the Reset message I mentioned.
It is used in
java/net/tinyos/oscope/GraphPanel.java
which sounds like it should do GUI stuff but actually
seems to do the real work of the O'scope program.
MS
Miky Mike wrote:
Thank You for the reply.
The Listen.java program reads packets from the serial port and
prints those packets on the command line. I think i understand
how that is done. Now i want to write my own packets to the
serial port, and that's what i don't know how to do.
I couldn't find the Reset message in O'scope as you said.
Your example code seems to be a good way for me to learn. I have
to spend more time trying to understand it.
Again, thank you for the reply.
Michael
On Tue, Jul 15, 2008 at 6:18 PM, Michael Schippling
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
The Listen.java program does just about all that you need
vis setting up communications. There's the Reset message
in O'scope that shows how to send a message, but not very
clearly. My posted code has an example of a Java command
line program that sends and receives messages as well:
http://www.etantdonnes.com/Motes/
MS
Miky Mike wrote:
Hello all,
I'm doing a project for my university where
i'm using tinyos to program
micaz motes. I want to do a graphic user interface that
allows
to send messages to the motes. I've chosen to program the
GUI in
java but i don't know witch classes from tinyos i need to
use to
communicate via serial port with the motes. Can anyone
help me
with this?? I couldn't find any examples.
I've tried to look at the application Oscilloscope but it
didn't
helped much.
Thank You.
Michael
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
mailto:Tinyos-help@millennium.berkeley.edu
mailto:Tinyos-help@millennium.berkeley.edu
mailto:Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help