GNU Radio blocks for receiving/transmitting GSM https://osmocom.org/projects/gr-gsm/wiki
Go to file
ptrkrysik d4adf90a25 Increased sampling_rate of airprobe_rtlsdr 2014-11-29 00:07:05 +01:00
apps Increased sampling_rate of airprobe_rtlsdr 2014-11-29 00:07:05 +01:00
cmake Added buildsystem for apps. Doesn't honor dependencies yet (changing a grc file won't cause generating new py file). 2014-11-20 11:10:20 +01:00
docs Update of READMEs 2014-08-13 18:59:46 +02:00
examples Moved applications from examples to apps. Changed their names to airprobe_... 2014-11-20 11:08:43 +01:00
grc Removed unused samp_rate parameter from clock_offset_control 2014-11-28 23:40:12 +01:00
hier_blocks Changes in clock offset corrector and gsm_input - the previous version wasn't working well when samp_rate_in was different from samp_rate_out. 2014-11-19 11:30:53 +01:00
include Added new configurable block for demapping of control channels. 2014-11-19 11:32:05 +01:00
lib Removed a debug message that was left accidently. 2014-11-21 16:32:17 +01:00
python Removed unused samp_rate parameter from clock_offset_control 2014-11-28 23:40:12 +01:00
swig Added new configurable block for demapping of control channels. 2014-11-19 11:32:05 +01:00
.gitignore --- 2014-08-13 22:02:01 +02:00
CMakeLists.txt First step to add multichannel capability to the GSM receiver. At this moment it might still contain debuging code. The training sequence number for non C0 channels is embedded in the code. 2014-10-30 09:05:15 +01:00
README.md Added little user's documentation about airprobe_rtlsdr and airprobe_file 2014-11-29 00:05:11 +01:00

README.md

The gr-gsm project

The project is based on the gsm-receiver which was written by me for Airprobe project.

The aim is to provide set of tools for receiving information transmitted by GSM equipment/devices.

Installation

The project is based on GNU Radio signal processing framework and takes advantage of its great features like stream tagging and message passing. Presence of GNU Radio is therefore a basic requirement for compilation and installation of gr-gsm. Installation of GNU Radio is described at the bottom of the page.

Compilation and installation of gr-gsm

To download gr-gsm sources run following command:

git clone https://github.com/ptrkrysik/gr-gsm.git

Make sure that you have all required packages (checked on Ubuntu 14.04 and 14.10):

sudo apt-get install cmake libboost-all-dev libcppunit-dev swig \
                     doxygen liblog4cpp5-dev python-scipy

To compile and install gr-gsm run:

cd gr-gsm
mkdir build
cmake ..
make
sudo make install

Usage

There are many possible applications of gr-gsm. At this moment there is one application that is ready out of the box. It is improved replacement of the old Airprobe - the program that lets you receive and decode GSM control messages from timeslot 0 on the broadcasting channel of a BTS. After installation of gr-gsm there are three python executables that will be installed: -airprobe_rtlsdr.py, -airprobe_file.py.

Airprobe_rtlsdr

This program uses cheap RTL-SDR receivers as the source of the signal. It can be started by running from a terminal:

airprogre_rtlsdr.py

In the window of the program spectrum of the signal is drawn. The central frequency of the signal can be changed by moving fc slider. The GSM signal has bandwidth of around 200kHz. By looking for constant hills on the spectrum of such width you can find a GSM broadcasting channel. If everything set properly the program should immediately print content of subsequent messages on the standard output. If it doesn't happen set ppm slider into different positions. The slider is responsible for setting devices clock offset correction. If the clock offset is too large the clock offset correction algorithm that is implemented in the program won't work (there is intentionally added upper of allowable clock offset - it was done in order to avoid adaptation of the algorithm to neighbour channels). You can use the value set later by passing it as argument of the program:

airprogre_rtlsdr.py -p <correction>

Airprobe_file

This program processes files containing complex data - interleaved float IQ samples. Example of the usage:

airprobe_file.py --samp-rate=1M --fc=940M -i input_file 

where:

--samp-rate - sampling frequency of the data stored in the file,
--fc - central frequency of the recorded data - it is needed for frequency offset correction,
-i - the file containing the complex data.

Observing GSM messages in the Wireshark

The airprobe (file,usrp,rtlsdr) application sends GSM messages in GSMTAP format created by Harald Welte to the UDP port number 4729. Wireshark interprets packets coming on this port as GSM data with GSMTAP header and it is able to dissect messages

Installation of GNU Radio

Building GNU Radio from source

For advanced users and developers it is advised to compile GNU Radio and required third party GNU Radio projects from source.

In order to compile GNU Radio with optional projects needed in order to receive data from USRP devices (uhd) and RTL-SDR devices (gr-osmosdr) run following commands:

sudo apt-get install git
git clone git://github.com/pybombs/pybombs
cd pybombs
./pybombs install gnuradio uhd gr-osmosdr

At the first run pybombs will ask for configuration options. As a target directory select /usr/local/. The rest of the options can be left as default. Pybombs will then take care of downloading all of required libraries for installation of gnuradio and it will build and install it in /usr/local/.

Installation of GNU Radio from packages (Ubuntu 14.10)

The easier way to install gnuradio is installation from distribution's repository. Currently gr-gsm works with GNU Radio versions 3.7.3 and newer. On Ubuntu 14.10 it is possible to compile and use gr-gsm together with GNU Radio available from distribution's standard repository. To do this install all required packages by entering following command in a terminal:

sudo apt-get install gnuradio-dev gr-osmosdr libgnuradio-uhd3.7.2.1

Gr-gsm blocks that will be later installed will be located in /usr/local directory. To tell Gnu Radio Companion to look for blocks in there create config.conf in ~/.gnuradio directory:

mkdir ~/.gnuradio
touch ~/.gnuradio/config.conf

then edit ~/.gnuradio/config.conf and put following text inside:

[grc]
local_blocks_path=/usr/local/share/gnuradio/grc/blocks:/usr/share/gnuradio/grc/blocks