Real-world Transmission with GNU Radio and USRP
Advisor: Prof. Dapeng Oliver Wu
|| Introduction || Experiment 1 || Experiment 2 || Experiment 3 || Useful Links ||
﹛
This project is aim to verify the GNU Radio with Universal Software Radio Peripheral (USRP), and also serve as a basis for our project 4: Cross-layer Wireless Video Testbed. In this project, we do several experiments to test the link between two USRP by data transmission, voice transmission, and TCP/IP transmission. They are described in detail below.
GNU Radio is a free software toolkit for learning about, building, and deploying Software Defined Radios, and is now an official GNU project. GNU Radio is a signal processing package, which is distributed under the terms of the GNU General Public License. GNU Radio also provides functions to support implementing spectrum analyzer, an oscilloscope, concurrent multichannel receiver and an ever-growing collection of modulators and demodulators. (here is the detail function/Library list.) So, in this project, we choose GNU Radio as our development environment.
Universal Software Radio Peripheral (USRP) is a high-speed USB-based board for making software radios. The USRP has an open design, with freely available schematics and drivers, and free software to integrate with GNU Radio.
Here is about how to test USRP when you get them. If you want to know more detail about IC specifications used in USRP, you may download them here.
Figure 1: demo setup and system diagram for GNU Radio and USRP
﹛
Experiment 1: Data transmission
Figure 2: system diagram for data transmission
The files used are benchmark_tx.py and benchmark_rx.py, which are located at gnuradio/gnuradio-examples/pyhton/digital directory. You may refer to the readme file in the same directory for how to run them. Actually, we simply add some codes before send_pkt(eof=True) in benchmark_tx.py to make sure all packets are sent.
You may download here: benchmark_tx.py benchmark_rx.py
Test Result:
The maximum throughput in physical layer is 500Kbps. After removing preamble, header, CRC, etc., the net throughput is about 445kbps. We send 1MByte file (= 8Mbit) data within 18 second. The bottleneck is CPU speed, and a higher CPU speed may achieve 1Mbps.
To measure the pack error rate (PER), we set the packet length as 1500 bytes, and PER is about 0.1% with default transmit power, which can be adjust dynamically. Since in our test, we only use CRC, the PER can be improved by using FEC.
Demo setup from youtube:
﹛
﹛
Experiment 2: Voice transmission
Figure 3: system diagram for voice transmission
The voice link use physical channel from experiment 1. The voice codec is GSM-FR encoder and decoder, in which the voice is processed in real-time. The files used are benchmark_tx.py and benchmark_rx.py, which are located at gnuradio/gnuradio-examples/pyhton/digital directory.
You may download here: tx_voice.py rx_voice.py
Test Result:
We use two different Liunx OS: one with Debian/Ubuntu, another with Fedora. In this demo, we find Debian/Ubuntu have better support for audio related hardware. For example, in our PC with Debian/Ubuntu, microphone is smoothly supported, while the PC with Fedora can not support microphone smoothly. However, to installed Ubuntu 7.04 (Feisty Fawn), there are some points should be noted, such as mblock support. You may refer to my install log here.
Demo setup from youtube:
﹛
﹛
Experiment 3: TCP/IP over GNU Radio and USRP
Figure 4: system diagram for voice transmission
The files used are tunnel.py, which are located at gnuradio/gnuradio-examples/pyhton/digital directory. You may refer to the readme file in the same directory for how to run them.
You may download here: tunnel.py
Test Result:
RTT is about 30ms from the ping test as showed in Figure 5
and Figure 6. For Ethernet and WiFi network card, RTT is usually less than 1ms.
The delay in the demo due to the software implementation of both PHY and MAC (CSMA).
So, GNU Radio is not able to implement real-time 802.11 MAC, for example, SIFS =
10us (for 802.11a, SIFS = 16us), PIFS = 30us, DIFS = 50us, since the control
time scale in GNU radio is in the order of 10ms. However, we may use this
testbed to test point-to-point cross-layer wireless video in real-time!
Interested reader may refer to our project 4:
Cross-layer Wireless Video Testbed.
﹛
Figure 5: User interface on first PC
Figure 6: User interface on second PC
﹛
Demo setup from youtube:
﹛
﹛
Here are some useful links which I used during my development.
Pyhton:
Byte of Python: very suitable for
Python beginner
http://swaroopch.info/text/Byte_of_Python:Main_Page
Dive Into Python
--Python from novice to pro
http://diveintopython.org/
Python Library Reference
http://docs.python.org/lib/
http://www.python.org/doc/current/lib/lib.html
GNU Radio:
GNU Radio official website
http://www.gnu.org/software/gnuradio/
step by step
http://www.nd.edu/~jnl/sdr/docs/
gnuradio module usage
http://webpages.charter.net/cswiger/modules.html
USRP:
USRP borad
http://www.comsec.com/wiki?UniversalSoftwareRadioPeripheral
Boards Price list
http://www.ettus.com/custom.html