Dear all,
Actually I am a new person in tiny Os field . I have to implement AODV
protocol(for multihop ) as you described in your pdf file. some more things I
also have to implement -
1. intermediate motes should be in sleep and wakeup at some time to see if
there is any message?
2. source should synchronize all nodes with its clock.
for intermediate motes to be in sleep I have implemented like this
when I send a message to intermediate motes I call
event void Boot.booted() {
call LPL.setLocalWakeupInterval(2000);
call AMControl.start();
}
event void AMControl.startDone(error_t err) {
if (err == SUCCESS)
{
counter++;
call LPL.setRemoteWakeupInterval(&pkt, 2000);
if (!busy) {
BlinkToRadioMsg* btrpkt =
(BlinkToRadioMsg*)(call Packet.getPayload(&pkt, sizeof(BlinkToRadioMsg)));
if (btrpkt == NULL) {
return;
}
btrpkt->nodeid = TOS_NODE_ID;
btrpkt->counter = counter;
call LPL.setRemoteWakeupInterval(&pkt, 2000);
if (call AMSend.send(2,
&pkt, sizeof(BlinkToRadioMsg)) == SUCCESS) {
busy = TRUE;
}
}
}
else {
call AMControl.start();
}
}
does the above code set the remote nodes to wakeup after 2000ms?? or some
other
method has to be implemented
can you please suggest something regarding clock synchronization between
source and destination?
regards,
rupesh
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help