To use 'standard' TOS messaging, basically the GenericComm
component, all your messages need to be wrapped in a TOS_Msg
struct.  If you are using Java on the host/PC side, you need
to construct a buffer that looks like a TOS_Msg and send it.
There's a rather large and unwieldy example of this in my
code bolus at: http://www.etantdonnes.com/Motes/robocode.tar.gz

You can also look at the MicaHWVerify java code which uses MIG
to generate a host side message class.

My comment about getting the radio working was in hopes of
forestalling multiple problems. Make sure you have the comm
working with demo apps before you try to confuse yourself
with multiple points of failure in your own code...

MS


Jose L. Ponce wrote:
Hi,

On Thu, 2006-03-23 at 14:03 -0700, Michael Schippling wrote:
sounds like you have exactly the right idea.

No need to modify TOSBase. Just put the destination moteID
(the X in install.X) in the TOS_Msg.addr field. It's probably
set to BROADCASE (0xffff) by default.


Thank you. The thing is, I am using my own message type,
DimmerControlMSG and I can't do a m.set_addr(X). Do I have to embed my
message into a TOS_Msg or something like that?


If you haven't been through all the get-the-radio-working shuffle
already, you should go through that part of the tutorial first.

Yes, I have been looking a little through that, but I couldn't really
find much regarding this...

- Jose.

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to