/*********************************************************************** * The Blueware Project: http://nms.lcs.mit.edu/projects/blueware * Contact: Godfrey Tan (godfreyt@mit.edu) The Blueware software module includes implementation of a Bluetooth simulator, which closely follows the Bluetooth Specifications 1.1, and a few scatternet formation and link scheduling schemes. The simulator implementation is based on the BLUEHOC extension to NS2 released by IBM in 2001. Most of the original code of BLUEHOC has been re-written and re-designed. In addition, a significant amount of new code has been added. In particular, BLUEWARE provides an easy-to-program interface to various scatternet formation and link scheduling schemes. Along with the simulator, the implementations of a scatternet formation algorithm (TSF) and a link scheduling algorithm (LCS) are also provided. Documentation is available at our web site. The Bluetooth simulator part of BLUEWARE is licensed under the IBM Public License whereas the scatternet formation and link scheduling protocols such as TSF and LCS modules are licensed under the General Public License (see gpl.txt). ***********************************************************************/ TO INSTALL If you have ns-2.1b7a already installed, skip to Step 2. 1) Download and install ns-2.1b7a. tar -zxvf ns-allinone-2.1b7a.tar.gz 2) Goto ns-2 source directory and unzip blueware. cd ns-allinone-2.1b7a/ns-2.1b7a tar -zxvf blueware1.0-src.tar.gz You should see the following structure: blueware/ | |----------|---------|-----------------|--------|------| README-BLUEWARE gpl.txt blueware.patch (c++ source) tcl/ run/ 3) Install Blueware cp blueware/* . cp blueware/tcl/lib/* tcl/lib/ cp -r blueware/run run patch -p0 -b < blueware.patch 4) Compile a) If you have NS installed, you should re-run the configure script with the same parameters you used to configure ns (see below). If you don't want to do this, you need to manually add the BLUEWARE C++ files for compilation in OBJ_CC (see blueware/Makefile.in) and ns-btnode.tcl in the NS_TCL_LIB macros of the Makefile. Then, do sh config.status make clean make b) If you are installing a fresh copy of ns-2.1b7a, from ns-allinone-2.1b7a directory ./install cd ns-2.1b7a make NOTE: Blueware uses "assert" macros extensively. When --enable-debug flag is specified "configure" script is run, ns will make sure that Makefile does not contain "NDEBUG" flag and as a result, all assertions will be enabled. When blueware crashes, please make sure that you compile the source with no "NDEBUG" variable. You can simply remove "NDEBUG" from the Makefile and "make clean; make". ====================== TO RUN 1) cd to "run" directory cd run 2) Run ns. ../ns 20nodes.tcl > trace.out 3) Analyze the results ./analys.pl trace > trace.ana 4) Compare the results with the output file that is shipped. There should be no difference! diff trace.out 20nodes.out 5) For more documentation, please visit http://nms.lcs.mit.edu/projects/blueware. /***********************************************************************/ FILES CONTAINED IN BLUEWARE 1.0 gpl.txt General Public License util.h generic useful functions debug.[h,cc] tracing data-stats.[h,cc] traffic stats bt-core.h the header includes the entire protocol stack bt-def.h type definitions bt-baseband.[h,cc] the Baseband module bt-linkcontroller.[h,cc] the Link Controller module bt-lmp.[h,cc] the Link Manager module bt-host.[h,cc] the HCI module bt-l2cap.[h,cc] the Logical Link Control and Adaptation module bt-queue.[h,cc] the Link Queue bt-classify.[h,cc] the bluetooth address classifier bt-scheduler.[h,cc] the scheduler that manages intra-piconet links bt-taskscheduler.[h,cc] the default scheduler that manages various tasks such as Inquiry as well as other communication tasks bt-topo.[h,cc] the base class for topology formation schemes bt-wirelessphy.[h, cc] the Bluetooth physical interface module fh-channel.[h,cc] the generic Frequency Hopping module tsf.[h,cc] the Tree Scatternet Formation scheme lcs.[h,cc] the Locally Coordinated Scheduling scheme Modules that are not currently used in Blueware 1.0: bt-lbf.[h,cc] the leaky bucket module (for QoS) bt-drr.[h,cc] deficit round robin scheme for intra-piconet links (see bt-scheduler.cc) bt-distfer.h the table of forward error rate for different packet types (for interference)