LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2015, 05:12 PM   #1
Kaucaze
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Rep: Reputation: Disabled
Problem with EDCA patch of 802.11e for ns2.35


Hello, I started to use ns2.35 recently with Cygwin Terminal 1.7.35 under a virtual machine Windows XP Pro Service Pack 3. I'm having a problem when trying to apply a EDCA patch of 802.11e.

First i tried the oficial patch (intended for ns2.28), then i found a later version of EDCA:
Ref. post #18 here: http://www.linuxquestions.org/questi...245/page2.html

I also tried to apply the patch for ns-2.35
Ref. post #70 here: http://www.linuxquestions.org/questi...928/page5.html


After I made the changes in the files and running the following commands (as said by the 'README.txt' inside the patch)
./configure; make clean; make depend; make

I got the message:
Code:
g++ -c -O2 -Wall -Wno-write-strings  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_14 -DHAVE_OTCL_H -DHAVE_LIBTK8_5 -DHAVE_TK_H -DHAVE_LIBTCL8_5 -DHAVE_TCLINT_H -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test  -I. -I. -I/home/Administrator/ns-allinone-2.35/tclcl-1.20 -I/home/Administrator/ns-allinone-2.35/otcl -I/home/Administrator/ns-allinone-2.35/include -I/home/Administrator/ns-allinone-2.35/include -I/home/Administrator/ns-allinone-2.35/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -I./mac/802_11e -o mac/802_11e/mac-802_11e.o mac/802_11e/mac-802_11e.cc
mac/802_11e/mac-802_11e.cc:41:20: fatal error: stream.h: No such file or directory
 #include "stream.h"
                    ^
compilation terminated.
Makefile:93: recipe for target 'mac/802_11e/mac-802_11e.o' failed
make: *** [mac/802_11e/mac-802_11e.o] Error 1
Also, the ns command (which was working before the patch) now shows me an error:
Code:
bash: ns: command not found
I've searched the ns directory and the ns executable there is no more.


Do you have any ideia how to correct this?

Thank you in advance.
 
Old 03-27-2015, 05:02 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,310

Rep: Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173
Welcome to LQ.

Please use the patch `802.11e-EDCA-ns235_091814.patch' for ns235.
https://drive.google.com/file/d/0B7S...ew?usp=sharing
EDIT :
Must be 802.11e-EDCA_ns235_2015-gcc49.patch , see post #5.


-

Last edited by knudfl; 03-29-2015 at 07:34 PM.
 
Old 03-27-2015, 08:04 PM   #3
Kaucaze
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you for your reply.

I've researched for similar threads in the forum and decided to download an Linux OS.

I downloaded 'Ubuntu 14.04.02-desktop-i386' and installed the 'ns-allinone-2.35_gcc491.tar.gz' according to this post
Ref. post #2 here: http://www.linuxquestions.org/questi...-a-4175537890/

Then I applied the patch you provided '802.11e-EDCA-ns235_091814.patch' but, when I try to run:
$ns multi_udpflows.tcl

I got the following mesage:
Code:
num_nodes is set 5
wired node 0 created
wired node 1 created
wired node 2 created
invalid command name "Mac/802_11e"
    while executing
"Mac/802_11e create _o54 "
    invoked from within
"catch "$className create $o $args" msg"
    invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
    (procedure "new" line 3)
    invoked from within
"new $mactype"
    (procedure "_o44" line 10)
    (Node/MobileNode add-interface line 10)
    invoked from within
"$node add-interface $chan $propInstance_ $llType_ $macType_  $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_  $inerrProc_ $outerrProc_ $FECProc_"
    (procedure "_o3" line 83)
    (Simulator create-wireless-node line 83)
    invoked from within
"_o3 create-wireless-node 1.0.0"
    ("eval" body line 1)
    invoked from within
"eval $self create-wireless-node $args"
    (procedure "_o3" line 23)
    (Simulator node line 23)
    invoked from within
"$ns node 1.0.0"
    invoked from within
"set BS(0) [$ns node 1.0.0]"
    (file "multi_udpflows.tcl" line 92)
I also tried the commands:
$ cp ns ns235-EDCA
$ sudo cp ns235-EDCA /usr/local/bin/
$ ns235-EDCA multi_udpflows.tcl

Like suggested in this post:
Ref. post #70 here:http://www.linuxquestions.org/questi...928/page5.html

Also, I made a copy of 'multi_udpflows.tcl' file into a different directory , but i got the same error message in all the tries.

Do you have any suggestions?
 
Old 03-29-2015, 07:04 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,310

Rep: Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173
Ref. post #3.

Any errors with applying the patch ?
The ns-allinone-2.35_gcc491 (Dec 2014 update) is more complex than the old ns235:
The three ns236 Codel patches are added.

Better use ns-allinone-2.35_gcc482.tar.gz (Nov 2014 update),
which is only modified to use all gcc-4.4 .... gcc-4.9.2 :
https://drive.google.com/file/d/0B7S...ew?usp=sharing
* Please keep your current ns-allinone-2.35(_gcc491) :
I.e. you can have as many ns-allinone-2.xx as you want,
installed at the same time. But do never add any *PATH text to .bashrc.

Testing :
Code:
$ ns235-EDCA multi_udpflows.tcl
num_nodes is set 5
wired node 0 created
wired node 1 created
wired node 2 created
INITIALIZE THE LIST xListHead
Base-Station node 3 created
wireless node 0 created ...
wireless node 1 created ...
wireless node 2 created ...
wireless node 3 created ...
warning: Route to base_stn not known: dropping pkt
.
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
.
warning: Route to base_stn not known: dropping pkt
.
now 4096.01141225 Mac: 2 BackoffTimer::handle but no priority matches ?! stime_[0] 4096.01124225 rtime_[0] 120.00 AIFSwait_[0] 50.00
... The file `out.tr', 814.7 MB is created.


