On Wed, Sep 1, 2010 at 6:59 AM, rupesh vishwakarma
<[email protected]> wrote:
> 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?

To get a better understanding of local and remote sleep and wakeup,
you should read one of these papers:
Versatile Low Power Media Access for Wireless Sensor Networks
X-MAC: A Short Preamble MAC Protocol for Duty-Cycled Wireless Sensor Networks

For clock synchronization, you should consider using FTSP, which is
available in TinyOS.

- om_p

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

Reply via email to