Hallo,
here a short description, how I resolved this problem. I hope it's
understandable.
try this:
public class MyCommunicationClass implements MessageListener {
private MoteIF mote;
...
mote = new MoteIF(BuildSource.makePhoenix(serialAddress,
PrintStreamMessenger.err));
mote.registerListener(new FooMsg(), this); // Where FooMsg is a Msg
created with mig representing
// a
msg coming from a mote
...
// sending Messages
try {
mote.send(moteID, msg); //msg is a message generated with
mig, which is understandable by a mote
} catch (Exception e) {
e.printStackTrace();
return -1;
}
I'm using the toscomm.dll (Windows) for communication. This file has to
be located in the %jre-path%\bin-folder.
Cheers Marcel
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help