Pages

Showing posts with label CRCN. Show all posts
Showing posts with label CRCN. Show all posts

Monday, 2 December 2013

Setup or change USRP N210 IP address in Ubuntu

You may need to change the USRP2's IP address for several reasons:
  • to satisfy your particular network configuration 
  • to use multiple USRP2s on the same host computer
  • to set a known IP address into USRP2 (in case you forgot)
Connect network cable to port physically. Then, setup the host IP to enable the communicate with USRP N210 whose default IP is 192.168.10.2

To change the USRP2's IP address, you must navigate to the following folder:
cd /usr/local/lib/uhd/utils

Then run the following command by providing the necessary parameters:
sudo ./usrp2_recovery.py --ifc=<Interface> --new-ip=<New IP address>

Note: The <interface> is usually something like eth0. You can discover the names of the network interfaces in your computer by running ifconfig without any parameters. <New IP address> is the IP address you want to assign to the USRP2 device.

Then, turn off power switch and reboot the USRP2 device. Now type the following command in the terminal to see the changes
sudo uhd_find_devices

or you can ping to the USRP2 IP address. 

ping <New USRP2 IP Address> 

You should be able to see the response of USRP N210, otherwise turn off your firewall as 'sudo ufw disable' and check the network connection.

Good Luck..:)

Sunday, 11 November 2012

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-allinone-2.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/