[Tinyos-devel] Lqi and CC2420

Philip Levis pal at cs.stanford.edu
Thu Feb 28 13:58:45 PST 2008


On Feb 28, 2008, at 11:59 AM, Andreas Koepke wrote:

> This is how the diff would look like:
>      interface CC2420Packet;
> becomes
>      interface LinkCost;
>
>     uint16_t adjustLQI(uint8_t val)
>
> moved to separate component (together with the accessor functions)
>
> ***************
> *** 336,342 ****
>     event message_t* Receive.receive(message_t* msg, void* payload,  
> uint8_t len) {
>       lqi_beacon_msg_t* bMsg = (lqi_beacon_msg_t*)payload;
>       am_addr_t source = call AMPacket.source(msg);
> !     uint8_t lqi = call CC2420Packet.getLqi(msg);
>
> --- 330,336 ----
>     event message_t* Receive.receive(message_t* msg, void* payload,  
> uint8_t len) {
>       lqi_beacon_msg_t* bMsg = (lqi_beacon_msg_t*)payload;
>       am_addr_t source = call AMPacket.source(msg);
> !     uint16_t linkcost = call LinkCost.getCost(msg);
>
> This is where it has most impact: debug can not report raw LQI  
> values anymore...

The big impact is that it defines a LinkCost interface, which is now  
expected to be a value component component reports based on the  
source address of a packet. The assumption in your approach is that  
it can be an HIL. For this to work, different link layers or link  
estimators need to be designed that meet this interface.  Adding such  
an interface to the core distribution should probably involve  
discussions with net2 and core. The net2 WG spent a lot of time on  
this topic, and settling on the white bit involved a great deal of  
discussion back and forth with core[2,3].

So my answer, as the MultihopLqi maintainer, is: given this interface  
will affect link layers to be effective, then introducing it requires  
some greater thought on its values, how it can be implemented, etc.  
We shouldn't generalize just because you'd like to reuse the LQI  
forwarding engine in one narrow case. Taking the change seriously  
requires serious change, and is on the net2/core boundary. If your  
issue is that you want to use mlqi for a non-CC2420, then write a  
dummy implementation of CC2420Packet and shadow the configuration.

Phil

[1] http://tinyos.stanford.edu:8000/Net2WG/, July 17 2007 - November  
30 2007
[2] http://tinyos.stanford.edu:8000/TinyOS_2.x_WG/06.06.2007
[3] http://tinyos.stanford.edu:8000/TinyOS_2.x_WG/08.15.2007



More information about the Tinyos-devel mailing list