[SOLVED] Problem with EDCA patch of 802.11e for ns2.35
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
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
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.
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?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.