Hi Dear Markus,

you should change the default SeedInt for two nodes.I think this is because
two nodes have same TOS_NODE_ID and the default seed value for generating
random numbers is Node ID.So you need to change to default Seed.
you can use these 2 interfaces for you scenario.

*interface Random;
interface ParameterInit<uint16_t> as Seed;
*
before calling the Random.rand16() or Random.rand32(),you can change the
seed by this code :

*call Seed.init(your Seed);*-----> (obviously the seed should be different
for each node).

And you need to connect mentioned interfaces as :
*
yourProgramC.Random->RandomC;
yourProgramC.Seed -> RandomMlcgC.SeedInit;

*Cheers,
*    *

On Tue, Sep 14, 2010 at 1:04 AM, Markus Niedermann <
[email protected]> wrote:

>  At first, i want to say hello.
> This is my first mail at this mailinglist.
> I'm Markus N. from Karlsruhe, Germany, Student of Computer science.
>
> My situation:
> i have 2 micaz motes with the same software installed. (Same
> TOS_NODE_ID, too)
> Now, i want to have 2 different random numbers at the two motes.
>
> My idea was it, to use RandomC, but I always get the same random number,
> because all relevant factors at the 2 motes seems to be the same.
>
> Is there another Random implementation with a better algorithm that uses
> unique factors? are there any unique factors?
> It wouldn't matter, if the same random number appears at the same mote,
> but at the other mote, i need another random number.
>
> Thanks for your help.
> Markus
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Mojtaba Raznahan
BS of Computer engineering
TMU university
www.raznahan.com
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to