Zigbee/IEEE 802.15.4 Module for NS2 simulator

May 20, 2008 (updated Oct 19, 2008)

We modified the existing IEEE 802.15.4 module in NS2 (version 2.30) to implement zigbee routing and improve the IEEE 802.15.4 MAC and PHY implementation.

The source code (wpan_uwm.tar.gz) for the modified ns-2.30/wpan directory of NS2 simulator can be downloaded from here . Here is the ns-2.30 Makefile we have been using. You will need to replace "/home/mgoyal/test/ns-allinone-2.30" with the path to your ns-allinone-2.30 directory. tcl_lib.tar.gz contains the ns-2.30/tcl/lib files we have been using. Here is an example Tcl simulation script.

You need to add poisson.cc to ns-2.30/tools/

Additionally, the following files need to be replaced:

packet.h in ns-2.30/common/

wireless-phy.cc in ns-2.30/mac/

wireless-phy.h in ns-2.30/mac/

Here is the procedure to install this code:

1. Install default ns-2.30 using ns-allinone-2.30.tar.gz

2. rm -Rf ns-2.30/wpan

3. Copy wpan_uwm.tar.gz into ns-2.30 directory

4. Untar wpan_uwm.tar.gz: tar -xvfz wpan_uwm.tar.gz

5. Copy tcl_lib.tar.gz into ns-2.30/tcl directory

6. rm -Rf ns-2.30/tcl/lib

7. Untar tcl_lib.tar.gz: tar -xvfz tcl_lib.tar.gz

8. Copy Makefile in ns-2.30 directory (replacing the original Makefile)

9. Copy packet.h in ns-2.30/common

10. Copy wireless-phy.cc,.h in ns-2.30/mac

11. Copy poisson.cc in ns-2.30/tools

12. do a make in ns-2.30 directory

Please contact Mukul Goyal (mukul@uwm.edu) if you have a question, need simulation scripts or any other help in using the modified simulator.

Acknowledgement: We acknowledge Johnson Controls Inc's generous support for this work.