Hi,
-Regarding putting the strength in a variable like "the_rssi_value_is", which 
part of this "IntToRfmM" code should be modified? 
-If i have a MOTE that i want to send to it and i already gave it a node ID 14 
by "make mica2 install.14", should i write "14" instead of "TOS_BCAST_ADDR"?
-If i have a MOTE that should receive 3 msgs from 3 different MOTES where 
"the_rssi_value_is" will be the data in this case, how can the MOTE detect the 
MOTE ID that is sending and extract the data from it?
-I didnt get the part of the calculations; i have to take the 3 RSSI values 
received and use them in equations, how can that be done?
------------------------------------------------------------
command result_t IntOutput.output(uint16_t value)
  {
    IntMsg *message = (IntMsg *)data.data;

    if (!pending) 
      {
        pending = TRUE;

        message->val = value;
        atomic {
          message->src = TOS_LOCAL_ADDRESS;
        }
        if (call Send.send(TOS_BCAST_ADDR, sizeof(IntMsg), &data))
          return SUCCESS;

        pending = FALSE;
      }
    return FAIL;
  }

  event result_t Send.sendDone(TOS_MsgPtr msg, result_t success)
  {
    if (pending && msg == &data)
      {
        pending = FALSE;
        signal IntOutput.outputComplete(success);
      }
    return SUCCESS;
  }
---------------------------------------------------------------------------
Best Regards,
Tito

-----Original Message-----
From: Van der Haegen Mathieu [mailto:[EMAIL PROTECTED]
Sent: Fri 7/6/2007 04:04 PM
To: Tarek Mohamed Salah El-Din Mansour
Cc: [email protected]
Subject: Re: [Tinyos-help] Localization implementation
 
Hi !

On 7/6/07, Tarek Mohamed Salah El-Din Mansour <
[EMAIL PROTECTED]> wrote:
>
>
> Hi there,
>
> i need some real guide and clear steps in implementing the 
> localization,{mica2,
> tinyos 1.x}
> so now i have 5-6 MOTES, and here how it goes theoretically in steps:
> 1- MOTE 1 will be the mote to be localized and it send msg through RF;
> 2- Then i have MOTES 2,3,4 should receive the signal from it and should
> extract the RSSI value,
>    and then each mote send RSSI to MOTE 5 which is connected serially to
> the PC.
> 3- The PC should then do its calculations of the distance and report to
> MOTE 6 which should then
>    display (GREEN-near, YELLOW-intermediate, RED-far, ALL 3-out of range).
> -----------------
> Here are my questions,
> in step 2,
> -the RSSI because i am lost from the previous msgs regarding this topic,
> how can i extract it then send it to another mote? i mean like what is the
> coding for it?
>

I don't know about mica2 sorry. But here is how I exctracted the RSSI with
Tmote nodes :

event TOS_MsgPtr ReceivePing.receive(TOS_MsgPtr m) {
           ...
            the_rssi_value_is = m->strength;
           ...
    }


-the distance between MOTES 2,3,4 , what is the maximum distance possible?
> is 50 meters possible? like to cover a building
> -can MOTE 4 be the one connected serially to the PC and remove MOTE 5?
>

I don't know the maximum distance for mica2
I wouldn't put one of the receiving nodes on the PC because of the
interference caused by it, that could influence the RSSI values (well I'm
not sure about this)

in step 3,
> -how is calculations made in tinyos?
>

For the calculations in tinyos, you can take a look at the Listen Java
program on how to get the messages from the network in a common java program
and then send back a message to the network.
You should consider using MIG (Message Interface Generator) to do that !
Here is the reference page for MIG :
http://www.tinyos.net/tinyos-1.x/doc/nesc/mig.html
And here is a complete example :
http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson6.html
In the code of my master thesis :
http://www.ulb.ac.be/di/labo/data/MVHaegen_Master2007_Code_Data.zip , there
is a complete example of a Java application that sends and receives message
to a network of sensors (in the
codemem\java\ExpoSciences\mapview-dynamic_localisation\ directory)


I hope this is of some help
Best Regards,

Van der Haegen Mathieu

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

Reply via email to