Skip to content
asljivo1 edited this page Jul 17, 2018 · 2 revisions

General

Branch CoAP supports CoAP in ns-3. This branch of ns3 is linked to libcoap with interface for ns3. New modules in ns3 implementing CoAP support are:

  • coap-client-server-helper
  • coap-client
  • coap-server
  • coap-pdu

wscript of the applications module links libcoap library to ns3 upon ns3 configuration. Configuration of ns3 is not possible without working instalation of libcoap library from the repository https://github.com/asljivo1/libcoap.

Installation and setup

Installation of ns3

Installation of ns3 dependencies if needed

apt-get -y install gcc g++ python
apt-get -y install gcc g++ python python-dev
apt-get -y install qt4-dev-tools libqt4-dev
apt-get -y install mercurial
apt-get -y install bzr
apt-get -y install cmake libc6-dev libc6-dev-i386 g++-multilib
apt-get -y install gdb valgrind
apt-get -y install gsl-bin libgsl0-dev libgsl0ldbl
apt-get -y install flex bison libfl-dev
apt-get -y install tcpdump
apt-get -y install sqlite sqlite3 libsqlite3-dev
apt-get -y install libxml2 libxml2-dev
apt-get -y install libgtk2.0-0 libgtk2.0-dev
apt-get -y install vtun lxc

Installation of libcoap dependencies

apt-get -y install autoconf
apt-get -y install automake
apt-get -y install libtool
apt-get -y install asciidoc

Installation of libcoap (before installation of ns3 since libcoap is now a dependency of ns3)

git clone https://github.com/asljivo1/libcoap
cd libcoap
./autogen.sh
./configure
make
make install

Instalation of ns-3

git clone https://github.com/imec-idlab/802.11ah-ns3-git.git
cd 802.11ah-ns3-git
git checkout withcoap
CXXFLAGS="-std=c++11 -O0 -ggdb -g3" ./waf configure --build-profile=debug --disable-examples --disable-tests
./waf

For test, you can run ./ahsim.sh.

Clone this wiki locally