Skip to content

Commit b35bac9

Browse files
author
Haoyang Lu
committed
0 parents  commit b35bac9

File tree

160 files changed

+45479
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+45479
-0
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
build
2+
examples/*.py
3+
.cproject
4+
.project
5+
.pydevproject
6+
.settings
7+
*.pyc

CMakeLists.txt

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
#
2+
# Copyright 2013 Free Software Foundation, Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
#
17+
########################################################################
18+
# Project setup
19+
########################################################################
20+
cmake_minimum_required(VERSION 2.6)
21+
project(gr-ieee802-11 CXX C)
22+
enable_testing()
23+
24+
#select the release build type by default to get optimization flags
25+
if(NOT CMAKE_BUILD_TYPE)
26+
set(CMAKE_BUILD_TYPE "Release")
27+
message(STATUS "Build type not specified: defaulting to release.")
28+
endif(NOT CMAKE_BUILD_TYPE)
29+
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
30+
31+
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
32+
33+
########################################################################
34+
# Compiler specific setup
35+
########################################################################
36+
if(NOT WIN32)
37+
#http://gcc.gnu.org/wiki/Visibility
38+
add_definitions(-fvisibility=hidden)
39+
add_definitions(-std=c++0x)
40+
endif()
41+
42+
########################################################################
43+
# Find boost
44+
########################################################################
45+
if(UNIX AND EXISTS "/usr/lib64")
46+
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
47+
endif(UNIX AND EXISTS "/usr/lib64")
48+
set(Boost_ADDITIONAL_VERSIONS
49+
"1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39"
50+
"1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44"
51+
"1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49"
52+
"1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54"
53+
"1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59"
54+
"1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
55+
"1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
56+
)
57+
find_package(Boost "1.35" COMPONENTS filesystem system)
58+
59+
if(NOT Boost_FOUND)
60+
message(FATAL_ERROR "Boost required to compile ieee802-11")
61+
endif()
62+
63+
########################################################################
64+
# Install directories
65+
########################################################################
66+
include(GrPlatform) #define LIB_SUFFIX
67+
set(GR_RUNTIME_DIR bin)
68+
set(GR_LIBRARY_DIR lib${LIB_SUFFIX})
69+
set(GR_INCLUDE_DIR include/ieee802-11)
70+
set(GR_DATA_DIR share)
71+
set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME})
72+
set(GR_DOC_DIR ${GR_DATA_DIR}/doc)
73+
set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME})
74+
set(GR_CONF_DIR etc)
75+
set(GR_PKG_CONF_DIR ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d)
76+
set(GR_LIBEXEC_DIR libexec)
77+
set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
78+
set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
79+
80+
########################################################################
81+
# Find gnuradio build dependencies
82+
########################################################################
83+
set(GR_REQUIRED_COMPONENTS RUNTIME FILTER FFT PMT DIGITAL)
84+
find_package(Gnuradio)
85+
find_package(CppUnit)
86+
find_package(ITPP)
87+
88+
if(NOT GNURADIO_RUNTIME_FOUND)
89+
message(FATAL_ERROR "GnuRadio Runtime required to compile ieee802-11")
90+
endif()
91+
92+
if(NOT CPPUNIT_FOUND)
93+
message(FATAL_ERROR "CppUnit required to compile ieee802-11")
94+
endif()
95+
96+
if(NOT ITPP_FOUND)
97+
message(FATAL_ERROR "ITPP required to compile ieee802-11")
98+
endif()
99+
100+
########################################################################
101+
# Setup logging options
102+
########################################################################
103+
104+
include(GrMiscUtils)
105+
GR_LOGGING()
106+
107+
########################################################################
108+
# On Apple only, set install name and use rpath correctly, if not already set
109+
########################################################################
110+
if(APPLE)
111+
if(NOT CMAKE_INSTALL_NAME_DIR)
112+
set(CMAKE_INSTALL_NAME_DIR
113+
${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
114+
PATH "Library Install Name Destination Directory" FORCE)
115+
endif(NOT CMAKE_INSTALL_NAME_DIR)
116+
if(NOT CMAKE_INSTALL_RPATH)
117+
set(cmakE_INSTALL_RPATH
118+
${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
119+
PATH "Library Install RPath" FORCE)
120+
endif(NOT CMAKE_INSTALL_RPATH)
121+
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
122+
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
123+
BOOL "Do Build Using Library Install RPath" FORCE)
124+
endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
125+
endif(APPLE)
126+
127+
########################################################################
128+
# Setup the include and linker paths
129+
########################################################################
130+
include_directories(
131+
${CMAKE_SOURCE_DIR}/include
132+
${CMAKE_SOURCE_DIR}/lib
133+
${CMAKE_BINARY_DIR}/include
134+
${Boost_INCLUDE_DIRS}
135+
${CPPUNIT_INCLUDE_DIRS}
136+
${ITPP_INCLUDE_DIR}
137+
${GNURADIO_RUNTIME_INCLUDE_DIRS}
138+
${LOG4CPP_INCLUDE_DIRS}
139+
)
140+
141+
link_directories(
142+
${Boost_LIBRARY_DIRS}
143+
${CPPUNIT_LIBRARY_DIRS}
144+
${GNURADIO_RUNTIME_LIBRARY_DIRS}
145+
${LOG4CPP_LIBRARY_DIRS}
146+
)
147+
148+
########################################################################
149+
# Create uninstall target
150+
########################################################################
151+
configure_file(
152+
${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
153+
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
154+
@ONLY)
155+
156+
add_custom_target(uninstall
157+
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
158+
)
159+
160+
########################################################################
161+
# Add subdirectories
162+
########################################################################
163+
add_subdirectory(include/ieee802-11)
164+
add_subdirectory(lib)
165+
add_subdirectory(swig)
166+
add_subdirectory(python)
167+
add_subdirectory(grc)

MANIFEST.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
title: gr-ieee802-11
2+
author:
3+
- Bastian Bloessl <bloessl@ccs-labs.org>
4+
copyright_owner:
5+
- Bastian Bloessl
6+
dependencies:
7+
- gnuradio (>= 3.7.4)
8+
repo: https://github.com/bastibl/gr-ieee802-11.git
9+
tags:
10+
- IEEE 802.11
11+
- WiFi
12+
- OFDM
13+
website: http://www.ccs-labs.org/projects/wime/
14+
brief: IEEE 802.11 a/g/p Transceiver
15+
icon: http://www.ccs-labs.org/projects/wime/wime.png
16+
---
17+
This an IEEE 802.11 a/g/p transceiver for GNU Radio v3.7. Over the air, I tested it with the Ettus USRP N210 with XCVR2450 and CBX daughterboards. For interoperability tests I use mainly an Atheros (ath5k) WiFi card. The code can also be used for packet error rate simulations.

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Greetings,
2+
3+
This project encodes data in the form of subcarrier erasing and transmits the data along with the regular WiFi traffic. The regular WiFi channel, referred to as main channel, will not suffer performance degradation. The extra data throughput can be used to deliver delay-sensitive traffic.
4+
5+
This project is built upon GNURadio/USRP platform. The project is built upon project IEEE802.11 PHY (https://github.com/bastibl/gr-ieee802-11/).
6+
7+
To use this project, please cite the following literatures:
8+
9+
1) @inproceedings{lu2016supporting,
10+
title={Supporting real-time wireless traffic through a high-throughput side channel},
11+
author={Lu, Haoyang and Gao, Wei},
12+
booktitle={Proceedings of the 17th ACM International Symposium on Mobile Ad Hoc Networking and Computing},
13+
pages={311--320},
14+
year={2016},
15+
organization={ACM}
16+
}
17+
18+
2) @inproceedings{bloessl2013ieee,
19+
title={An IEEE 802.11 a/g/p OFDM Receiver for GNU Radio},
20+
author={Bloessl, Bastian and Segata, Michele and Sommer, Christoph and Dressler, Falko},
21+
booktitle={Proceedings of the second workshop on Software radio implementation forum},
22+
pages={9--16},
23+
year={2013},
24+
organization={ACM}
25+
}
26+
27+
# Installation
28+
For installation of GNURadio and library, please refer to (https://github.com/bastibl/gr-ieee802-11/).
29+
30+
# Further information
31+
For details of the project, please refer to the paper 1). If you have any further questions, please contact
32+
Haoyang Lu, (hlu9@utk.edu)
33+
University of Tennessee

README.md~

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Greetings,
2+
3+
This project encodes data in the form of subcarrier erasing and transmits the data along with the regular WiFi traffic.
4+
5+
This project is built upon GNURadio/USRP platform. The project implements the complete IEEE802.11 protocol, which includes PHY (Based on 2), MAC (Based on 3)), and rate adaptation approaches. The rate adaptation approaches includes Minstrel and Adaptive Auto Rate Fallback (AARF).
6+
7+
To use this project, please cite the following literatures:
8+
9+
1) @inproceedings{lu2016scheduling,
10+
title={Scheduling Dynamic Wireless Networks with Limited Operations},
11+
author={Haoyang Lu and Wei Gao},
12+
booktitle={IEEE International Conference on Network Protocols},
13+
year={2016},
14+
organization={IEEE}
15+
}
16+
17+
2) @inproceedings{bloessl2013ieee,
18+
title={An IEEE 802.11 a/g/p OFDM Receiver for GNU Radio},
19+
author={Bloessl, Bastian and Segata, Michele and Sommer, Christoph and Dressler, Falko},
20+
booktitle={Proceedings of the second workshop on Software radio implementation forum},
21+
pages={9--16},
22+
year={2013},
23+
organization={ACM}
24+
}
25+
26+
# Installation
27+
For installation of GNURadio and library, please refer to (https://github.com/bastibl/gr-ieee802-11/).
28+
29+
# Further information
30+
For details of the project, please refer to the paper 1). If you have any further questions, please contact
31+
Haoyang Lu, (hlu9@utk.edu)
32+
University of Tennessee

apps/debug.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
valgrind --leak-check=yes --trace-children=yes --log-file=./valgrind.out ../examples/ofdm_sim.py
4+
#valgrind --tool=callgrind --dump-instr=yes --trace-children=yes --log-file=./valgrind.out ../examples/ofdm_sim.py

apps/nic.sh

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
3+
FILE="/tmp/ofdm.pcap"
4+
FLOWGRAPH="wifi_transceiver.py"
5+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
7+
### create fifo
8+
if [ -e ${FILE} ]
9+
then
10+
echo "${FILE}: file already exists"
11+
if ! [ -p ${FILE} ]
12+
then
13+
echo "ERROR: ${FILE} exists and is not a FIFO"
14+
exit 1
15+
fi
16+
else
17+
echo "creating fifo: ${FILE}"
18+
mkfifo ${FILE}
19+
fi
20+
21+
22+
### create tap interface
23+
if [[ `ifconfig -a | grep tap0 | wc -l` -eq 0 ]]
24+
then
25+
sudo ip tuntap add dev tap0 user ${USER} mode tap
26+
fi
27+
28+
### reconfigure it in any case, just to be sure it's up
29+
sudo ifconfig tap0 down
30+
sudo ifconfig tap0 hw ether 12:34:56:78:90:ab
31+
sudo ifconfig tap0 mtu 440
32+
sudo ifconfig tap0 up
33+
sudo ifconfig tap0 192.168.123.1
34+
35+
sudo route del -net 192.168.123.0/24
36+
sudo route add -net 192.168.123.0/24 mss 400 dev tap0
37+
38+
sudo tc qdisc del dev tap0 root
39+
sudo tc qdisc add dev tap0 root netem delay 10ms
40+
41+
sudo arp -s 192.168.123.2 30:14:4a:e6:46:e4
42+
43+
44+
### start transceiver
45+
cd ${DIR}
46+
cd ../examples/
47+
./${FLOWGRAPH} &
48+
sleep 1
49+
50+
51+
### start wireshark
52+
wireshark -k -i ${FILE} &
53+
sleep 1
54+
55+
56+
### start netcat
57+
echo "##########################################################################"
58+
echo "### starting netcat. Just type and the lines will be send to the flowgraph"
59+
echo "##########################################################################"
60+
sleep 2
61+
62+
#echo | nc -u localhost 52001
63+
cat
64+
65+

apps/rx_demo.sh

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
FILE="/tmp/ofdm.pcap"
4+
FLOWGRAPH="wifi_rx.py"
5+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
7+
### create fifo
8+
if [ -e ${FILE} ]
9+
then
10+
echo "${FILE}: file already exists"
11+
if ! [ -p ${FILE} ]
12+
then
13+
echo "ERROR: ${FILE} exists and is not a FIFO"
14+
exit 1
15+
fi
16+
else
17+
echo "creating fifo: ${FILE}"
18+
mkfifo ${FILE}
19+
fi
20+
21+
22+
### create tap interface
23+
if [[ `ifconfig -a | grep tap0 | wc -l` -eq 0 ]]
24+
then
25+
sudo ip tuntap add dev tap0 user ${USER} mode tap
26+
fi
27+
28+
### reconfigure it in any case, just to be sure it's up
29+
sudo ifconfig tap0 down
30+
sudo ifconfig tap0 hw ether 12:34:56:78:90:ab
31+
sudo ifconfig tap0 up
32+
sudo ifconfig tap0 192.168.123.1
33+
34+
35+
### start transceiver
36+
cd ${DIR}
37+
cd ../examples/
38+
./${FLOWGRAPH} &
39+
sleep 1
40+
41+
42+
### start wireshark
43+
wireshark -k -i ${FILE} &
44+
sleep 1
45+
46+
47+
### start netcat
48+
echo "##########################################################################"
49+
echo "### starting netcat. Just type and the lines will be send to the flowgraph"
50+
echo "##########################################################################"
51+
sleep 2
52+
53+
#echo | nc -u localhost 52001
54+
cat
55+
56+

0 commit comments

Comments
 (0)