Cognitive Radio Network Simulator 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 Termninal.

$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>


33 comments on “Cognitive Radio Network Simulator installation

  1. Pingback: hi

  2. Hey Manoj, I see that you are working with CRCN simulator. I have jus started with it. Do you have any example scripts to run for it for the single radio multiple channel configuration. If you find some, pls let me know too

  3. Hi Serene!
    Visit CRCN official site.
    Download the CRCN gui jar file they provide.
    I guess there are some sample scripts bundled into it!

  4. Hello Manoj,

    I did check with the scripts there. I basically want to work with a single radio multi-channel environment but the channelindex_ variable that given in the packet header is not taking any values or the lower layer as they say should support this decision is probably not supporting the decision. Can you help?

    Thanks a lot!

  5. Hi Serene!
    I am sorry to say that apart from installing CRCN, I got no knowledge about it. I learnt the installation part to help out my colleagues who have just started into CRCN.

  6. Oh Thats so good to hear 🙂
    Instead of a thanks you can contribute your findings to the world.
    A small step can make a big change.

  7. LOKESH,
    I have the same problem at step 8, “make depend” error, have you solved it yet? I installed ns2 2.31.

    undefined reference to `hdr_wcett::offset_’
    collect2: ld returned 1 exit status
    make: *** [ns] Error 1

  8. for “make: *** [depend] Error 2″ in ubuntu do the following.

    sudo rm /bin/sh
    sudo ln -s /bin/bash /bin/sh

  9. Hello all im trying to install CRCN. should i first install ns2.31 and then install crcn? can anyone explain plz.

  10. Hi, I am getting same error as LOKESH
    Every version of softwares, (ns-2, jre etc) is as per this pages requirements. yet I am getting error at step 8 when trying “make depend”

  11. hy there!
    I am trying to run makefile but its giving following error. please advice
    Makefile:520: *** commands commence before first target.

  12. i have installed ns 2.31 on ubuntu 10.04 . when I do make depend it gives me this error. Thanks for your help.

    make: *** [depend] Error 2

  13. hey
    thanks for the post

    am having a doubt

    i have download ns2 all in one , but there is no Makefile in it…. though there is and

    as a result am not able to move ahead from step 6 onwards
    this the error i get

    root@susheel-Compaq-Presario-CQ40-Notebook-PC:/home/susheel/Desktop/ns-allinone-2.31/ns-2.31# make
    make: *** No targets specified and no makefile found. Stop.

    please help……..

    am really badly stuck….

    thanks a lot

  14. when i use this command for example ns random.tcl
    i found errors also that is happend with most codes ..
    what is the solution help me plz …

  15. hello,sir
    I’ve installed crcn but there are two problems (i)when i typed in “nam filename.nam” to see the animation file,only the nam console came without any nodes or any do i get proper animation windpw?
    (ii) in crcn gui when i pressed interference button,then just a blank screen comes.what do i do to get it correctly.
    Please help/guid me, sir


  16. while running sample tcl file which is located inside crcn folder ,i am getting error saying that unable to set channel
    but node is setting without any error

  17. when I run ‘make depend’, I get :
    make: *** [depend] Error 1

    A few lines before it are as follows: emulate/ emulate/ emulate/ emulate/ emulate/ emulate/ emulate/ common/ common/ >& /dev/null

    Please help.

  18. Hi naresh
    plz i am having few challenges in CRCN installation on NS-2.35, could you please help
    thanks in advance

  19. Hi
    I install ns-2.31 in ubuntu 12.04 64 bit .I want to install CRCN , but in step 8 when I used command “make ” , i get this error :
    collect2: ld returned 1 exit status
    make: *** [ns] Error 1
    can you help me , I really need it ..

  20. I cannot download CRCN for the directed source ..says
    Not Found

    The requested URL /~ljialian/ was not found on this server.

    Apache/2.2.3 (Red Hat) Server at Port 80..

    Expecting help from anybody out here…

    Thank You.

  21. Hello every one ,I got the same error for the last command ‘make’.The response to the command ‘make’ is “collect2: ld returned 1 exit status
    make: *** [ns] Error 1”.Any idea to fix it??????

  22. Good day sir,
    lease I install ns-2.31 in ubuntu 12.04 64 bit .I want to install CRCN , but when I used command “make ” , i get this error :
    collect2: ld returned 1 exit status
    make: *** [ns] Error 1
    can you help me , I really need it ..
    please email

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s