RF-exploring

3G CONNECT

# apt install composer phpunit
# gem update 
# cd
# git clone https://github.com/apache/thrift
# cd thrift
# ./bootstrap.sh
# ./configure
# make
# make install
# ldconfig

Add to /etc/apt/sources.list
deb http://deb.debian.org/debian unstable main contrib non-free

# apt update
# apt install gcc-5 g++-5
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 15
# update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 15
# update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 # update-alternatives --set cc /usr/bin/gcc # update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 # update-alternatives --set c++ /usr/bin/g++
# update-alternatives --config gcc
# update-alternatives --config g++

and choose gcc and g++ 5
OpenBTS-UMTS

# apt install libreadline7 libreadline-dev libosip2-dev libortp9 libortp-dev libzmq5 libzmq3-dev libtool-bin
# pip install zmq
# git clone https://github.com/RangeNetworks/OpenBTS-UMTS
# cd OpenBTS-UMTS # git submodule init
# git submodule update
# update-alternatives --config gcc
# update-alternatives --config g++

and choose gcc and g++ 5

# git clone https://github.com/RangeNetworks/libcoredumper
# cd libcoredumper
# ./build.sh
# cd coredumper-1.2.1
# autoreconf -i # ./configure # make -j4
# make install
# ldconfig
# tar zxvf asn1c-0.9.23.tar.gz
# cd vlm-asn1c-0959ffb/
# nano configure.ac

change
AM_INIT_AUTOMAKE=([-Wall -Werror foreign])
to
AM_INIT_AUTOMAKE=([-Wall foreign])

# autoreconf -i
# ./configure
# make -j4
# make install
# ldconfig
# cd ~/OpenBTS-UMTS
# git clone https://github.com/bbaranoff/OpBTS-LimeMini
# cd TransceiverUHD
# patch -p1 < ../OpBTS-LimeMini/OpBTS1.patch
# patch -p1 < ../OpBTS-LimeMini/OpBTS2.patch
# ./NodeManager/install_libzmq.sh
# ./autogen.sh
#./configure 
# make
# sudo make install

To setup OpenBTS-UMTS, we may need to modify the settings such as ARFCN, DNS, Firewall. Navigate to ~/OpenBTS-UMTS/apps folder and open OpenBTS-UMTS.example.sql file with the preferable text editor. You may need to edit following options:

  • ‘GGSN.DNS’ set to ‘8.8.8.8’ to enable Google DNS.
  • ‘GGSN.Firewall.Enable’ set to ‘0’ to disable Firewall.
  • ‘UMTS.Radio.Band’ – set the band you are going to use. Select from 850, 900, 1700, 1800, 1900 or 2100.
  • ‘UMTS.Radio.C0’ – set the UARFCN. Range of valid values depend upon the selected operating band. Please, ensure that you are using free operating band.
  • 'UMTS.Radio.RxGain' "35" To avoid Overpower

Now, we need to create folders and working database:

# mkdir /var/log/OpenBTS-UMTS
# cd /etc/OpenBTS
# sqlite3 /etc/OpenBTS/OpenBTS-UMTS.db “.read OpenBTS-UMTS.example.sql”
# cp TransceiverUHD/transceiver ~/OpenBTS-UMTS/ 
# cp TransceiverUHD/transceiver apps

We also need to setup forwarding in iptables to properly forward data between devices, host machine, and the Internet:

# iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0
# echo 1 > /proc/sys/net/ipv4/ip_forward

If you have Internet connection through the another interface (for example, Wi-Fi), you need to change eth0 to the applicable one (i.e., wlan0). Please note, that you need to setup forwarding in iptables every time after you computer rebooted.
It’s important to install Subscriber Registry API and SIP Authentication Server to be able to launch OpenBTS-UMTS. Subscriber Registry controls database of subscriber information and in fact works as HLR (Home Location Registry):

# git clone https://github.com/RangeNetworks/subscriberRegistry.git
# cd subscriberRegistry
# git submodule init
# git submodule update
# autoreconf -i
# ./configure
# make
# make install
# mkdir /var/lib/asterisk/ # mkdir /var/lib/asterisk/sqlite3dir/
# cp apps/comp128 ~/OpenBTS-UMTS/
# cp apps/comp128 ~/OpenBTS-UMTS/apps/
# cp apps/comp128 /OpenBTS

RUNNING !!!

# cd ~/OpenBTS-UMTS/apps
# ./OpenBTS-UMTS
# cd subscriberRegistry/apps
# ./sipauthserve

To add the subscriber to the registry, you need to know IMSI and K_i value of your programmable SIM card. There are two common ways to get the values. The only way to use SIMs from another provider is to obtain the K_i through a roaming interface to the provider’s HLR/HSS. The second way is to buy test SIM-card and flash it using the programmer and pysim utility (http://cgit.osmocom.org/pysim/). Navigate to ~/subscriberRegistry/NodeManager/ and execute:

# git clone https://github.com/osmocom/pySim
# cd  pySim
# apt-get install python-pyscard python-serial python-pip
# pip install pytlv
# ./pySim-prog.py -j 0

Name : Magic
> SMSP : e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
> ICCID : 8901901550000000005
> MCC/MNC : 901/55
> IMSI : 901550000000000
> Ki : bef0ba3847947b0a6fdd5bee6759931a
> OPC : 62d77be45c4cc0636a19a870f20b228b
> ACC : None

(# sudo ./nmcli.py sipauthserve subscribers create “name” imsi msisdn ki
Values imsi, msisdn and ki should be taken from your SIM-card.)

# python2.7 ./nmcli.py sipauthserve subscribers create "Magic" IMSI901550000000000 1234567 bef0ba3847947b0a6fdd5bee6759931a

Now, connect your phone to the network and test 3G. That’s it!
When the connection realise you should see this


EDIT FOR AT THIS TIME PHONE CONNECT AND WITH AN APN THINGS HAPPEN BUT NO DATA AND THIS ERROR PLEASE COMMENT IF YOU HAVE A SOLUTION
OpenBTS-UMTS: TurboCoder.cpp:452: TurboInterleaver::TurboInterleaver(int): Assertion `K >= 40 && K <= 5114′ failed.
Abandon
Exit mobile version