Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1363)

Issue 319050043: ns-3 Wi-Fi frame capture

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 3 months ago by Tom Henderson
Modified:
7 years, 1 month ago
Reviewers:
cb3974, S. Deronne
Visibility:
Public.

Description

ns-3 Wi-Fi frame capture See: https://www.nsnam.org/bugzilla/show_bug.cgi?id=2368

Patch Set 1 #

Patch Set 2 : Update to 2017-01-05 patch #

Total comments: 64

Patch Set 3 : frame-capture-patch-v3 #

Total comments: 17

Patch Set 4 : frame-capture-patch-v4 #

Total comments: 18

Patch Set 5 : frame-capture-patch v5 #

Total comments: 18
Unified diffs Side-by-side diffs Delta from patch set Stats (+773 lines, -87 lines) Patch
A src/wifi/examples/frame-capture-model-validation.cc View 1 2 3 1 chunk +77 lines, -0 lines 2 comments Download
M src/wifi/examples/test-interference-helper.cc View 1 2 3 4 9 chunks +167 lines, -8 lines 10 comments Download
M src/wifi/examples/wscript View 1 2 2 chunks +6 lines, -1 line 0 comments Download
A src/wifi/model/frame-capture-model.h View 1 2 1 chunk +72 lines, -0 lines 0 comments Download
A src/wifi/model/frame-capture-model.cc View 1 2 3 1 chunk +106 lines, -0 lines 0 comments Download
M src/wifi/model/interference-helper.h View 1 2 3 4 6 chunks +34 lines, -3 lines 0 comments Download
M src/wifi/model/interference-helper.cc View 1 2 3 4 6 chunks +65 lines, -11 lines 0 comments Download
M src/wifi/model/wifi-phy.h View 1 2 3 4 17 chunks +78 lines, -23 lines 0 comments Download
M src/wifi/model/wifi-phy.cc View 1 2 3 4 19 chunks +153 lines, -40 lines 4 comments Download
M src/wifi/model/wifi-phy-state-helper.h View 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M src/wifi/model/wifi-phy-state-helper.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 2 comments Download
M src/wifi/wscript View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16
Tom Henderson
Is there any test data to support the implementation? The test program 'test-interference-helper' is a ...
7 years, 3 months ago (2017-01-05 15:32:22 UTC) #1
S. Deronne
I had a first look, I'll go deeper this weekend. My main concern is that ...
7 years, 3 months ago (2017-01-05 21:30:56 UTC) #2
S. Deronne
Looks already in good shape in general, please take care about coding style rules, we ...
7 years, 3 months ago (2017-01-07 08:31:49 UTC) #3
cb3974
I will update the patches soon. https://codereview.appspot.com/319050043/diff/20001/src/wifi/examples/test-interference-helper.cc File src/wifi/examples/test-interference-helper.cc (right): https://codereview.appspot.com/319050043/diff/20001/src/wifi/examples/test-interference-helper.cc#newcode56 src/wifi/examples/test-interference-helper.cc:56: #include "ns3/nist-error-rate-model.h" On ...
7 years, 3 months ago (2017-01-11 16:36:05 UTC) #4
cb3974
I will update the patches soon.
7 years, 3 months ago (2017-01-11 16:36:11 UTC) #5
S. Deronne
https://codereview.appspot.com/319050043/diff/20001/src/wifi/examples/test-interference-helper.cc File src/wifi/examples/test-interference-helper.cc (right): https://codereview.appspot.com/319050043/diff/20001/src/wifi/examples/test-interference-helper.cc#newcode56 src/wifi/examples/test-interference-helper.cc:56: #include "ns3/nist-error-rate-model.h" On 2017/01/11 16:36:03, cb3974 wrote: > On ...
7 years, 3 months ago (2017-01-13 19:25:53 UTC) #6
S. Deronne
Thanks for the updated patch. Few general comments: - missing example to show frame capture ...
7 years, 2 months ago (2017-01-27 22:11:11 UTC) #7
cb3974
I have updated the patch and now no regression tests fail. However, I have introduced ...
7 years, 2 months ago (2017-01-28 00:06:19 UTC) #8
Tom Henderson
https://codereview.appspot.com/319050043/diff/60001/src/wifi/model/frame-capture-model.cc File src/wifi/model/frame-capture-model.cc (right): https://codereview.appspot.com/319050043/diff/60001/src/wifi/model/frame-capture-model.cc#newcode31 src/wifi/model/frame-capture-model.cc:31: // ns-3 NIST model to decode a OFDM 6 ...
7 years, 2 months ago (2017-01-29 17:35:35 UTC) #9
cb3974
I am sorry that I could not reply early. I am traveling these days. I ...
7 years, 2 months ago (2017-01-30 17:26:25 UTC) #10
cb3974
I have made a few changes to the patches according to Tom's comments. What I ...
7 years, 2 months ago (2017-02-05 01:30:46 UTC) #11
S. Deronne
https://codereview.appspot.com/319050043/diff/60001/src/wifi/model/wifi-phy-state-helper.cc File src/wifi/model/wifi-phy-state-helper.cc (right): https://codereview.appspot.com/319050043/diff/60001/src/wifi/model/wifi-phy-state-helper.cc#newcode550 src/wifi/model/wifi-phy-state-helper.cc:550: NotifyRxEndError (); I am also wondering why is this ...
7 years, 2 months ago (2017-02-05 12:47:48 UTC) #12
S. Deronne
Thanks for this update. My main concern unfortunately remains: frame capture model is not generic ...
7 years, 1 month ago (2017-02-20 21:42:18 UTC) #13
S. Deronne
https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/frame-capture-model-validation.cc File src/wifi/examples/frame-capture-model-validation.cc (right): https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/frame-capture-model-validation.cc#newcode45 src/wifi/examples/frame-capture-model-validation.cc:45: I suggest to draw both curves on the same ...
7 years, 1 month ago (2017-02-20 21:42:26 UTC) #14
S. Deronne
I am indeed testing the example and it is totally not intuitive and we cannot ...
7 years, 1 month ago (2017-02-21 19:18:09 UTC) #15
cb3974
7 years, 1 month ago (2017-02-22 01:38:55 UTC) #16
https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/frame-c...
File src/wifi/examples/frame-capture-model-validation.cc (right):

