[net2-wg] Collection Question

Philip Levis pal at cs.stanford.edu
Sat Feb 25 10:24:54 PST 2006


On Feb 25, 2006, at 10:06 AM, Kyle Jamieson wrote:

> This week I was helping some beginners with TinyOS, and ran across the
> following admittedly simple question I couldn't provide a satisfactory
> answer to.
>
> As a preface, I bet this has already been addressed in TinyOS 2, but
> I'm not so familiar with the t2 codebase.
>
> Here's the question:
>
> Suppose we're running a collection protocol (MintRoute) in TinyOS 1.
> How do we also send and receive single-hop (non-routed) messages?
>
> The problem is that MintRoute grabs all the SendMsg and ReceiveMsg
> interfaces of GenericCommPromiscuous, so an app can't use those.
> Seems like you could kludge it with Intercept and/or Snoop, but that's
> not satisfactory.
>
> Is there an wasy way to do this in t1?  Already been fixed in t2?
> Should be addressed by us?

The answer in 1.x is that you only wire MintRoute up to the AM  
handlers you want. It doesn't by default wire up to all AM handlers.  
This is a reasonably annoying (and error-prone) thing to do, but lets  
you use multiple handlers without requiring additional header fields.

The answer in 2.x is that a collection protocol uses a single AM  
handler and has its own protocol dispatch on top of that.

Phil





More information about the net2-wg mailing list