Getting started with 3G | ip.access nano3G+OpenBSC+Osmocom-bb Part 1

English Version could be find at Osmocom.org
https://osmocom.org/projects/cellular-infrastructure/wiki/Accelerate3g5_--_unicornteam
0x01环境搭建
PC:Ubuntu16.04
HardWare:ip.access nano3G
SoftWare:Osmocom
1.1 安装交叉编译环境
sudo apt-get update sudo apt-get install libtool shtool autoconf git-core pkg-config make gcc build-essential libgmp3-dev libmpfr-dev libx11- libx11-dev texinfo flex bison libncurses5 libncurses5-dbg libusb-0.1- libpcsclite1 libccid pcscd libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc zlib1g-dev libmpfr4 libmpc-dev libpcsclite-dev
sudo ldconfig mkdir osm
cd osm
mkdir build install src
wget http://bb.osmocom.org/trac/raw-attachment/wiki/GnuArmToolchain/gnu-arm-build.3.sh
cd src
wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2
wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2
wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz cd ..
chmod +x gnu-arm-build..sh
sudo bash gnu-arm-build..sh
1.2 设置交叉编译环境变量
cd install/bin
pwd vi ~/./.bashrc
export PATH=$PATH:/home/$username(change this to your name)/osm/install/bin #save and quit
source ~/.bashrc
0x02 源码编译CalypsoBTS
2.1 编译libosmo-dsp
git clone git://git.osmocom.org/libosmo-dsp.git
cd libosmo-dsp/
autoreconf -i
./configure
make
sudo make install
cd ..
2.2 编译osmocom-bb
git clone git://git.osmocom.org/osmocom-bb.git trx
cd trx/
git checkout jolly/testing
cd src/ # 需要 TX 功能支持
# 取消target/firmware/Makefile代码中'CFLAGS += -DCONFIG_TX_ENABLE' 前边的注释
# 并在make时启用transceiver功能支持
make HOST_layer23_CONFARGS=--enable-transceiver
2.3 安装依赖包
sudo apt-get install sqlite3 libdbi-dev libdbd-sqlite3 libsctp-dev
2.4 编译 Ortp
wget http://download.savannah.gnu.org/releases/linphone/ortp/sources/ortp-0.22.0.tar.gz
tar -xvf ortp-0.22..tar.gz
cd ortp-0.22./
./configure
make
sudo make install
sudo ldconfig
cd ..
2.5 编译libosmo-abis
git clone git://git.osmocom.org/libosmo-abis.git
cd libosmo-abis
autoreconf -i
./configure
make
sudo make install
sudo ldconfig
cd ..
2.6 编译libosmo-netif
git clone git://git.osmocom.org/libosmo-netif.git
cd libosmo-netif/
autoreconf -i
./configure
make
sudo make install
sudo ldconfig
cd ..
2.7 编译openbsc
编译Openbsc时需用到PCAP库文件,编译前先搜索&安装依赖包:
apt-cache search PCAP
sudo pat-get install libpcap-dev libpcap0. libpcap0.-dbg libpcap0.-dev
sudo ldconfig git clone git://git.osmocom.org/openbsc.git
cd openbsc/openbsc/
autoreconf -i
./configure
make
sudo make install
cd ../..
git clone git://git.osmocom.org/openbsc.git
cd openbsc/openbsc/
autoreconf -i
./configure
make
sudo make install
cd ../..
2.8 编译osmo-bts
git clone git://git.osmocom.org/osmo-bts.git
cd osmo-bts
autoreconf -i
./configure --enable-trx
make
sudo make install
cd ..
2.9 创建OpenBSC配置文件
#如果配置文件不存在需要先创建 Create the configuration folder if it isn't exist yet
mkdir ~/.osmocom
cd ~/.osmocom
touch ~/.osmocom/open-bsc.cfg
touch ~/.osmocom/osmo-bts.cfg
0x03 源码编译Cellular Infrastructure
3.1 克隆源码
git clone git://git.osmocom.org/libosmocore
git clone git://git.osmocom.org/libosmo-abis
git clone git://git.osmocom.org/openbsc
git clone git://git.osmocom.org/libosmo-netif
git clone git://git.osmocom.org/libosmo-sccp
git clone git://git.osmocom.org/libsmpp34
git clone git://git.osmocom.org/openggsn
3.2 下载&执行自动编译脚本
wget https://osmocom.org/attachments/download/2438/build_2G.sh
chmod build_2G.sh
sudo bash build_2G.sh
0x04 配置OpenBSC
4.1 启动BTS
终端1:
osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM
终端2:
telnet localhost