https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/frame-c...
src/wifi/examples/frame-capture-model-validation.cc:45: 
On 2017/02/20 21:42:25, S. Deronne wrote:
> I suggest to draw both curves on the same plot

Let me try to draw two curves on the same plot

https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/test-in...
File src/wifi/examples/test-interference-helper.cc (right):

https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/test-in...
src/wifi/examples/test-interference-helper.cc:62: #define PAYLOAD_CAPTURE_TEST 4
On 2017/02/20 21:42:25, S. Deronne wrote:
> not sure this is needed, a better approach should be envisioned (see comments
> below)

The reason explained below

https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/test-in...
src/wifi/examples/test-interference-helper.cc:87: int numSentPackets;
On 2017/02/20 21:42:25, S. Deronne wrote:
> what is the need for this numSentPackets?

The reason explained blow.

https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/test-in...
src/wifi/examples/test-interference-helper.cc:299: {
On 2017/02/20 21:42:25, S. Deronne wrote:
> Below should be reworked, I think we can live with a single experiment, and
> based on parameters it will perform what we expect.

Let us explain how I thought about this example. There are four packet collision
situations. 

1) The first packet and the second packet collide at the preamble portion of the
first packet. In this case, firstly we want to know at which point the first
packet can still be received even with the presence of the second packet. To
show this, what I did is to in the following example (PREAMBLE RECOVERY case) is
to send two packets each time. The second packet is delayed by 10 us. Such that
two packets collide at the preamble portion of the packet. Then repeat this
experiment for many times. The reason I did so is that the model we used was a
probability model and from 1000 packets the user can count how many the first
sent packets are successfully received, then calculate a probability for this
configuration. Then I gradually increase the tx power of the first packet,
therefore, the SINR of the first packet increases as well. Then the test is
repeated for different SINR. The poweGap here is to gradually increase the SINR.
Then at the end of the test, for each SINR value, the user may have a receiving
probability for that SINR value. The user can compare the probability with the
existing reference to see if the output matches. 

2) A similar configuration as previous one, but this time we want to see when
the second packet can be captured. So this time instead of increasing the tx
power of the first packet, I increase the tx power of the second packet.
Similarly each time two packets are used to create the collision situation but
such experiment is repeated many times (1000 times) for a given SINR value.
Therefore, the user can also reproduce the probability v.s. SINR curve for this
test and compare the curve with our reference. 

3) and 4) are for packet recovery and packet capture for payload part. 

Therefore, I designed to use four cases and for each case repeat the experiment
1000 times in order to obtain a statistical probability for that given
situation.

https://codereview.appspot.com/319050043/diff/80001/src/wifi/examples/test-in...
src/wifi/examples/test-interference-helper.cc:379: input.numSentPackets = 1000;
On 2017/02/20 21:42:25, S. Deronne wrote:
> Why 1000? You say you have 2 packets. Still unclear the purpose of this param.

Two packets are used to create the packet collision. The experiment is repeated
1000 times to obtain a statistical probability for that particular SINR. At the
end of the time, one can generate a probability v.s. SINR curve.

https://codereview.appspot.com/319050043/diff/80001/src/wifi/model/wifi-phy-s...
File src/wifi/model/wifi-phy-state-helper.cc (right):

https://codereview.appspot.com/319050043/diff/80001/src/wifi/model/wifi-phy-s...
src/wifi/model/wifi-phy-state-helper.cc:546: {
On 2017/02/20 21:42:26, S. Deronne wrote:
> I do not see a real need for this, expect for tracing purpose... but I do not
> see any traces here. Please explain why this is there.

DoSwitchFromRx() will change the state from RX to IDLE or CCA_BUSY when
terminating the previous transmission before starting the new one.

https://codereview.appspot.com/319050043/diff/80001/src/wifi/model/wifi-phy.cc
File src/wifi/model/wifi-phy.cc (right):

https://codereview.appspot.com/319050043/diff/80001/src/wifi/model/wifi-phy.c...
src/wifi/model/wifi-phy.cc:2335: || preamble == WIFI_PREAMBLE_NONE)
On 2017/02/20 21:42:26, S. Deronne wrote:
> Why a check on preamble == none?

If the preamble of the new packet is none, it contains no information of
decoding the packet, so I do not think such packet can be captured.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b