i have write the following small program (with name sendreceive) that i expect work like this:
1- send a packet from SerialForwarder to a directly connected mote (micaz) via serial port (COM,mib510)
2- the micaz response by toggling the red led on it
3- then resend the same packet back to the SerialForwarder
4- and toggle the green led
i bush a all 1s data packet with destination address of "FF" and handler ID of "0A"
but there is no response at all
it neither toggle red nor green led and no packet returned to SerialForwarder
please help
//sendreceive.nc
configuration sendreceive { }
implementation
{
components Main, sendreceiveM, LedsC, UARTComm as Comm;
Main.StdControl -> sendreceiveM;
sendreceiveM.Leds -> LedsC;
sendreceiveM.CommControl -> Comm;
sendreceiveM.ReceiveMsg -> Comm.ReceiveMsg[32];
sendreceiveM.SendMsg -> Comm.SendMsg[10];
}
//sendreceiveM.nc
module sendreceiveM{
provides interface StdControl;
uses {
interface Leds;
interface StdControl as CommControl;
interface SendMsg;
interface ReceiveMsg;
}
}
implementation
{
command result_t StdControl.init() {
call Leds.init();
call CommControl.init();
return SUCCESS;
}
command result_t StdControl.start() {
call CommControl.start();
return SUCCESS;
}
command result_t StdControl.stop() {
call CommControl.stop();
return SUCCESS;
}
event result_t SendMsg.sendDone(TOS_MsgPtr sent, result_t success) {
call Leds.greenToggle();
return SUCCESS;
}
event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr m) {
call Leds.redToggle();
call SendMsg.send(TOS_UART_ADDR, sizeof(*m),m);
return m;
}
}
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
