OsmocomBB是GSM协议栈(Protocols stack)的开源实现,全称是Open source mobile communication Baseband。目的是要实现手机端从物理层(layer1)layer3的三层实现。但是目前来看,真正的物理层(physical layer)并没有真正的开源实现,暂时也没看到实施计划。只有物理层控制。因为真正的物理层是运行在baseband processor的DSP core上,涉及到许多信号处理算法的实现,而且还要牵扯很多硬件RF的东西。


编译环境:ubuntu 13.10

用root用户进行所有操作

1
2
3
$ sudo su
```
## 安装编译osmocomBB所依赖的软件包

$ aptitude install libtool shtool autoconf git-core pkg-config make gcc

1
## 下载编译需要的GnuARM ToolChain

$ wget http://gnuarm.com/bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2

1
[百度网盘下载x86](http://pan.baidu.com/share/link?shareid=734228760&uk=2955852660)

$ tar xf bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2
$ mv gnuarm-* ~/gnuarm

1
基于x64构架:

$ 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

1
这样子就已经完成了关于OsmocomBB的交叉编译环境的搭建,剩下就是最关键的设置环境变量

$ export PATH=~/gnuarm/bin:$PATH

1
2
建议直接编辑~/.bashrc内容,把上面这段话直接加到最后.  
## 编译Libosmocore:

$ git clone git://git.osmocom.org/libosmocore.git $ cd libosmocore/
$ autoreconf -i
$ ./configure
$ make
$ make install
$ cd ..
$ sudo ldconfig

1
2
3
如果你没有再root环境下进行编译..ldconfig的时候一定要加上sudo ..保证ldconfig能再root下运行,否则会出现make: `*** [firmware] Error 2`类似这样的错误.  
参考:[osmocombb编译错误回顾与纠正](http://www.yuyunyun.cn/zblog/post/224.html)
## 编译OsmocomBB

$ git clone git://git.osmocom.org/osmocom-bb.git $ cd osmocom-bb
$ git pull —rebase
$ cd src
$ make
``基本上已经完成所有的编译操作了!至于你想要做的事情.还是靠你自己去折腾吧. 毕竟技术已经开源那么多年了.网上已经有非常多的文章介绍如何做到了.比如你想做到的gsm_sms Sniffing.gprs Sniffing. 或者说是gsm call Sniffing` 都是很简单可以做到的


常见问题:

  1. 出现libosmocore.so error x
    问题出在以上第三部没配置好环境变量
  2. 出现make: * [firmware] Error 2
    在root全下下 ldconfig 后重新编译..不行就重启