LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-04-2014, 12:48 PM   #1
abenmariem
LQ Newbie
 
Registered: Feb 2014
Location: Tunisia
Distribution: Ubuntu
Posts: 29

Rep: Reputation: Disabled
integration of the usherbrooke implementation of 802.11p to ns2.35


Hello,
I am working on ubuntu 13.10 32 bits.
I am trying to integrate the usherbrooke implementation of 802.11p to ns2.35.
The link of the implementation is: http://www.gel.usherbrooke.ca/interl...x.php?page=NS2
After respecting the instructions in the file instructions.txt present in the downloaded archive and when trying to make a simple example to try the 802.11p implementation, i got the error: Mac/802_11p set basicRate_: can't read "basicRate_": no such variable .
It seems like there is a binding error because the class Mac802_11p has a member variable: double basicRate_;
The error is caused by the line bind_bw("dataRate_", &dataRate_); in the constructor Mac802_11p::Mac802_11p()
A snippet of the code in the constructor:
tcl.evalf("Mac/802_11p set dataRate_");
if (strcmp(tcl.result(), "0") != 0)
bind_bw("dataRate_", &dataRate_);
else
dataRate_ = bandwidth_;

I noticed that this same code is used in 802.11 implementation which works well in ns2.
I noticed also that the file ns_tcl.cc contains the line Mac/802_11 set basicRate_ 1Mb and there isn't a line for 802.11P protocol.

Does anyone has an idea to fix this problem ?
If you have better alternatives for 802.11p implementation, your suggestions are welcome.
 
Old 04-05-2014, 08:51 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
IEEE802.11p is already present in ns-2.35/ :
//ns-2.35/tcl/ex/802.11/IEEE802-11p.tcl ,
//ns-2.35/common/packet.h ,
//ns-2.35/mac/{mac-802_11Ext.cc, mac-802_11Ext.h, etc."Ext"} ,
//ns-2.35/tcl/lib/ns-default.tcl .

First thing to do with the "usherbrooke IEEE802.11p.package.zip" :
Make it work in the version it was meant for = ns-2.31 .
And I have had no luck with that so far.

IEEE802.11p was introduced in ns2 with version ns-2.33 .
So I guess that the usherbrooke code was meant to be used in ns2 versions with no 802.11p.

-

Last edited by knudfl; 04-05-2014 at 08:56 AM.
 
Old 04-05-2014, 01:28 PM   #3
abenmariem
LQ Newbie
 
Registered: Feb 2014
Location: Tunisia
Distribution: Ubuntu
Posts: 29

Original Poster
Rep: Reputation: Disabled
thanks

thanks you knudfl,
I know about the integrated version in the ns2.35.
This versions only modifies the parameters of a regular 802.11 mac and phy to make it like 802.11p.
So to support 802.11p you need only to put the default parameters of 802.11p in the file ns_default.tcl.
I thought that the usherbrooke's implementation is more accurate this why i tried to integrate it with ns2.35.
 
Old 04-05-2014, 02:50 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 3 .
Quote:
I thought that the usherbrooke's implementation is more accurate
You may be right in that matter.

I will still suggest that before you try porting the code to ns-2.35,
it would be nice to have it working in ns-2.31 .

About porting the code :
Besides the difference in the ns231 mac and the ns235 mac, etc. code,
also be aware that the code was written when the g++ version was 4.1.2 .
No guaranty that any of g++-4.4 g++-4.6 g++-4.8 etc. versions will work.
( The default Ubuntu 13.10 g++ versions are 4.4, 4.6, 4.7, 4.8 ).

-
 
Old 09-10-2014, 08:57 AM   #5
bikthor
LQ Newbie
 
Registered: Sep 2014
Posts: 1

Rep: Reputation: Disabled
Hello, I'm trying to do the same. I'd like to know if you've been finally able to integrate the usherbrooke's implementation of 802.11p to ns-2.35 and how did you do it.

Thanks a lot in advance
 
Old 09-10-2014, 10:45 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
#5, @bikthor.

The code from "IEEE802.11p.package.zip" is buggy,
and fails in the target = ns-2.31 . ( With g++41 or g++34, etc.)

And : 802.11p is present in all ns-2.33 ... ns-2.35 →
→ Please read post #2.
 
  


Reply



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
how to set transmission range and data rate on 802.11p farfattou Linux - Software 1 01-13-2014 08:42 AM
implementation of UWB via NS2 doussa Linux - Software 3 11-07-2013 02:24 PM
for Leach implementation on ns2.35 sitender Ubuntu 1 03-19-2013 10:39 AM
security implementation in ns2 seetha Linux - Newbie 1 01-28-2012 04:33 AM
Regarding NS2 implementation lalithimral Programming 1 05-03-2011 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 PM.

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
Open Source Consulting | Domain Registration