4.2 配置IP
PC
IP:192.168.31.147 (通过WiFi连接)
路由器
IP:192.168.31.1
3G Access Point
IP:未知
方法1:进入路由后台,查找3G Access Point IP

方法2:通过abissip-find找到3G Access Point IP
cd openbsc/openbsc/src/ipaccess
#or
cd openbsc/openbsc/build-2G/src/ipaccess sudo ./abisip-find

4.3 Telnet连入3G Access Point
telnet 3G Access Point's IP 8090

4.4 SSH连入
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.31.136
password:newsys

ipaccess-config
init3@0xroot:~/osm/openbsc/openbsc/src/ipaccess$ ./ipaccess-config --help
ipaccess-config (C) - by Harald Welte and others
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY Usage: ipaccess-config IP_OF_BTS
Commands for writing to the BTS:
-u --unit-id UNIT_ID Set the Unit ID of the BTS
-o --oml-ip IP Set primary OML IP (IP of your BSC)
-i --ip-address IP/MASK Set static IP address + netmask of BTS
-g --ip-gateway IP Set static IP gateway of BTS
-r --restart Restart the BTS (after other operations)
-n --nvram-flags FLAGS/MASK Set NVRAM attributes
-S --nvattr-set FLAG Set one additional NVRAM attribute
-U --nvattr-unset FLAG Set one additional NVRAM attribute
-l --listen TESTNR Perform specified test number
-L --Listen TEST_NAME Perform specified test
-s --stream-id ID Set the IPA Stream Identifier for OML
-d --software FIRMWARE Download firmware into BTS Miscellaneous commands:
-h --help this text
-H --HELP Print parameter details.
-f --firmware FIRMWARE Provide firmware information
-w --write-firmware This will dump the firmware parts to the filesystem. Use with -f.
-p --loop Loop the tests executed with the --listen command.
ipaccess-proxy
init3@0xroot:~/osm/openbsc/openbsc/src/ipaccess$ ./ipaccess-proxy --help
Usage: ipaccess-proxy [options]
ipaccess-proxy is a proxy BTS.
-h --help. This help text.
-l --listen IP. The ip to listen to.
-b --bsc IP. The BSC IP address.
-g --gprs IP. Take GPRS NS from that IP. -s --disable-color. Disable the color inside the logging message.
-e --log-level number. Set the global loglevel.
-T --timestamp. Prefix every log message with a timestamp.
-V --version. Print the version of OpenBSC.
0x05 Reference
https://osmocom.org/projects/cellular-infrastructure/wiki/Build_from_Source
http://osmocom.org/projects/baseband/wiki/CalypsoBTS
https://osmocom.org/projects/cellular-infrastructure/wiki/Getting_Started_with_3G
https://osmocom.org/projects/osmocscn/wiki/Osmocom_3G_-_Getting_Started/3
https://osmocom.org/projects/cellular-infrastructure/wiki/Configuring_the_ipaccess_nano3G
原文链接:https://cn0xroot.com/2017/04/11/getting-started-with-3g-ip-access-nano3gopenbscosmocom-bb-part-1/
Getting started with 3G | ip.access nano3G+OpenBSC+Osmocom-bb Part 1的更多相关文章
- AFNetworking 原作者都无法解决的问题: 如何使用ip直接访问https网站?
背景 最近App似乎有报异常是DNS无法解析,尝试解决此问题.搜集到的资料很少,甚至连AFN原作者都判定这可能是一个无解的问题,参见: https://github.com/AFNetworking/ ...
- iOS开发:获取设备IP地址
一.导入头文件 //首先导入头文件信息 #include <ifaddrs.h> #include <arpa/inet.h> #include <net/if.h> ...
- 使用Python 统计nginx日志前十ip访问量并以柱状图显示
脚本内容: import matplotlib.pyplot as plt # nginx_file = '10.6.11.91_access.log-2018-12-27' ip = {} #筛选n ...
- 访问控制技术- 标准IP访问列表
1.设置pc IP 网关 192.168.1.1 192.168.1.254 192.168.1.2 192.168.1.254 192.168.3.1 192.168.3.254 2.设置交换机借 ...
- ccna 闫辉单臂路由 和 acl access control list
ccna 闫辉单臂路由 和 acl access control list 一单臂路由 当前园区网设计很少用到 成本低 小型的.局域网可用 二ACL acc ...
- iptables脚本封ip
##自动封IP:分析web或应用日志或者网络连接状态封掉垃圾IP #!/bin/sh /bin/netstat -na|grep ESTABLISHED|awk |grep -v -E '192.16 ...
- Java分布式IP限流和防止恶意IP攻击方案
前言 限流是分布式系统设计中经常提到的概念,在某些要求不严格的场景下,使用Guava RateLimiter就可以满足.但是Guava RateLimiter只能应用于单进程,多进程间协同控制便无能为 ...
- DNS服务器安全---通过ipset对DNS异常解析流量的源IP地址进行管控
ipset介绍 ipset是iptables的扩展,它允许你创建 匹配整个地址集合的规则.而不像普通的iptables链只能单IP匹配, ip集合存储在带索引的数据结构中,这种结构即时集合比较大也可以 ...
- MySQL+Amoeba实现数据库主从复制和读写分离
MySQL读写分离是在主从复制的基础上进一步通过在master上执行写操作,在slave上执行读操作来实现的.通过主从复制,master上的数据改动能够同步到slave上,从而保持了数据的一致性.实现 ...
随机推荐
- 20165309 技能学习经验与C语言
技能学习经验与C语言 技能学习经验 你有什么技能比大多人(超过90%以上)更好?针对这个技能的获取你有什么成功的经验?与老师博客中的学习经验有什么共通之处? 从小到大,或是出于兴趣.或是出于父母的要求 ...
- STLC - 软件测试生命周期
什么是软件测试生命周期(STLC)? 软件测试生命周期(STLC)定义为执行软件测试的一系列活动. 它包含一系列在方法上进行的活动,以帮助认证您的软件产品. 图 - 软件测试生命周期的不同阶段 每个阶 ...
- HTML(form标签)、CSS选择器一
一.表单标签<form> 功能:表单用于向服务器传输数据,从而实现用户与Web服务器的交互. 表单能够包含input系列标签,比如文本字段.复选框.单选框.提交按钮等等. 表单还可以包含t ...
- python-day76--django-Form组件
django中Form组件 1. 用户请求数据验证 2. 自动生成错误信息 3. 打包用户提交正确信息 4. 错误:保留上次输入内容 5. 定制页面上显示的HTML标签 引入: from django ...
- MySql从一窍不通到入门(五)Sharding:分表、分库、分片和分区
转载:用sharding技术来扩展你的数据库(一)sharding 介绍 转载:MySQL架构方案 - Scale Out & Scale Up. 转载: 数据表分区策略及实现(一) 转载:M ...
- lua中的逻辑运算符
逻辑运算符也是3个,and,or,not,只是不是返回false和true,只有false和nil表示假,其他的都是真 and and使用短路运算,a and b,如果a为假,结果已经定了,返回a假, ...
- 64位Ubuntu下配置CP-ABE环境
CP-ABE环境配置 本文密码学专业,论文仿真需要CP-ABE,现将配置过程作个记录 cpabe依赖pbc,pbc依赖gmp,gmp依赖M4.bison.flex,所以.. sudo apt-get ...
- Vue为v-html中标签添加CSS样式
在最近的vue项目中遇到的问题:v-html渲染的富文本,无法在样式表中修改样式: <template> <div class="msgHtmlBox" v-ht ...
- spring boot整合shiro后,部分注解(Cache缓存、Transaction事务等)失效的问题
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/elonpage/article/details/78965176 前言 整合有缓存.事务的sprin ...
- laravel在控制器中动态创建数据表
Schema::connection('usertable')->create('test', function ($table) { $table->increments('id'); ...