-

Last edited by knudfl; 03-29-2015 at 07:11 PM.
 
Old 03-29-2015, 07:33 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,310

Rep: Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173
Sorry, wrong patch.
Please use the new update, 802.11e-EDCA_ns235_2015-gcc49.patch

Link https://drive.google.com/file/d/0B7S...ew?usp=sharing
 
Old 03-30-2015, 07:42 PM   #6
Kaucaze
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Ok, I tried the 'ns-allinone-2.35_gcc482.tar.gz' with the new update '802.11e-EDCA_ns235_2015-gcc49.patch' but I got the same error described in Ref. post #3.

I started to search and found that the MAC type inside the 'multi_udpflows.tcl' file is setted:

set opt(mac) Mac/802_11e

And the 'Mac/802_11e' class settings inside the 'ns-mac.tcl' file are quite smiliar to 'Mac/802_11' class settings (the difference lies in the CFB disabling).
So I added the CFB disabling function to 'Mac/802_11' class settings and deleted the 'e' in the MAC type in 'multi_udpflows.tcl' file, turning it to:

set opt(mac) Mac/802_11

Then i got a new error:
Code:
num_nodes is set 5
wired node 0 created
wired node 1 created
wired node 2 created
invalid command name "Queue/DTail/PriQ"
    while executing
"Queue/DTail/PriQ create _o55 "
    invoked from within
"catch "$className create $o $args" msg"
    invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
    (procedure "new" line 3)
    invoked from within
"new $qtype"
    (procedure "_o44" line 11)
    (Node/MobileNode add-interface line 11)
    invoked from within
"$node add-interface $chan $propInstance_ $llType_ $macType_  $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_  $inerrProc_ $outerrProc_ $FECProc_"
    (procedure "_o3" line 83)
    (Simulator create-wireless-node line 83)
    invoked from within
"_o3 create-wireless-node 1.0.0"
    ("eval" body line 1)
    invoked from within
"eval $self create-wireless-node $args"
    (procedure "_o3" line 23)
    (Simulator node line 23)
    invoked from within
"$ns node 1.0.0"
    invoked from within
"set BS(0) [$ns node 1.0.0]"
    (file "multi_udpflows.tcl" line 92)
Again I searched for the "Queue/DTail/PriQ" command and I decided to make the following modifications:

Replace all occurrences of "Queue/DTail" by "Queue/DropTail" and "Queue/DTail/PriQ" by "Queue/DropTail/PriQueue" in both 'ns-default.tcl' and 'multi_udpflows.tcl' files.

Finally, in response to the '$ns multi_udpflows.tcl' command i got the mesage:
Code:
num_nodes is set 5
wired node 0 created
wired node 1 created
wired node 2 created
INITIALIZE THE LIST xListHead
Base-Station node 3 created
wireless node 0 created ...
wireless node 1 created ...
wireless node 2 created ...
wireless node 3 created ...
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
warning: Route to base_stn not known: dropping pkt
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
.
NS EXITING...
Well, the 'out.tr' file created has 1.9GB. And i'm still trying to find out why the MAC type and Interface Queue type commands were not recognized.

Last edited by Kaucaze; 03-30-2015 at 07:44 PM.
 
Old 05-01-2015, 01:23 PM   #7
Kaucaze
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Since the last time i posted, all my simulations have been giving strange results.I think maybe i did something wrong when applying the patch.
Are these steps correct?

