Hi All, I am trying to use MIG to generate java class to listen to packets in serial commuincation. I follow the tutorial in the following link
http://tinyos.stanford.edu/tinyos -wiki/index.php/Mote-PC_serial_communication_and_SerialForwarder#MIG:_generating_packet_objects and everything works out in the *BlinkToRadio* example. However, I wonder if I can extend the instructions in the tutorial to generate two java classes listen to two types of packets separately. To do this, I change my MAKEFILE from the old one: *COMPONENT=BlinkToRadioAppC* *BUILD_EXTRA_DEPS=BlinkToRadioMsg.class* *CLEAN_EXTRA = *.class BlinkToRadioMsg.java* *BlinkToRadioMsg.class: BlinkToRadioMsg.java* * javac -source 1.4 -target 1.4 BlinkToRadioMsg.java* *BlinkToRadioMsg.java:* * mig java -target=null -java-classname=BlinkToRadioMsg BlinkToRadio.h BlinkToRadioMsg -o $@* by adding the following codes: *BUILD_EXTRA_DEPS+=EXTRAMsg.class* *EXTRAMsg.class: EXTRAMsg.java* * javac -source 1.4 -target 1.4 EXTRAMsg.java* *EXTRAMsg.java:* * mig java -target=null -java-classname=EXTRAMsg BlinkToRadio.h EXTRAMsg -o $@* Besides, I also did the following things to the nc code: 1. defined the EXTRAMsg struct in BlinkToRadio.h 2. define a new component: *components new SerialAMSenderC(AM_EXTRAMSG) as SerialAMEXTRA;* and wire: *App.EXTRASend ->SerialAMEXTRA;* 3. defiend a new Timer1: 4. call EXTRASend.send when Timer1.fired() just as the code called AMSend.send when Timer0.fired(). The whole program complied successfully. But when I try to run it on Indriya testbed at NUS. I uploaded .exe file and two .class files. And there is no data collected back. Could anyone help me to see if this is due to some errors in my code, the constraint of MIG listening, or the constraint of Indriya? Thank you very much. Best -- Qiao Xiang PhD candidate Department of Computer Science Wayne State University 5057 Woodward Avenue, Suite 3010 Detroit, MI 48202
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
