BlueHoc  

 
  BlueHoc Simulator  
  Home
  Presentation
  BlueHoc Manual
  Bluetooth
  Performance
  Email us
 
  developerWorks
 
 
     

BlueHoc: Bluetooth Performance Evaluation Tool

BlueHoc Manual


BlueHoc simulator provides a Bluetooth extension for Network Simulator (ver 2.1b6). BlueHoc is available for download under IBM Public License (IPL) from IBM developerWorks . It requires ns-2.1b6 which can be obtained from Network Simulator site.

Using TCP/IP simulations of ns

ns provides extensive support for TCP/IP simulations. The TCP/IP simulations of ns include various transport layers, routing protocols and simulated applications and much more. The simulated transport layers include:

  • Agent/UDP
  • Agent/TCP: Tahoe TCP sender
  • Agent/TCP/Reno: Reno TCP sender
  • Agent/TCP/NewReno: modified Reno
  • Agent/TCP/Sack1: Selective repeat TCP
  • Agent/TCP/Vegas: Vegas
ns has Traffic Generators as well as Simulated Applications. The simulated TCP/IP based applications include:
  • Application/FTP: FTP application
  • Application/Telnet: Telnet application
The traffic generators include:
  • Application/Traffic/Exponential : ON, OFF traffic eg. voice
  • Application/Traffic/Pareto : ON, OFF traffic with burst and idle times taken from Pareto distribution
  • Application/Traffic/CBR : constant bit rate traffic
  • Application/Traffic/Trace : generates traffic from a trace file

After installing BlueHoc, the proc.tcl file in ~/ns/run directory has a function config-app which is reponsible for configuring applications and transport layers for BlueHoc.

# configure application and transport for device 'i'
proc config-app {i} {
	global Sim ns
	set transport [lindex $Sim(Transport) $i]
	
# create agent set Sim(trans:$i) [new Agent/$transport] set app [lindex $Sim(Application) $i]
# create application set Sim(appl:$i) [new Application/$app] set temp [string range $transport 0 2] if {$temp == "TCP"} { # if the agent name starts with "TCP", create a TCP sink set Sim(sink:$i) [new Agent/TCPSink] } else { # else create a NULL agent as receiver set Sim(sink:$i) [new Agent/Null] }
# attach sender agent to device 0 in the simulation (master) $ns attach-agent $Sim(dev:0) $Sim(trans:$i) # attach sink to device 'i' $ns attach-agent $Sim(dev:[expr $i+1]) $Sim(sink:$i) # connect source and sink $ns connect $Sim(trans:$i) $Sim(sink:$i) # attach agent to the source/application $Sim(appl:$i) attach-agent $Sim(trans:$i) # attaches application to the Bluetooth host $Sim(dev:0) attach-app $i $Sim(appl:$i) }

Only the last command is required specifically for BlueHoc, while other commands are standard means of attaching agents, applications and creating connections in ns. The last command provides a handle of the application to the C++ class BTHost. This is required because applications are started once the lower level procedures of inquiry, paging and connection establishment are completed. Since the BThost class objects have knowledge of lower level status through HCI events, the applications are started by BTHost through OTcl procedure invokation using tcl.evalf. The procedure attach-app is defined for the OTcl class BTNode in ~ns/tcl/lib/ns-btnode.tcl.

Downloading and Installing BlueHoc

BlueHoc can be downloaded from the BlueHoc project page. The directory hierarchy of the BlueHoc distribution is as shown:
			rel1.0
			   |
			   |______________________
			   |				|	
			bluehoc/	    	      INSTALL
			   |
	__________________________________________
	|		|		|		|
	mod/	      patches/	       src/	       tcl/
	

The file INSTALL contains intallation instructions. The mod/ directory contains the modified ns files. These files are only required if BlueHoc is being installed for a version other than ns-2.1b6. The patch files in the patches/ dir are for ns-2.1b6 files which have been modified for BlueHoc. Directory src/ contains the C++ source code for BlueHoc while tcl/ contains the tcl source file ns-btnode.tcl which defines BTNode class. It also contains bluehoc.tcl which implements the graphical interface. The files proc.tcl and run.tcl are used by bluehoc.tcl for running simulations.

Important:- The installation instructions in INSTALL assume that after uncompressing bluehoc distribution, the directory tree rooted at bluehoc is moved to ~ns/ i.e. $NSHOME/ns-allinone-2.1b6/ns-2.1b6 where $NSHOME is the path of the directory in which you uncompress the ns-2.1b6 distribution. In particular the rel1.0 directory should not appear in the installed version of BlueHoc. Please report any installation problems on BlueHoc project page.
Back Next

BlueHoc is supported by India Research Lab
Apurva Kumar IBM Corporation kapurva@in.ibm.com