Transmitting a JPEG file in GNU Radio environment without USRP

Project members: Zhifeng Chen, Ke-yu Chen

Advisor: Prof. Dapeng Oliver Wu


|| Introduction || Background || Result || Download || Related Work || Useful Links ||

 

Introduction

The target of this project is for us to test GNU Radio environment without hardware support such as the Universal Software Radio Peripheral (USRP). Interested reader may replicate this demo by go through this webpage.

Software Defined Radio (SDR) is the technique of getting code as close to the antenna as possible. It turns radio hardware problems into software problems, that is, instead of hardware, the software defines the transmitted waveforms, and demodulates the received waveforms. Software Defined Radio (SDR) is a revolution in radio design, especially for the cross-layer design of multimedia transmission over wireless channels with different Quality of Service (QoS) assurance. Due to its ability to create radios that change on the fly, it is very suitable for testing dynamic wireless video performance under software-controlled parameters.

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.

 

Background

Both Multimedia and mobile communications have experienced massive growth and commercial success in the recent years. As the convergence of these two kinds of technologies, mobile multimedia communications is expected to achieve unprecedented growth and worldwide success. However, the limited bandwidth resource and time-varying characteristic of wireless channel bring up challenges for multimedia system design to meet certain QoS requirement. To support multimedia transmission over wireless channels, it is important to consider cross layer design to support end-to-end QoS. For example, we need to consider both the physical-layer QoS (e.g., SNR) and the networking-layer QoS (e.g., delay performance) since both physical-layer bit errors and networking-layer buffer overflow can cause errors, which negatively affect the upper-layer multimedia applications. Application layer may also need to know the bandwidth and channel quality of physical layer to adaptively select the optimal code algorithm. All of these require wireless channel parameters should be controlled by software.

Another motivation come from the trend of development of mobile phone and wireless devices, which require an ever increasing number of functions with different modulations and protocols. This has necessitated an increasing number of transceivers in mobile phone and wireless devices, which tremendously  increases the complexity and cost of wireless system design. The exciting news is with the support of high speed A/D, D/A devices and DSP technology, we now may use software to implement what formerly can only be done by hardware. Thus, instead of a bunch of fixed function gadgets, we may use a universal communication device to implement different functions under software control. For example, a device that can morph into a cell phone and get you connectivity using GPRS, 802.11 Wi-Fi, 802.16 WiMax, a satellite hookup or the emerging standard of the day.  

 

Result

We have setup a demo by ourselves.  The system diagram is showed as Figure 1:

Figure 1: Transmitting a JPEG file in GNU Radio environment without USRP

We add Graphic User Interface (GUI) in this program, so all operations in this demo are very convenient.

We first read a BMP file from hard disk, send it into a JPEG encoder implemented by C++ to get a compressed image file. After encoding, the transmitter read the JPEG file and starts the modulation. On the completion of modulation, the transmitter puts the bit stream into socket and sends it to the receiver.

We add modulation and demodulation respectively in the transmitter and receiver in order to implement a practical wireless communication system, which use DBPSK/DQPSK as the modulation method. However, this setup needs the hardware support of Universal Software Radio Peripheral (USRP). In our demo, we will use TCP/IP socket connection to simulate the wireless transmission. So, without multiple the sinusoid carrier signals in our modulation, the final output is a baseband representation of the modulated signal, that is, the in-phase and quadrate (I/Q) signals. Receiver plays the server role, to listen the incoming bit stream and put the incoming bit stream into the next block "demodulation" to restore the input data to the original JPEG file. All the works described above are done by software in PC, and we use socket to substitute USRP.

Demo setup from youtube:

 

In this project, we send one JPEG file by GNU Radio without USRP board. First, in both PCs we need to open Graphic User Interface (GUI) for sender and receiver by Mainframe.py file. Next, in receiver side, we begin TCP/IP server listening by pressing start listening and input port number for TCP server. Then, select JPEG encoder in sender side, and choose a bmp file. After JPEG encoded, we choose GMSK modulation option which will produce a new file in Sender folder. Then choose transmit JPEG option and input IP address and port number of TCP server. Wait a moment, you will see transmission finish in sender GUI, and received total modulated data size in receiver command line output. At last, we demodulate the received data with GMSK demodulation, and we will see there is a new file produced in receiver folder. It is the JPEG file from sender. Just open it. -- Thank Chris for his voice recording!

For more detail information, please refer to the course project paper.

 

Download

Download full files in winzip format here:

version_1_0.zip    version_1_1_080318.zip

Download full files in gz format here (for Linux):

version_1_0.tar.gz    version_1_1_080318.tar.gz

Source code:

Below codes come from version 1.1. Before run these codes, you may read the readme file here.

Sender: Run in client side, which performs as JPEG encoder, Modulation, and TCP sender with GUI interface

Main file    DBPSK Modulation    GMSK Modulation

Receiver: Run in Server side, which performs as TCP receiver, Demodulation with GUI interface   

Main file    DBPSK Demodulation    GMSK Demodulation

Test files: These files are served to ensure the modulation and TCP/TP socket work normally before processing the JPEG files

Modulation:    DBPSK    DQPSK    GMSK

Socket:    Server    Client

Documents:

Project paper: This is our course project paper for GNU Radio. This will give you more idea on our project and details on what we have done

Presentation: Introduction and main topics

Library List: We tidy up all the libraries release by GNU Radio version 3.0

 

Related Work

B. Kang, N. Vijaykrishnan et al. Power-efficient implementation of turbo decoder in SDR systems. In Procs. of IEEE International SoC Conference (SoCC), September 2004.

J. Lackey. GMSK python modules for GNU Radio. Retrieved November 30, 2005 from http://noether.uoregon.edu/~jl/gmsk/.

S. Valentin, H. von Malm, and H. Karl. "Evaluating the GNU Software Radio platform for wireless testbeds". Technical report TR-RI-06-273, University of Paderborn, Department of Computer Science, February 2006.

H. von Malm. Implementing physical and data link control layer on the GNU software-defined radio platform. Bachelor's thesis, University of Paderborn, Computer Networks Group, December 2005.

A.H. Aghvami, T. H. Le and N. Olaziregi, ^Mode Switching and Qos Issues in Software Radio, ̄ IEEE Personal Communications Magazine, October 2001, Vol. 8, No. 5.

Ming-Chung Tang, R.C. Chang and Wei-Kuan Shih, "Software Radio System Design for Accessing Wireless Multimedia Services," to appear on Int'l Journal of Computer Research.

Raquel Hill, Suvda Myagmar, and Roy Campbell, " Threat Analysis of GNU Software Radio ," World Wireless Congress (WWC) , May 2005. [presentation]

 

Useful Links

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 borad
http://www.comsec.com/wiki?UniversalSoftwareRadioPeripheral

Boards Price list
http://www.ettus.com/custom.html