GR-GSM Setup

Requirements

GNU Radio,

apt-get install gnuradio gnuradio-dev

RTL-SDR, if not already installed from source,

apt-get install rtl-sdr librtlsdr0 librtlsdr-dev

Installation

Hint: avoid pybombs at all cost

apt-get install osmo-sdr libosmosdr-dev
apt-get install libosmocore libosmocore-dev
#libosmocore6
apt-get install cmake libboost-all-dev libcppunit-dev swig doxygen liblog4cpp5-dev python-scipy
apt install python-docutils
apt install libosmocore-utils
dpkg -L libosmocore-utils

apt install gr-osmosdr
ls -lhF /usr/share/gnuradio/grc/blocks/osmosdr_*
ls -lhF /usr/share/gnuradio/grc/blocks/rtlsdr_*

latest release,

wget https://github.com/ptrkrysik/gr-gsm/archive/v0.41.2.tar.gz

or ppa (xenial works even if you are using artful),

add-apt-repository ppa:ptrkrysik/gr-gsm
vi /etc/apt/sources.list.d/ptrkrysik-ubuntu-gr-gsm-artful.list
apt-get update
apt install gr-gsm

or simply current,

dpkg -l | grep grgsm
dpkg -l | grep gr-gsm
#apt purge gr-gsm
git clone https://github.com/ptrkrysik/gr-gsm.git
cd gr-gsm/
#rm -rf build/
mkdir build/
cd build/
cmake ..
make clean
make -j8
make install
which grgsm_capture
ldconfig

READY TO GO

–> gsm

Troubleshooting

avoid reports spamming

To disable automated crash reports,

#systemctl status apport
#systemctl stop apport
#systemctl disable apport
#cp /etc/default/apport /etc/default/apport.dist
#vi /etc/default/apport

unknown

I do not remember why but this might be useful,

sysctl kernel.shmmni
cp -pi /etc/sysctl.conf /etc/sysctl.conf.dist
echo kernel.shmmni=32000 >> /etc/sysctl.conf
sysctl -p

GRC blocks

Block key "rtlsdr_source" not found
Validation failed:

Block - blocks_rotator_cc_0 - Rotator(blocks_rotator_cc):
    Sink - in(0):
        Port is not connected.
Error during file compilation.
apps/CMakeFiles/pygen_apps.dir/build.make:79: recipe for target 'apps/grgsm_livemon' failed
make[2]: *** [apps/grgsm_livemon] Error 1
CMakeFiles/Makefile2:1099: recipe for target 'apps/CMakeFiles/pygen_apps.dir/all' failed
make[1]: *** [apps/CMakeFiles/pygen_apps.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

==> install gr-osmosdr,

apt install gr-osmosdr

swig

ImportError: No module named _grgsm_swig

==> you need to enable the library folder containing those, check with,

cat /etc/ld.so.conf
ldconfig

segfault

Segmentation fault

hackrf_source_c[3200]: segfault at 7fe2328b2000 ip 00007fe2378c46f1 sp 00007fe1b17f91e0 error 6 in libgnuradio-osmosdr.so.0.1.4[7fe23784c000+ee000]

==>

cp -pi apps/grgsm_scanner apps/grgsm_scanner.dist
vi apps/grgsm_scanner

remove line containing,

self.rtlsdr_source.set_min_output_buffer

and rebuild over it,

cd build
make
make install

https://github.com/ptrkrysik/gr-gsm/issues/336

Resources

Um interface https://en.wikipedia.org/wiki/Um_interface

Sniffing GSM traffic with HackRF. https://z4ziggy.wordpress.com/2015/05/17/sniffing-gsm-traffic-with-hackrf/

GSM Hacking Part① :使用SDR扫描嗅探GSM网络 https://www.bbsmax.com/A/Gkz1okPZ5R/


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml