problem with cc2420mac (CTP implementation)

106 views
Skip to first unread message

maximus

unread,
May 4, 2012, 7:35:20 AM5/4/12
to castalia-...@googlegroups.com
Hello,
I'm actually working with CTP protocol, and of course with the associated MAC layer cc2420mac.
After running the simulation, I realized that there are many lost packets between the Mac layer and the Network layer when the node had the state "S_SAMPLE_CCA".
I think that CCA is used to indicate to the mac layer not to transmit if the phy channel is busy, but in this case, S_SAMPLE_CCA state prevent data packet from reaching network layer.

these are some lines from my trace file :

6.120837905065  SN.node[7].Communication.Radio           END signal from node 6
6.120837905065  SN.node[7].Communication.Radio           Received packet (WC_SIGNAL_END) from node 6, with no interference
...
...
6.120847905065  SN.node[7].Communication.MAC             Incoming Message from radio layer, state: 4
6.120847905065  SN.node[7].Communication.MAC             Receive_receive called!
6.120847905065  SN.node[7].Communication.MAC             Data frame
6.120847905065  SN.node[7].Communication.MAC             Packet received while not in S_STARTED. State: 4 , was for me: 1

It will be kind of you if you can explain more the use of S_SAMPLE_CCA state and why Mac layer cannot send data packet to network layer.

Regards

obren

unread,
May 8, 2012, 5:37:35 AM5/8/12
to Castalia Simulator
Hi,
you're right, the S_SAMPLE_CCA is used to prevent transmission if the
channel is busy. The problem you describe arise when you receive a
packet during the backoff interval, just before a transmission. In
this case I discard the packet since I was attempting a transmission,
but probably the correct behavior is to handle the reception (should
check on CC2420 datasheet). By the way I was expecting this event to
be very rare (and it was during simulations) thus I didn't get deeper
into this issue. What is the percentage of dropped packets related to
this event? It shouldn't be that much...
Regards,

Ugo

maximus

unread,
May 9, 2012, 10:31:06 AM5/9/12
to castalia-...@googlegroups.com
Dear Sir,

Thanks for your reply,
Actually, I have one over 12 dropped packet, I don't think it's a low percentage.
Do you have any idea how to fix it? should I alter the cc2420mac source code ?

Regards,

Abdel

obren

unread,
May 9, 2012, 10:40:25 AM5/9/12
to Castalia Simulator
It's definitely too high. Have you changed something in the default
parameters? How many nodes do you use in your simulations?
Another thing you should check, in the trace do you have "while not in
S_STARTED. State: 4 , was for me: 1" or "while not in S_STARTED.
State: 4 , was for me: 0" ? In the latter case it means it dropped a
packet for somebody else, which is not very important.
Let me know,

Ugo

maximus

unread,
May 9, 2012, 12:07:56 PM5/9/12
to castalia-...@googlegroups.com
Dear Sir,

I re-checked my trace file, for packets with "while not in S_STARTED. State: 4 , was for me: 1" I have roughly 1.85 % of the total received packets (I'm sorry for the wrong data)
By the way, I'm using 12 nodes and I didn't change anything in the default parameters.

Regards,

Abdel

maximus

unread,
May 10, 2012, 10:38:01 AM5/10/12
to castalia-...@googlegroups.com
even 1.85% is too high, what do you think ?

maximus

unread,
May 31, 2012, 5:24:00 AM5/31/12
to castalia-...@googlegroups.com
Dear Sir,

I am still waiting for your answer, please let me know if I am wrong or this is a normal behavior in such scenario.

Thanks in advance

Abdel

Le mercredi 9 mai 2012 16:40:25 UTC+2, obren a écrit :

obren

unread,
Jun 1, 2012, 4:30:46 AM6/1/12
to Castalia Simulator
Hi,
1.8% at data link layer may be possible. It depends whether the 12
nodes are all in range one with each other and on the traffic load.
Have you tried to fix the issue and check the differences in your
statistics? They shouldn't change that much at routing level...

Ugo
Reply all
Reply to author
Forward
0 new messages