Professional Documents
Culture Documents
Contents
1 Background
1.1 USRP . . . . . . .
1.2 GNURadio . . . .
1.3 CSMA/CA . . . .
1.4 802.11 MAC Frame
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
3
3
5
.
.
.
.
.
.
.
.
.
.
6
6
6
6
8
8
8
9
10
10
10
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
14
14
14
14
15
16
16
17
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
18
18
20
20
21
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4.3.2
A Troubleshooting
A.1 Debugging GNURadio . . . . . . . . . .
A.2 PHY CRC Error . . . . . . . . . . . . . .
A.3 First Packet Missing . . . . . . . . . . . .
A.4 Multi-Threading Collision with wxPython
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
B shell script
C Test cases log
C.1 Test case1 log
C.2 Test case2 log
C.3 Test case3 log
C.4 Test case4 log
C.5 Test case5 log
C.6 Test case6 log
C.7 Test case7 log
21
24
24
24
24
25
26
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
26
26
28
30
33
35
37
38
1 Background
1.1 USRP
The Universal Software Radio Peripheral(USRP) products are a family of computerhosted hardware offered by Ettus Research LLC and its parent company, National
Instruments, for making software radios. The USRP product is intended to be a
comparatively inexpensive hardware device facilitating the building of a software
radio. The USRP hardware connects to a host computer through a high-speed USB
or Gigabit Ethernet. This connection enables host-based software to control the
USRP platform and prepare signals for transmission or reception [9].
1.2 GNURadio
GNU Radio with the universal software radio peripheral (USRP) has become one
of the most widely used development toolkits to implement software radios in academic and commercial environments. GNU Radio is a collection of software that
when combined with minimal hardware, allows the construction of radios where
the actual waveforms transmitted and received are defined by software. What this
means is that it turns the digital modulation schemes used in todays high performance wireless devices into software problems.
GNU Radio provides a library of signal processing blocks and the glue to tie
it all together. The programmer builds a radio by creating a graph (as in graph
theory) where the vertices are signal processing blocks and the edges represent the
data flow between them. The signal processing blocks are implemented in C++.
Conceptually, blocks process infinite streams of data flowing from their input ports
to their output ports. Blocks attributes include the number of input and output
ports they have as well as the type of data that flows through each. The most
frequently used types are short, float and complex [6].
Graphical interfaces for GNU Radio applications are built in Python. Interfaces
can be built using any toolkit we can access from Python. GNU Radio provides
blocks that use inter-process communication to transfer chunks of data from the
real-time C++ flow graph to Python-land.
1.3 CSMA/CA
In CSMA/CA, a carrier sensing scheme is used, a node wishing to transmit data
has to first listen to the channel for a predetermined amount of time to determine
whether or not another node is transmitting on the channel within the wireless
range. If the channel is sensed idle, then the node is permitted to begin the
transmission process. If the channel is sensed as busy, the node defers its transmission for a random period of time. Once the transmission process begins, it is
still possible for the actual transmission of application data to not occur.
The use of collision avoidance is used to improve the performance of CSMA
by attempting to divide the wireless channel up somewhat equally among all trans3
mitting nodes within the collision domain. CSMA/CA differs from CSMA/CD
due to the nature of the medium, the radio frequency spectrum. Collisions cannot
be detected while occurring at the sending node, thus it is vital for CSMA/CA or
another access method to be implemented. CSMA/CA is used in 802.11 based
wireless LANs and other wired and wireless communication systems. One of the
problems of wireless data communications is that it is not possible to listen while
sending. Therefore, collision detection is not possible. Another reason is the hidden terminal problem [4].
Start
Assemble
a Frame
Is the
Channel
Idle?
NO
YES
Transmit RTS
CTS Received?
NO
Using IEEE 802.11 RTS/CTS Exchange
YES
Transmit
Application Data
END
factor which determines the amount of time the node must wait until it is allowed
to transmit its packet. During periods in which the channel is clear, the transmitting
node decrements its backoff counter. (When the channel is busy it does not decrement its backoff counter) When the backoff counter reaches zero, the node transmits the packet. Since the probability that two nodes will choose the same backoff
factor is small, collisions between packets are minimized. Collision detection, as
is employed in Ethernet, cannot be used for the radio frequency transmissions of
IEEE 802.11. The reason for this is that when a node is transmitting it cannot hear
any other node in the system which may be transmitting, since its own signal will
drown out any others arriving at the node [1].
Test Layer
GUI
MAC Layer
Logging
PHY Layer
GNURadio
2. Remove dependencies
As mentioned before, in oder to ensure MAC protocol independent of hardware, we must make sure that the CSS delay and the ACK delay can be
self-adjusted on different hardware. One easy way to do this is let MAC
protocol to measure these two delays when it starts to work.
2.2.2
The PHY layer has two components: transmit component and receive component.
The transmit component has two blocks: the modulator and USRP sink. Thus, it
can receive frame from uplayer, modulate the frame and then transmit the packet
throught USRP sink. The receive component has four blocks: the USRP source,
filter, probe and demodulator; The signal got from USRP source goes through filter,
then the probe block uses the signal strength to decide whether the channel is busy
or not (carrier sensing). The demodulator uses the signal to recovery the packet.
the channel idle uninterruptedly for SIFS time, then it can send the ACK without
back off.
Obviously, the basic CSMA/CA mechanism is not fair. Independent of the
overall time a node has already waited for transmission; each node has the same
chances for transmitting data in the next cycle. To provide fairness, IEEE 802.11
adds a back off timer. Again, each node selects a random waiting time within
the range of the contention window. If a certain station does not get access to
the medium in the first cycle, it stops its back off timer, waits for the channel
to be idle again for DIFS and starts the counter again. As soon as the counter
expires, the node accesses the medium. This means that deferred stations do not
choose a randomized back off time again, but continue to count down. Stations that
have waited longer have the advantage over stations that have just entered, in that
they only have to wait for the remainder of their back off timer from the previous
cycle(s) [12].
2.3.2
MAC State
ACK or NAK
S_Pkt Arrive
Sending
Idle
Time expire or NAK
ACK
send
ACK or NAK
Waiting
O_Pkt
NAK or ACK
S_Pkt Arrive
O_Pkt
replying
two states only when it is sending a packet or replying ACK, whichs time is very
short. The MAC layer stays on waiting states when it sent a packet but not receive
ACK yet. After the initialization, and the MAC layer stays on idle state, it will also
stay on idle after finishing sending one packet and receiving the ACK.
2.3.3
TX and RX Flow
To implement the CSMA/CA MAC layer, we must figure out the flow of CSMA/CA, including the transmission flow is shown in Figure 7 and receiving flow
is shown in Figure 8.
From the transmitting and receiving flow chart, we can see clearly what action
the MAC layer should perform under different conditions. When transmitting, we
use two loops to make sure the MAC layer wait the channel idle uninterruptedly
for DIFS time. After DIFS, when the MAC layer is backing off, if it is interrupted
after ith slots but before (i + 1)th slots, it will resume the timer at ith slots.
After receiving a packet, the PHY layer will first check the CRC. If the CRC
is all right, the MAC layer will continually check the MAC CRC, the destination
MAC address and the frame type. For a ACK frame, the MAC layer just changes
state to mark that it receives the ACK and finishes one communication successfully,
For receiving a PKT frame, the MAC layer will wait for SIFS and then send the
ACK.
10
Send a packet
Frame preparation
busy
interrupted
Listen to the
channel
free
Interrupted before
Backoff time =
random slot time
timer expire
Resume timer
Never interrupted
Back off, interrupted
or not
interrupted
Send packet
Start timer,
wait for ACK
Receive ACK
Finish sending
11
Receive a packet
Check PHY
CRC Error
No error
Check des of
frame
My frame
ACK
packet
Change state
ACK preparation
Send reply
Finish receiving
12
13
by transmitter. So the retransmission scheme is needed. Our third test case is used
to validate our retransmission scheme works for CSMA/CA shown in Figure 12. A
will first get the packet for B, then C obtains the packet for A during As DIFS. D
gets teh packet for B during Bs SIFS. Both C and Ds transmitted packets are lost
and they both retransmit the packet again after the timer expires. Note that during
retransmission, the contention window will be doubled.
15
16
17
0.5
Access code
Whitener
offset
0.5
1.5
Payload
length
Whitener
offset
1.5
Payload
length
1-4092
Payload
0-7
CRC
Pad
Bytes
Payload_with_CRC
Header
18
modulator provides 1 bit per symbol and 2 samples per symbol, therefore
after calculation:
lcm(128/8, 2)
1bit per symbol = 8bytes
2samples per symbol
(1)
We get the bytes of modulus is 8, which means the resulting packet has to be
a multiplier of 8 bytes. The range of Pad is from 0 to 7.
First, we perform the calculation of the pure theoretical MAC efficiency when
we only consider overheads from PHY frame, MAC frame and CSMA/CA protocol. The following figure shows the components what are related with MAC
efficiency.
Sender
PHY
Over
DIFS head
MAC
Over
head
Payload
SIFS
PHY
Over
head
MAC
Over
head
ACK
Receiver
Data
ru
Data+ACK+2Om +2Op
ru
+ DIF S + SIF S
(2)
In the above Equation, Om means the overhead of MAC layer, Op means the
overhead of PHY layer, ru means the datarate of USPR. According to the experiment, the value for each parameter in Equation (1) is shown in the following table.
Table 1: Parameters of pure theoretical MAC efficiency
Parameter
Value
Data
1000 bytes
ACK
5 bytes
MAC overhead
34 bytes
PHY overhead
18+Pad bytes
bitrate
500kbps
DIFS
1ms
SIFS
0.1ms
By using these parameters, we can get the pure theoretical MAC efficiency of
84.12%.
19
Get
ACK
DIFS
Host A
to
USRP A
delay
PKT transmitting
USRP A
to
Host A
Delay
-------Carrier
Sense
Delay
SIFS
Host B
ACK
to
USRP B transmitting
delay
USRP B
to
Host B
Delay
-------Carrier
Sense
Delay
Next round
Get
PKT
Data
ru
Data+ACK+2Om +2Op
+ du
ru
+ DIF S + SIF S
(3)
Ep =
k lp 8
t ru
(4)
In this scenario, we make two transceivers talk to each other, that is, two
transceivers T R1 and T R2, each one can send packets to the other one, receive
packets from the other one and reply an ACK. If one sends a packet, doesnt get
the ACK and time expired, it will re-transmit the packet until it gets an ACK.
We let each transceiver sends 100 packets one time, and run the experiment 5
times. The time each transceiver used to send 100 packets and receive 100 packets
is shown in Table 3.
We use the average time of these five experiments as t. As each transceiver
transmits 100 packets and recives 100 packets, thus, k should be 200. Using the
Equation 4, we can get that:
Ep =
4.3.2
k lp 8
200 1000 8
=
50.8%
t ru
6.3005 500K
(5)
In this scenario, we make four transceivers talk to each other, that is, four transceivers
T R1, T R2, T R3 and T R4. Each one randomly selects one of other three transceivers
as destination, then send packets to that transceiver. When receiving a packet, the
transceiver will first check if the packets destination is him, if yes, return an ACK,
21
TR1
TR2
6.336
6.224
Experiment 3
TR1
TR2
6.340
6.227
Experiment 4
TR1
TR2
6.353
6.232
Experiment 5
TR1
TR2
6.409
6.293
Average Time
6.3005
otherwise just drop the packet; If one sends a packet, doesnt get the ACK and time
expired, it will re-transmit the packet until it gets an ACK.
We let each transceiver sends 100 packets. The time each transceiver used to
send 100 packets and receive packets from other three transceivers is shown in the
Table 4.
Table 4: Time used by each transceiver in experiment
Transceiver Time (s)
TR1
TR2
TR1
TR2
Average
36.174
36.077
36.078
36.203
36.133
Ep =
400 1000 8
k lp 8
=
17.7%
t ru
36.133 500K
(6)
The efficiency decreases sharply as collisions happen, since the ACK expire
time of GNURadio-MACer is very large, this means the retransmission time can
be very long, so, the efficiency decreases a lot compare to the two transceivers
scenario, which the collisions seldom happen.
22
References
[1] 802.11
csma/ca.
http://oscar.iitb.ac.in/
onsiteDocumentsDirectory/csma_ca/csma_ca/index.
html. Accessed in April 2011.
[2] 802.11 frame format. http://technet.microsoft.com/en-us/
library/cc757419%28WS.10%29.aspx. Accessed in April 2011.
[3] Bbn 802.11 receiver. https://www.cgran.org/wiki/BBN80211.
Accessed in April 2010.
[4] Csma/ca introduction.
http://en.wikipedia.org/wiki/
Carrier_sense_multiple_access_with_collision_
avoidance. Accessed in April 2011.
[5] First packet missing. http://gnuradio.blogspot.com/2011/04/
re-discuss-gnuradio-run-two-usrp.html. Accessed in April
2010.
[6] Gnu radio introduction.
http://www.hsc.com/Portals/0/
/Uploads/Articles/HSC-GnuRadio633851530807166689.
pdf. Accessed in April 2011.
[7] How to write a gnu radio signal processing block. http://www.gnu.
org/software/gnuradio/doc/howto-write-a-block.html.
Accessed in April 2010.
[8] Simplified csma/ca algorithm. http://en.wikipedia.org/wiki/
File:Csma_ca.svg. Accessed in April 2011.
[9] Usrp
introduction.
http://en.wikipedia.org/wiki/
Universal_Software_Radio_Peripheral. Accessed in April
2011.
[10] wxpython. http://wxpython.org/what.php. Accessed in April
2010.
[11] wxpython demo.
http://downloads.sourceforge.net/
wxpython/wxPython-demo-2.8.11.0.tar.bz2.
Accessed
in April 2010.
23
Appendices
A
Troubleshooting
depending on the noise in the system. So it might not synchronize until after the
first packet or so. So yes, its random because youre dealing with stochastic processes :) Im a bit surprised that you are sometimes missing the first 2 packets.
Could be due to bad multipath (the benchmark scripts dont use an equalizer) or
any of the other random things that happen [5].
We can get error message like The program python received an X Window
System error. or sometimes the GUI just die. After googling the problem, we find
that this is a bug in wxpython when it is working with multi-threading. The error
happens when the X window System invoke the GUI program to display, but at the
same time, the main thread invoke the GUI program to append some text.
When we check the wxPython demo, we find that The main issue with multithreaded GUI programming is the thread safty of the GUI itself. On most platforms
the GUI is not thread safe and so any cross platform GUI Toolkit and applications
written with it need to take that into account. The solution is to only allow interaction with the GUI from a single thread, but this often severely limits what can
be done in an application and makes it difficult to use additional threads at all.
Since wxPython already makes extensive use of event handlers, it is a logical extension to allow events to be sent to GUI objects from alternate threads. A function
called wx.PostEvent allows you to do this. It accepts an event and an event handler
(window) and instead of sending the event immediately in the current context like
ProcessEvent does, it processes it later from the context of the GUI thread [11].
25
Thus, according to the hint above, we use the event driven GUI updating
method, that is, define varieties of GUI updating events in the GUI showing module and define how GUI showing module will handle these events, thus, when the
actual communication part need to update the GUI, it will just post the corresponding events, the GUI module will capture those events and update the GUI showing.
The problem is solved successfully.
B shell script
We write a simple script called run.sh to make sure the system could schedule all
the processes almost the same time to keep timing synchronized.
sudo python qa main.py f 5e9 w 0 &
sudo python qa main 1.py f 5e9 w 1 &
sudo python qa main 2.py -f 5e9 w 2 &
sudo python qa main 3.py f 5e9 w 3 &
We just attach all the logs for the test cases so that you can verify it works.
is ready to
is ready to
is ready to
is ready to
uplayer PKT
26
18 12:37:38 745 00:00:00:00:00:02 -> MAC frame not for me, drop!
19 12:37:38 746 00:00:00:00:00:03 -> MAC frame not for me, drop!
20 12:37:38 746 00:00:00:00:00:01 -> receives PKT 1 from
00:00:00:00:00:00, CRC right
21 12:37:38 747 00:00:00:00:00:01 -> channel idle now, wait for SIFS
only
22 12:37:38 749 00:00:00:00:00:01 -> channel idled for SIFS
23 12:37:38 749 00:00:00:00:00:01 -> sending PKT 1s ACK to
00:00:00:00:00:00
24 12:37:38 749 00:00:00:00:00:01 -> csmaca mac, finish sending
25 12:37:38 752 00:00:00:00:00:03 -> interrupted in DIFS, time
elapsed 0.007667
26 12:37:38 752 00:00:00:00:00:03 -> channel busy
27 12:37:38 752 00:00:00:00:00:01 -> finish sending PKT 1s ACK to
00:00:00:00:00:00
28 12:37:38 752 00:00:00:00:00:02 -> interrupted in DIFS, time
elapsed 0.007557
29 12:37:38 752 00:00:00:00:00:02 -> channel busy
30 12:37:38 755 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 6.000000 remaining slots
31 12:37:38 756 00:00:00:00:00:02 -> channel idle now, wait for DIFS
and 5.000000 remaining slots
32 12:37:38 757 00:00:00:00:00:02 -> MAC frame not for me, drop!
33 12:37:38 757 00:00:00:00:00:03 -> MAC frame not for me, drop!
34 12:37:38 757 00:00:00:00:00:00 -> gets PKT 1s ACK from
00:00:00:00:00:01. One COMM Suc
35 12:37:38 882 00:00:00:00:00:02 -> channel idled for DIFS and
5.000000 slots time
36 12:37:38 882 00:00:00:00:00:02 -> csmaca mac, finish sending
37 12:37:38 882 00:00:00:00:00:02 -> sent PKT 1 to 00:00:00:00:00:00,
no ACK yet
38 12:37:38 885 00:00:00:00:00:03 -> interrupted at slot time
5.861168
39 12:37:38 885 00:00:00:00:00:03 -> channel busy
40 12:37:38 893 00:00:00:00:00:00 -> receives PKT 1 from
00:00:00:00:00:02, CRC right
41 12:37:38 894 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 1.000000 remaining slots
42 12:37:38 895 00:00:00:00:00:03 -> MAC frame not for me, drop!
43 12:37:38 895 00:00:00:00:00:01 -> MAC frame not for me, drop!
44 12:37:38 894 00:00:00:00:00:00 -> channel idle now, wait for SIFS
only
45 12:37:38 897 00:00:00:00:00:00 -> channel idled for SIFS
46 12:37:38 897 00:00:00:00:00:00 -> sending PKT 1s ACK to
00:00:00:00:00:02
47 12:37:38 899 00:00:00:00:00:00 -> csmaca mac, finish sending
48 12:37:38 899 00:00:00:00:00:00 -> finish sending PKT 1s ACK to
00:00:00:00:00:02
49 12:37:38 899 00:00:00:00:00:03 -> interrupted in DIFS, time
elapsed 0.005637
50 12:37:38 900 00:00:00:00:00:03 -> channel busy
51 12:37:38 905 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 1.000000 remaining slots
52 12:37:38 905 00:00:00:00:00:01 -> MAC frame not for me, drop!
27
is ready to
is ready to
is ready to
uplayer PKT
28
16 12:37:38 744 00:00:00:00:00:02 -> channel idle now, wait for DIFS
and 5.000000 remaining slots
17 12:37:38 745 00:00:00:00:00:02 -> MAC frame not for me, drop!
18 12:37:38 746 00:00:00:00:00:03 -> MAC frame not for me, drop!
19 12:37:38 746 00:00:00:00:00:01 -> receives PKT 1 from
00:00:00:00:00:00, CRC right
20 12:37:38 747 00:00:00:00:00:01 -> channel idle now, wait for SIFS
only
21 12:37:38 749 00:00:00:00:00:01 -> channel idled for SIFS
22 12:37:38 749 00:00:00:00:00:01 -> sending PKT 1s ACK to
00:00:00:00:00:00
23 12:37:38 749 00:00:00:00:00:01 -> csmaca mac, finish sending
24 12:37:38 752 00:00:00:00:00:03 -> interrupted in DIFS, time
elapsed 0.007667
25 12:37:38 752 00:00:00:00:00:03 -> channel busy
26 12:37:38 752 00:00:00:00:00:01 -> finish sending PKT 1s ACK to
00:00:00:00:00:00
27 12:37:38 752 00:00:00:00:00:02 -> interrupted in DIFS, time
elapsed 0.007557
28 12:37:38 752 00:00:00:00:00:02 -> channel busy
29 12:37:38 755 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 6.000000 remaining slots
30 12:37:38 756 00:00:00:00:00:02 -> channel idle now, wait for DIFS
and 5.000000 remaining slots
31 12:37:38 757 00:00:00:00:00:02 -> MAC frame not for me, drop!
32 12:37:38 757 00:00:00:00:00:03 -> MAC frame not for me, drop!
33 12:37:38 757 00:00:00:00:00:00 -> gets PKT 1s ACK from
00:00:00:00:00:01. One COMM Suc
34 12:37:38 882 00:00:00:00:00:02 -> channel idled for DIFS and
5.000000 slots time
35 12:37:38 882 00:00:00:00:00:02 -> csmaca mac, finish sending
36 12:37:38 882 00:00:00:00:00:02 -> sent PKT 1 to 00:00:00:00:00:00,
no ACK yet
37 12:37:38 885 00:00:00:00:00:03 -> interrupted at slot time
5.861168
38 12:37:38 885 00:00:00:00:00:03 -> channel busy
39 12:37:38 893 00:00:00:00:00:00 -> receives PKT 1 from
00:00:00:00:00:02, CRC right
40 12:37:38 894 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 1.000000 remaining slots
41 12:37:38 895 00:00:00:00:00:03 -> MAC frame not for me, drop!
42 12:37:38 895 00:00:00:00:00:01 -> MAC frame not for me, drop!
43 12:37:38 894 00:00:00:00:00:00 -> channel idle now, wait for SIFS
only
44 12:37:38 897 00:00:00:00:00:00 -> channel idled for SIFS
45 12:37:38 897 00:00:00:00:00:00 -> sending PKT 1s ACK to
00:00:00:00:00:02
46 12:37:38 899 00:00:00:00:00:00 -> csmaca mac, finish sending
47 12:37:38 899 00:00:00:00:00:00 -> finish sending PKT 1s ACK to
00:00:00:00:00:02
48 12:37:38 899 00:00:00:00:00:03 -> interrupted in DIFS, time
elapsed 0.005637
49 12:37:38 900 00:00:00:00:00:03 -> channel busy
29
50 12:37:38 905 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 1.000000 remaining slots
51 12:37:38 905 00:00:00:00:00:01 -> MAC frame not for me, drop!
52 12:37:38 905 00:00:00:00:00:02 -> gets PKT 1s ACK from
00:00:00:00:00:00. One COMM Suc
53 12:37:38 905 00:00:00:00:00:03 -> MAC frame not for me, drop!
54 12:37:39 10 00:00:00:00:00:03 -> channel idled for DIFS and
1.000000 slots time
55 12:37:39 11 00:00:00:00:00:03 -> csmaca mac, finish sending
56 12:37:39 11 00:00:00:00:00:03 -> sent PKT 1 to 00:00:00:00:00:01,
no ACK yet
57 12:37:39 22 00:00:00:00:00:01 -> receives PKT 1 from
00:00:00:00:00:03, CRC right
58 12:37:39 22 00:00:00:00:00:01 -> channel busy
59 12:37:39 23 00:00:00:00:00:01 -> channel idle now, wait for SIFS
and 0.000000 remaining slots
60 12:37:39 22 00:00:00:00:00:02 -> MAC frame not for me, drop!
61 12:37:39 22 00:00:00:00:00:00 -> MAC frame not for me, drop!
62 12:37:39 24 00:00:00:00:00:01 -> channel idled for SIFS and
0.000000 slots time
63 12:37:39 24 00:00:00:00:00:01 -> sending PKT 1s ACK to
00:00:00:00:00:03
64 12:37:39 28 00:00:00:00:00:01 -> csmaca mac, finish sending
65 12:37:39 28 00:00:00:00:00:01 -> finish sending PKT 1s ACK to
00:00:00:00:00:03
66 12:37:39 33 00:00:00:00:00:00 -> MAC frame not for me, drop!
67 12:37:39 33 00:00:00:00:00:02 -> MAC frame not for me, drop!
68 12:37:39 33 00:00:00:00:00:03 -> gets PKT 1s ACK from
00:00:00:00:00:01. One COMM Suc
->
->
->
->
->
is ready to
is ready to
is ready to
is ready to
uplayer PKT
30
14 12:09:43 231 00:00:00:00:00:02 -> channel idle now, wait for DIFS
and 0.000000 remaining slots
15 12:09:43 232 00:00:00:00:00:02 -> MAC frame not for me, drop!
16 12:09:43 233 00:00:00:00:00:03 -> MAC frame not for me, drop!
17 12:09:43 233 00:00:00:00:00:01 -> receives PKT 1 from
00:00:00:00:00:00, CRC right
18 12:09:43 235 00:00:00:00:00:03 -> uplayer PKT arrived, contention
window size is 7
19 12:09:43 235 00:00:00:00:00:03 -> channel idle now, wait for DIFS
only
20 12:09:43 234 00:00:00:00:00:01 -> channel idle now, wait for SIFS
only
21 12:09:43 237 00:00:00:00:00:01 -> channel idled for SIFS
22 12:09:43 238 00:00:00:00:00:01 -> sending PKT 1s ACK to
00:00:00:00:00:00
23 12:09:43 241 00:00:00:00:00:01 -> csmaca mac, finish sending
24 12:09:43 242 00:00:00:00:00:03 -> interrupted in DIFS, time
elapsed 0.007183
25 12:09:43 242 00:00:00:00:00:03 -> channel busy
26 12:09:43 243 00:00:00:00:00:02 -> interrupted in DIFS, time
elapsed 0.011427
27 12:09:43 243 00:00:00:00:00:02 -> channel busy
28 12:09:43 241 00:00:00:00:00:01 -> finish sending PKT 1s ACK to
00:00:00:00:00:00
29 12:09:43 246 00:00:00:00:00:03 -> MAC frame not for me, drop!
30 12:09:43 246 00:00:00:00:00:00 -> gets PKT 1s ACK from
00:00:00:00:00:01. One COMM Suc
31 12:09:43 246 00:00:00:00:00:02 -> channel idle now, wait for DIFS
and 0.000000 remaining slots
32 12:09:43 247 00:00:00:00:00:02 -> MAC frame not for me, drop!
33 12:09:43 248 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 2.000000 remaining slots
34 12:09:43 347 00:00:00:00:00:02 -> channel idled for DIFS and
0.000000 slots time
35 12:09:43 347 00:00:00:00:00:02 -> csmaca mac, finish sending
36 12:09:43 347 00:00:00:00:00:02 -> sent PKT 1 to 00:00:00:00:00:00,
no ACK yet
37 12:09:43 351 00:00:00:00:00:03 -> interrupted at slot time
0.676994
38 12:09:43 351 00:00:00:00:00:03 -> channel busy
39 12:09:43 359 00:00:00:00:00:03 -> channel idle now, wait for DIFS
and 2.000000 remaining slots
40 12:09:43 469 00:00:00:00:00:03 -> channel idled for DIFS and
2.000000 slots time
41 12:09:43 469 00:00:00:00:00:03 -> csmaca mac, finish sending
42 12:09:43 469 00:00:00:00:00:03 -> sent PKT 1 to 00:00:00:00:00:01,
no ACK yet
43 12:09:45 347 00:00:00:00:00:02 -> timer expire, re-transmits PKT 1
44 12:09:45 347 00:00:00:00:00:02 -> uplayer PKT arrived, contention
window size is 14
45 12:09:45 348 00:00:00:00:00:02 -> channel idle now, wait for DIFS
and 9.000000 remaining slots
46 12:09:45 469 00:00:00:00:00:03 -> timer expire, re-transmits PKT 1
31
32
is ready to
is ready to
is ready to
is ready to
uplayer PKT
33
34
35
36
63 14:01:55 273 00:00:00:00:00:01 -> MAC frame not for me, drop!
64 14:01:55 272 00:00:00:00:00:02 -> gets PKT 1s ACK from
00:00:00:00:00:00. One COMM Suc
65 14:01:55 274 00:00:00:00:00:03 -> MAC frame not for me, drop!
37
38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
39
40
71 15:11:12 668 00:00:00:00:00:03 -> channel idle now, wait for SIFS
only
72 15:11:12 669 00:00:00:00:00:03 -> channel idled for SIFS
73 15:11:12 669 00:00:00:00:00:03 -> sending PKT 1s ACK to
00:00:00:00:00:01
74 15:11:12 672 00:00:00:00:00:03 -> csmaca mac, finish sending
75 15:11:12 672 00:00:00:00:00:03 -> finish sending PKT 1s ACK to
00:00:00:00:00:01
76 15:11:12 677 00:00:00:00:00:02 -> MAC frame not for me, drop!
77 15:11:12 677 00:00:00:00:00:00 -> MAC frame not for me, drop!
78 15:11:12 678 00:00:00:00:00:01 -> gets PKT 1s ACK from
00:00:00:00:00:03. One COMM Suc
41