I know there are similar posts to this. I have tried all of them. But that doesn't answer my question. I have already tried srand which is provided by c, but it doesn't work in cooja.
I have also tried #include "cfs/cfs.h", #include "cfs/cfs-coffee.h". But that provide static random number.