Sie sind auf Seite 1von 6

Cognitive Radio Cognitive Network (CRCN) Simulator installation in Linux

Cognitive Radio Cognitive Networks(CRCN) Simulator is based on ns2 Simulator. This post mainly explains in detail the steps needed to run CRCN simulations in your system.

Note: The installation is successful only in version 2.31 of ns (ns-allinone-2.31)

Step 1: Download CRCN from <Code Here> and ns-allinone-2.31 from <Here>

Step 2: IMPORTANT: backup your ns-allinone-2.31 folder before proceeding. This is will help us to restore the working ns2 installation in case anything unexpected occurs.

Step 3: After installing the NS 2.31, Extract CRCN.zip and you will see several files inside that. You have to copy each file in that and replace the corresponding files in ns2.31 folder.

Step 3 is explained more detailed manner:

If you have a folder named AODV in crcn. Copy all its contents and paste it in /home/Hema/ns-allinone2.31/ns-2.31/aodv folder. Note: Here Hema is my username, replace it with your username.

You would be replacing the existing aodv folder contents with the new one you copied from CRCN folder. Leave rest of the files unmodified. Similarly, you will have folders named common, mac, mobile and so on. Repeat Step 3 for all these folders.

Step4: Finally, you will be left with some tcl and perl scripts inside the CRCN folder. Just copy them and place them in any folder, preferably /home/Hema/ns-allinone-2.31/ns-2.31.

Step5: Open Makefile of /home/Hema/ns-allinone-2.31/ns-2.31 in root user mode.

Note: instead of making changes in Makefile directly, you can make changes in Makefile.in and run ./configure command to generate the Makefile. This method is more simple and helpful, when you will add new protocol files into your simulator. Code: $ su # gedit /home/Hema/ns-allinone-2.31/ns-2.31/Makefile

Here gedit editor is used; replace it with the editor of your preference.

Step6: In the Makefile, find the line that says OBJ_CC = \

Step7: Copy the following lines and append it to OBJ_CC listing as shown in the figure bellow. wcett/wcett_logs.o wcett/wcett.o \ wcett/wcett_rtable.o wcett/wcett_rqueue.o \ mac/macng.o mac/maccon.o\ mac/macngenhanced.o\

Fig 1: CRCN Cod Save and close the Makefile.

Step8: Next execute the following commands in Terminal. make clean make depend make

If any error message experienced, fix them and run the above commands again. If each of these commands runs without any error, then CRCN installation is successful.

There is also a GUI available for CRCN simulation. Users can also use the CRCN NS2 components without using the GUI. For GUI requires some dependencies/per-requisites. To Install the GUI, please refer the following link.

CRCN Manual: http://stuweb.ee.mtu.edu/~ljialian/ Source Links: http://stuweb.ee.mtu.edu/~ljialian/installation.htm http://getch.wordpress.com/2010/12/30/cognitive-radio-network-simulator-installation/

COMMENTS: 1. blackgorilWednesday, December 12, 2012 11:28:00 pm Hi there, i am using ns-allinone-2.35, there is any compatibility problem with crcn?? Thanks. Reply Replies 1. Hema YarnagulaThursday, December 20, 2012 11:54:00 am Hi, CRCN have been tested in ns-2.31 under Linux environment. so i suggest you to go with ns-2.31.. Reply 2. jaiFriday, January 04, 2013 11:48:00 am can u please give me some basic codes to implement cr on ns2.. my project work is to improve the throughput of the cr .. Reply Replies 1.

Hema YarnagulaSaturday, January 05, 2013 11:55:00 am Hi, Once you patch your ns 2.31 with the CRCN patch, you will get few example code for CR implementation. Few basic CR MAC protocol examples are also included in CRCN as well named as "maccon", "macng" and "macngenhanced" etc... You can dip into the code to understand CR implementation. for more info you can refer this link http://stuweb.ee.mtu.edu/~ljialian/ Thank you..!! 2. Ravikiran BhonagiriFriday, April 26, 2013 11:00:00 am This comment has been removed by the author. Reply 3. AnonymousFriday, March 15, 2013 5:02:00 pm While patching the Makefile: mac/macng.o mac/maccon.o\ mac/macngenhanced.o\ The above two lines doesnt give any gap between .o and \ is it correct, does it work for you!? Reply Replies 1. Hema K YarnagulaSaturday, March 16, 2013 10:15:00 pm Hi, with out a gap it works for me.

Even if i allow a gap between .o and \ then also, it works fine. Thank you..!! Reply 4. Ravikiran BhonagiriFriday, April 26, 2013 11:01:00 am sir, where can i get detailed tutorials for ns-2, i am getting much errors while simulating..i am very new to this tool...all i know till now is through browsing net.Is there any GUI tool that creates topology file many doubts just bubbling in my mind...can you please help in this..... Regards Ravikiran Bhonagiri Reply Replies 1. Hema K YarnagulaMonday, April 29, 2013 11:18:00 pm Hi Ravi, The are lot of resources on the wen for NS-2. Any way, i suggest the Book titled "Introduction to Network Simulator NS2". please find more details about the book using bellow link. It is a good book with all the things explained nicely. http://www.amazon.com/Introduction-Network-Simulator-Teerawat-Issariyakul/dp/1441944125 Try to find the E-copy of the book on the web. There might be some GUI tools, i have no knowledge about them, but you can generate the required topology by using a command called.. "Setdest" available in NS utility tools.

Das könnte Ihnen auch gefallen