Cognitive Radio Network Simulator(CRCN) installation

Cognitive Radio Cognitive Networks(CRCN) Simulator is based on ns2 simulator. In this post I would explain in detail the steps needed to run CRCN simulations in your Linux.

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

Step 1: Download CRCN from <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: Extract 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.

Let me explain this in more detail.

If you have a folder named AODV in crcn. Copy all its contents and paste it in /home/micman/ns-allinone-2.31/ns-2.31/aodv folder.

Here micman 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. Leave rest of the files unmodified.

Similarly, you will have folders named common,mac, mobile and so on. Repeat Step2 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/micman/ns-allinone-2.31/ns-2.31

Step5: Open Makefile in root user mode

$ su

# gedit /home/micman/ns-allinone-2.31/ns-2.31/Makefile

Here I have used gedit editor. replace it with the editor of your choice.

Step6: In the Makefile, find the line that says

OBJ_CC = \

In my system it is at line 164.

Step7: Copy the following lines and append it to OBJ_CC listing as shown

wcett/wcett_logs.o wcett/wcett.o \
wcett/wcett_rtable.o wcett/wcett_rqueue.o \
mac/macng.o mac/maccon.o\

Save and close the Makefile.

Step8: Next execute the following commands in Terminal.

make clean
make depend

If each of these commands run without any error, then crcn installation is successful.

Errors were experienced in other versions of ns2.

There is also a GUI available for CRCN simulation. Its just a jar file that just needs to be executed. All you need to do is to run it straightaway, but before that it has some dependencies/pre-requisites:

* JDK 6 or later versions should have been installed. [Download Java JDK]

* Gnuplot should have been installed. [Download Gnuplot]

Ubuntu10.10 users could install it easily by executing the following line in Terminal.

$sudo apt-get install gnuplot

* Download <this> perl script and place it in /home/micman/ns-allinone-2.31/ns-2.31/

Here micman is my username

* Finally Download <this> jar file.

The jar file could be executed as follows:

$ java -jar CRCN.jar

For more help on how to use the CRCN GUI go <here>

3 thoughts to “Cognitive Radio Network Simulator(CRCN) installation”

Leave a Reply

Your email address will not be published. Required fields are marked *