On Mar 14, 2008, at 6:01 PM, Ake Tangkananond wrote:
Hi everyone,
I am quite new to the TinyOS and I don't understand how CSMA works
during
the simulation of Tossim. I found documentation described that that
"By
default, the MAC object is configured to act like the standard
TinyOS 2.0
CC2420 stack". So, I check the file ./tos/chips/cc2420/csma/
CC2420CsmaP.nc
and add a "dbg" statement into command RadioBackoff.setInitialBackoff,
RadioBackoff.setCongestionBackoff, etc. to see when back off happens.
However, it doesn't work as I expected. There nothing happens at
all. (I
tried to make the file contain syntax errors, but I still can
compile my
tinyos program using make micaz sim, so I guess the sim does not use
CC2420CsmaP.nc. So what file is used?)
I tried simulating with 10 nodes with all-to-all topology and have
them
broadcast message at the same time and all of them can successfully
send the
broadcast message. I also tried to have nodes send the message at
1-100 us
time difference but still, I did not see they sense the carrier before
sending at all. What I observed is that sending is always succeed
(send
immediately when it is asked to send without sensing if others are
sending).
To what I understood.
1. The Tossim simulates packet loss, packet collision, hidden
channel as
shown in the ./apps/tests/TestSimComm.
2. The Tossim simulates sending delay but does not simulate
receiving delay.
What is "receiving delay?" The delay for spooling a packet in over
the bus? You are correct that TOSSIM does not model this.
I experimented this by having one node broadcasting in all-to-all
topology.
I saw that all other nodes received the message at application
level exactly
at the same time.
3. The Tossim does not simulate transmission propagation delay,
which I
agree with that because it is so small so that it is neglectable.
Question
1. Did I understood correctly on when I mentioned above
Yes.
2. How could I observe CSMA behavior in Tossim? Is there any easy
way e.g.
put t.addChannel("AM", sys.stdout)
Take a look at TossimPacketModelC.
3. How to enable Tossim to simulate CSMA behavior?
It does.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help