$ cd ns-allinone-2.35/
$ patch -p0 < 802.11e-EDCA_ns235_2015-gcc49.patch
$ export CC=gcc-4.4 CXX=g++41 && ./install
$ cp ns ns235-EDCA
$ sudo cp ns235-EDCA /usr/local/bin/
 
Old 05-01-2015, 04:22 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,310

Rep: Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173
Re #7 : The new patch can probably use all gcc-4.4, gcc-4.6 ...gcc-5.1.1 .

$ tar xvf ns-allinone-2.35_gcc482.tar.gz
$ cd ns-allinone-2.35/
$ patch -p0 < 802.11e-EDCA_ns235_2015-gcc49.patch
$ ./install

No issues running multi_udpflows.tcl, any g++ version used ...
[g++41] : $ ns235-EDCA-g++41 multi_udpflows.tcl
[g++-4.4] : $ ns235-edca-g++44 multi_udpflows.tcl
[g++-4.9] : $ ns235-edca-g++49 multi_udpflows.tcl
... All OK. Exactly 814.7 MB out.tr`s are created.

-

Last edited by knudfl; 05-01-2015 at 08:21 PM.
 
Old 05-01-2015, 06:22 PM   #9
Kaucaze
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Smile

Ok, I think at some point I missed that "./install" command after applying the patch. Now it is working how it's supposed to be.

knudfl, thank you very much for your help!

Here are the the steps I made in case of someone in the future get the same errors that i did:

$ sudo apt-get update && sudo apt-get install g++ automake libtool libxmu-dev xgraph
$ tar xvf ns-allinone-2.35_gcc482.tar.gz
$ cd ns-allinone-2.35/
$ ./install
$ cd ns-2.35/
$ sudo make install
$ cd ../nam-1.15/
$ sudo make install
$ cd ..
$ patch -p0 < 802.11e-EDCA_ns235_2015-gcc49.patch
$ ./install
$ cd ns-2.35/
$ cp ns ns235-edca
$ sudo cp ns235-edca /usr/local/bin/
$ ns235-edca multi_udpflows.tcl

Regards!
 
Old 05-01-2015, 08:28 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,310

Rep: Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173
Re #9.
Quote:
$ cd ns-allinone-2.35/
$ ./install
.
.
$ patch -p0 < 802.11e-EDCA_ns235_2015-gcc49.patch
$ ./install
Twice ./install isnt' required. Read post #8.

-
 
Old 05-08-2015, 12:23 PM   #11
Kaucaze
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you for your reply, knudfl.
I have one more question related to the EDCA:

In my simulations scenarios, I need to analyse nodes with different contention windows. For instance, node(0) with CWMin=7 CWMax=15 and node(1) with CWMin=15 CWMax=31.
How can I do that inside the tcl file?

All examples I have found show how to change the CW for all the nodes. And the examples that are supposed to change it individually do not work.
I tried two different methods:

1)Add to /* Mac Class Function */
Code:
Mac802_11::Mac802_11(PHY_MIB *p, MAC_MIB *m) : ....
{
        bind("DSSS_CWMin", &p->CWMin); // as well for CW_Max
        .
        .
        cw_ = phymib_->CWMin;
}
Then use in the tcl file:
Code:
Mac/802_11 set DSSS_CWMin 31
2)Add to the 'Mac802_11::command' function after the if statement:
Code:
else if (argc == 4) {
	if(strcmp(argv[1], "set-cw-params") == 0) {
		phymib_->CWMin = atoi(argv[2]);
		phymib_->CWMax = atoi(argv[3]);
		return TCL_OK;
	}
}
Then use this in the tcl script:
Code:
[$node_(0) set mac_(0)] set-cw-params 7 15
[$node_(1) set mac_(0)] set-cw-params 15 31
But both of them do not work.
 
Old 05-08-2015, 04:11 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,310

Rep: Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173Reputation: 3173
Re #11.

Ns-2 code : Please ask at Stackoverflow :
https://stackoverflow.com/questions/tagged/ns2
 
  


Reply

Tags
edca, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile problem while installing EDCA patch of 802.11e bilalcisco Linux - Newbie 7 10-04-2014 11:11 AM
seeking advice to install 802.11e patch in ns2 stud17 Linux - Newbie 48 11-04-2012 10:09 AM
which ns2 version is compatible for TKN 802.11e patch stud17 Linux - Newbie 8 03-18-2012 11:12 AM
need 802.11e patch for ns2 stud17 Linux - Software 1 03-09-2011 06:54 AM
ns2-802.11e patch - error: stream.h, iostream.h not found shojaru Linux - Newbie 3 06-12-2009 11:11 PM


All times are GMT -5. The time now is 03:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration