PDA

View Full Version : Sleepy Mesh Questions


lurbanovsky
10-14-2008, 01:38 PM
I am interested in using sleepy mesh script in my application. I've read the application note, but still have a few questions:

- Once the radios "wake up" what causes them to go back to sleep? In my application I'd like all the "followers" to check in with the leader before the mesh goes back to sleep.

- Is there a hardware signal from the radio that indicates it is awake. In my application a microcontroller is sending messages to the RF Engine. How does the microcontroller know when it is OK to send messages?

- How long does it take each follower to check in with the leader radio?

kbanks
10-14-2008, 02:20 PM
Once the radios "wake up" what causes them to go back to sleep? In my application I'd like all the "followers" to check in with the leader before the mesh goes back to sleep.

The nodes go back to sleep when your script tells them to (by using another sleep() function call).

So, if there is something that you want them to do before going back to sleep, script it that way.

As for having all the "followers" check in, how will you keep all the followers from trying to talk to the leader at once?

You will need to implement some sort of anti-collision scheme, such as having each follower perform a random delay, or having each follower know his place in some sort of sequence.

What I recommend is instead of having each follower report in, have the leader poll them individually. Having one node act as "master", and the other nodes act as "slaves" avoids issues around all nodes trying to talk at once.

Is there a hardware signal from the radio that indicates it is awake. In my application a microcontroller is sending messages to the RF Engine. How does the microcontroller know when it is OK to send messages?

There is no dedicated hardware signal for this. However, you could pick one of the 19 GPIO pins to use for this purpose. The script in the node would set the "status" pin one way before going to sleep, and to the opposite state when it wakes back up. Your microcontroller could monitor this pin.

How long does it take each follower to check in with the leader radio?

That depends on how much data they exchange at check-in time. As I stated above, I recommend that you not attempt a "mass check-in" scheme.

You can find some performance metrics on page 29 of the SNAP Reference Manual.