Saturday 25 August 2012

Routing in NS2

The default routing protocol of NS2 is static routing. This means that there would be no change in topology throughout the simulation. In this case, NS2 configures the routing information once when the simulation start with the OTcl statement “$ns run”. The process proceeds as follows:

Step 1: [OTcl] Simulator::run
Step 2: [OTcl] Routelogic::configure
Step 3: [OTcl] Agent/rtProto/Static::init-all
Step 4: [OTcl] Simulator::compute-routes
Step 5: [OTcl] Simulator::computer-flat-route
Step 6: [OTcl] RouteLogic::compute
Step 7: [OTcl] Simulator::populate-flat-classifier

Step 6: The OTcl class RouteLogic is bound to the C++ class with the same name (see file ns-2.35/routing/route.cc,h). The OTcl command compute simply executes the funciton compute_routes(…) in the C++ domain. From this point, you have look closely of what NS2 does and apply necessary changes to fit your needs.

Step 7: See how NS2 populate the routing information to all the Nodes. You will need to look into this step to see how routing information are delivered to all related Nodes.

Network Simulator 2 Tutorials

1.  For Learning about Network Simulator 2 basics you can use Marc Greis Tutorials here.

2. You can use following materials

Install Mannasim Patch in NS 2.34 for Wireless Sensor Network Simmulation


1. Download Mannsim Patch for NS 2.34 here.

2. Type the following command on the ns-allinone-2.29 folder:
  • patch -p1 < ns2.34-mannasim-gcc4.3.patch
3. Install NS 2.34 as shown in previous post . 

To test MannaSim installation two simulation scripts are provided bellow. The first one simulates a flat network of homogeneous sensors and the second a hierarchical network composed of two diferent classes of sensor nodes.

If you have any installation problem then post comments......

Install NS 2.34 in Ubuntu 10.10

1. Download & install some packages from repository by following commands :
  • $ sudo apt-get update
  • $ sudo apt-get install build-essential autoconf automake libxmu-dev 
2. Download  ns-2.34 and extract in your home directory.

3. Install the development files for X Windows plus the g++ compiler:
  • sudo apt-get install xorg-dev g++ xgraph
4.  Edit line 6304 of "otcl-1.13/configure"  from SHLIB_LD="gcc -shared" to SHLIB_LD="ld -shared"

5. Now run command in terminal : 
  • $  ./install
6. Set environment variables
  • $ gedit ~/.bashrc
7. Add the following lines to the end of the file. Remember replace “/your/path” by the folder where you have     stored extracted the ns-2 file (For example, if your Linux account name is blackpearl, and you have
    extracted  the file to your home directory, you have to change /your path to /home/blackpearl).

# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.35/otcl-1.14
NS2_LIB=/your/path/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/your/path/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/your/path/ns-allinone-2.35/bin:/your/path/ns-allinone-2.35/tcl8.5.10/unix:/your/path/ns-allinone-2.35/tk8.5.10/unix
NS=/your/path/ns-allinone-2.35/ns-2.35/
NAM=/your/path/ns-allinone-2.35/nam-1.15/
export PATH=$PATH:$XGRAPH:$NS:$NAM

8. Ensure that it immediately takes effect:
  • $ source ~/.bashrc
9. You can test the installation by doing the following:
  • $ cd ns-2.35
  • $ ./validate

Friday 3 August 2012

Latest swype keyboard for Samsung Galaxy SL-I9003


Requirements:
  • Phone must be rooted
  • Root Explorer application(Link)
  • Swype.apk & libSwypeCore.so (download links are below)

Procedure: (ALWAYS, Backup files. Just in case!)

  1. Download the 2 files given from the links below.
  2. Open Root Explorer.
  3. Paste the downloaded Swype.apk to "/system/app " folder.
  4. Now paste the libSwypeCore.so to "/system/lib " folder
  5. Close root Explorer and reboot phone.


 Not working on other phones...Only for SGSL-I9003