Hi

 

I installed Delta on tmote. 

 

I edited the DeltaM.nc, to add a receive packet function.

 

  task void processRSSI()
  {
    uint16_t leds = 1;
    if( m_rssi >= 20 ) leds |= 2; //prev 15
    if( m_rssi >= 40 ) leds |= 4; //prev 35
    call Leds.set( leds );
  }

 

event TOS_MsgPtr ReceiveMsg.receive( TOS_MsgPtr msg ) {
    CountMsg_t* body = (CountMsg_t*)msg->data;
    if( body->src >= 10000 )
    {
      m_rssi = (msg->strength + 60) & 255;
      post processRSSI();
    }
    return m_rssi;
  }

 

The client sensor broadcast packet, the server sensor receives packet, it gets 
the msg and calculate the RSSI value. 

 

However, I need to add the server sensor Id with the RSSI value as a packet and 
send it by multihop to other server sensor.

 

My question are:

1. How can I get the local server sensor ID?

2. How can I append the sensor ID with the RSSI value and pack it as a packet?

 

_________________________________________________________________

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

Reply via email to