Systems and Networks Research Group


We have implemented HACK in NS-3 simulator and SoRa software defined radio platform.


In order to simulate TCP/HACK, modifications were done to ns-3.14.1. Support for 802.11n aggregation and A-MPDUs was added to this version of ns-3. Several bug fixes were also incorporated. Newer versions of ns-3 are available online, but they have a different implementation of A-MDPUs which was added after the modifications done on ns-3.14.1.

Currently there is no support in ns-3 for 802.11n rates with more than one antenna, so the maximum rate is 150 Mbps for 802.11n.

Compile and Run

The folder ns-3.14.1/hack contains the different ns-3 topology setup scripts and experiments to run. Modifications were mostly made to ns-3.14.1/src/wifi to add TCP/HACK and A-MPDU fixes. There are two ways to run the ns-3 simulator, using the built in python based build system called waf, or using Xcode if you are running on a mac.

Configure using Waf

Run the following command:

cd ns-3.14.1
CXXFLAGS="-Wall" ./waf configure -d optimized --disable-python --enable-modules=

Suppose you’d like to run the script, you need to copy to the scratch directory and then run waf to build:

cp hack/ scratch/

Finally to run the code with some command line arguments:

./waf —-run ‘./throughput_multiclient -c 1 -s 200.0 -f outputDir’

Run from Xcode

Multiple schemes are configured to run the different scripts found in the hack folder, with some example arguments. Just run them from the Xcode IDE. Just launch the project found in ns3-xcode/ns3.xcodeproj


  • Do not enable packet printing in ns-3. It causes a crash due a bug in packet tags interacting with A-MPDU aggregation.
  • python bindings should be disabled.


To implement HACK we modify umxsdrab.exe (src/umxsdr.mod) provided in the SoRa SDK. umxsdrab.exe is a user application that has a full 802.11a/b MAC implementation. For our implementation we use SoRa SDK version 1.7 and made the following major modifications:

  1. Fine grained Distributed Coordination Function (DCF).
  2. In-memory logging capabilities.
  3. Workaround link-layer ACK latency.


We modify the umxsdrab.exe to provide a more fine grained DCF for channel access. More specifically we modify the carrier sensing function, BB11ARxCarrierSense(), and implement DIFS, SIFS and backoff timings in the umxsdrab.exe.

In-memory logging

Logging is essential part for any development project. To much disk I/O caused by logging severely degrades the performance therefore, we implement a simple in-memory logging that dumps all the logging data to the disk only on exit of the umxsdrab.exe application.


We assume that SoRa SDK was installed and setup properly. If not, please refer to the documentation provided by SoRa on how to install it. Before compiling umxdrab.exe make sure that you download and place the OpenSSL libraries into external/ folder. In addition, we use Boost libraries so make sure that boost/ points to the correct boost distribution. We use version 1.54.0. Once the files are extracted from the archive and libraries put into place open the build console by running FreBldEnv.cmd and execute:

cd src/umxsdrab.mod

bcz will recompile all the sources everytime it is run. If you want only modified files to be compiled run build. Provided that compilation was successful, the binaries will be placed on the target/fre_wxp_x86/ directory.


HACK is enabled by running the umxsdrab.exe using the added -t parameter. For example:

umxsdrab.exe -t -o 1 -d 2 -c sora2.conf

Notice that we have added a new functionality that allows to load parameters from a configuration file by specifying the configuration file (use -c parameter). An example configuration file follows:

1.  [02-50-F2-F0-15-01]
2.  name = SoRa2
3.  rate = 54000

5.  name = Broadcast
6.  rate = 54000

7.  [Global]
8.  buffer_size = 102400
9.  frequency = 2484
10. rxgain = 0x600
11. rxpa = 0x2000
12. txgain = 0x1500
13. rate = 54000
14. sample_rate = 40
15. log_file = sora4-tcp.log
16. sora_buffer = 6120

Line 1 specifies the MAC address and assigns a name to that MAC and the bit-rate for the frames sent to the given MAC address. Other parameters are the same as the one provided by the umxsdrab.exe except for buffer_size, log_file, and sora_buffer. buffer_size limits the total buffer available, while sora_buffer limits the number of bytes that are kept modulated on the SoRa’s internal memory. Finally, log_file specifies the name of the while where the logs are dumped when the application exits.