准备:
- 系统:Ubuntu系统、Debian系统。
- 硬件:电脑、C118手机、 FT232RL(CP2102、PL2303 USB2TTL) 模块一个、2.5mm 耳机插头带线一根
- 包:apt-get install libtool shtool autoconf git-core pkg-config make gcc
操作尽量统一在root下执行。
X86: 1 2 3
| $ wget http://gnuarm.com/bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2 $ tar xf bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2 $ mv gnuarm-* ~/gnuarm
|
X64: 1 2 3
| $ wget http://www.gnuarm.com/bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4_x86-64.tar.bz2 $ tar xf bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4_x86-64.tar.bz2 $ mv gnuarm-* ~/gnuarm
|
设置环境变量: 1
| $ export PATH=~/gnuarm/bin:$PATH
|
编译libosmocore
1 2 3 4 5 6 7 8
| $ git clone git://git.osmocom.org/libosmocore.git $ cd libosmocore/ $ autoreconf -i $ ./configure $ make $ make install $ cd .. $ ldconfig
|
编译OsmocomBB
1 2 3 4
| $ cd osmocom-bb $ git checkout –track origin/luca/gsmmap $ cd src $ make
|
准备好之后,使用操作如下:
刷入固件
1 2
| $ cd ~/osmocom-bb/src/host/osmocon/ ./osmocon -m c123xor -p /dev/ttyUSB0 ../../target/firmware/board/compal_e88/layer1.compalram.bin
|
扫描基站
1
| $ ~/osmocom-bb/src/host/layer23/src/misc/cell_log -O
|
监听基站数据
1
| $ ~/osmocom-bb/src/host/layer23/src/misc/ccch_scan -i 127.0.0.1 -a 70
|
使用WireShark实时读取数据
1
| $ wireshark -k -i lo -f ‘port 4729’
|