Difference between revisions of "OpenBTS: RangeNetwork Compile OpenBTS 5.0"

From OnnoWiki
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 20: Line 20:
 
  html2text intltool-debian libalgorithm-diff-perl \
 
  html2text intltool-debian libalgorithm-diff-perl \
 
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl \
 
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl \
  libgettextpo0 libmail-sendmail-perl libstdc++-6-dev \
+
  libgettextpo0 libmail-sendmail-perl libstdc++-5-dev \
 
  libsys-hostname-long-perl dh-apparmor dpkg-dev fakeroot g++ gettext \
 
  libsys-hostname-long-perl dh-apparmor dpkg-dev fakeroot g++ gettext \
  html2text intltool-debian dh-translations intltool libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \
+
  html2text intltool-debian dh-translations intltool \
  libodbc1 odbcinst odbcinst1debian2 unixodbc-dev git bind9 ntp
+
libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \
 +
  libodbc1 odbcinst odbcinst1debian2 unixodbc-dev git bind9 ntp ntpdate upstart
  
 
==Update Git==
 
==Update Git==
Line 34: Line 35:
 
Tambahkan
 
Tambahkan
  
  deb http://ppa.launchpad.net/git-core/ppa/ubuntu precise main
+
  deb http://ppa.launchpad.net/git-core/ppa/ubuntu xenial main
  
 
Lakukan
 
Lakukan
  
  sudo apt-get update
+
 
  sudo apt-get install git
+
  sudo add-apt-repository ppa:git-core/ppa
 +
sudo apt update
 +
  sudo apt -y install git
  
 
==Download Tool==
 
==Download Tool==
  
Check versi git, misalnya
+
Check versi git (pastikan > 1.8.2), misalnya
  
 
  git --version
 
  git --version
  
hasilnya pastikan >1.8.2
+
  git version 2.21.0
 
 
  git version 2.17.1
 
  
 
Alternatif lain, compile git dari [[source code]] menggunakan cara
 
Alternatif lain, compile git dari [[source code]] menggunakan cara
Line 64: Line 65:
 
==Download Source Code==
 
==Download Source Code==
  
Proses download [[source code]] menggunakan SSH secara automatis login. Ini hanya bisa dilakukan jika kita sudah
+
Pada masa lalu, proses download [[source code]] menggunakan SSH secara automatis login. Ini hanya bisa dilakukan jika kita sudah [[OpenBTS: Generating SSH Key untuk GitHub | generate SSH key untuk GitHub]].  
[[OpenBTS: Generating SSH Key untuk GitHub | generate SSH key untuk GitHub]].  
 
 
Lakukan [[OpenBTS: Generating SSH Key untuk GitHub | generate SSH key untuk GitHub]] sebelum melakukan perintah di bawah ini.
 
Lakukan [[OpenBTS: Generating SSH Key untuk GitHub | generate SSH key untuk GitHub]] sebelum melakukan perintah di bawah ini.
  
 +
Saat ini, kita bisa download secara automatis tanpa perlu setup sshkey untuk github,
  
  cd /usr/local/src
+
  cd /usr/local/src/dev
cd dev
 
 
  ./clone.sh
 
  ./clone.sh
  
Line 79: Line 79:
  
 
  $ ./switchto.sh master
 
  $ ./switchto.sh master
 
atau
 
 
$ ./switchto.sh 4.0
 
 
atau
 
 
$ ./switchto.sh v4.0.0
 
  
 
atau
 
atau
Line 94: Line 86:
 
Setelah memilih branch yang ingin di compile (sebaiknya pilih master), lakukan build
 
Setelah memilih branch yang ingin di compile (sebaiknya pilih master), lakukan build
  
  $ ./build.sh
+
  $ ./build.sh SDR1
  
 
Proses build akan memakan waktu lumayan lama & akan mendownload banyak source code dari [[Internet]]. Pastikan sambungan [[Internet]] anda benar-benar joss.
 
Proses build akan memakan waktu lumayan lama & akan mendownload banyak source code dari [[Internet]]. Pastikan sambungan [[Internet]] anda benar-benar joss.
Line 104: Line 96:
 
Instalasi aplikasi pendukung
 
Instalasi aplikasi pendukung
  
  sudo apt-get install bind9 ntp
+
  sudo apt-get install bind9 ntp ntpdate
  
 
Gunakan dpkg untuk menginstalasi package (ini akan complain depedencies):
 
Gunakan dpkg untuk menginstalasi package (ini akan complain depedencies):
Line 174: Line 166:
 
tambahkan sebelum exit
 
tambahkan sebelum exit
  
  start sipauthserve
+
  /usr/sbin/asterisk &
  sleep 5
+
  cd /OpenBTS
  start smqueue
+
  ./sipauthserve &
 
  sleep 5
 
  sleep 5
  start openbts
+
  ./smqueue &
 
  sleep 5
 
  sleep 5
  start asterisk
+
  ./OpenBTS &
  
 
===open regitration & test===
 
===open regitration & test===
Line 242: Line 234:
 
==Running==
 
==Running==
  
Untuk menjalankan semua layanan yang dibutuhkan jalankan perintah berikut:
+
Untuk menjalankan
  
sudo start sipauthserve
 
sudo start smqueue
 
sudo start openbts
 
sudo start asterisk
 
 
Untuk men-stop jalankan perintah:
 
 
sudo stop sipauthserve
 
sudo stop smqueue
 
sudo stop openbts
 
sudo stop asterisk
 
  
 +
/usr/sbin/asterisk &
 +
cd /OpenBTS
 +
./sipauthserve &
 +
sleep 5
 +
./smqueue &
 +
sleep 5
 +
./OpenBTS &
  
 
==Debugging==
 
==Debugging==
Line 272: Line 260:
  
 
* [[Git: compile dari source code]]
 
* [[Git: compile dari source code]]
`
+
* [[OpenBTS: 5.0 demo konfigurasi]]

Latest revision as of 10:37, 8 May 2019

Sumber: https://github.com/RangeNetworks/dev/wiki


Persiapan Environment

* Siapkan Ubuntu Desktop / Server 32 bit 16.04

    • SSH terinstalasi & beroperasi
    • username openbts
    • password openbts
  • Ada sambungkan ke Internet untuk men-download source code. Pastikan sambungan tersebut KENCENG / NGEBUT :) ... 1-2Mbps OK
  • Sebaiknya IP address yang digunakan 192.168.0.21 & 192.168.0.22
  • Instalasi aplikasi pendukung
sudo apt -y install m4 autoconf autotools-dev automake libsqlite3-dev \
sqlite3 libssl-dev libssl-doc zlib1g-dev \
build-essential dh-apparmor dpkg-dev fakeroot g++ gettext \
html2text intltool-debian libalgorithm-diff-perl \
libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl \
libgettextpo0 libmail-sendmail-perl libstdc++-5-dev  \
libsys-hostname-long-perl dh-apparmor dpkg-dev fakeroot g++ gettext \
html2text intltool-debian dh-translations intltool \
libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \
libodbc1 odbcinst odbcinst1debian2 unixodbc-dev git bind9 ntp ntpdate upstart

Update Git

Pastikan menggunakan git versi terakhir. Edit

vi /etc/apt/sources.list

Tambahkan

deb http://ppa.launchpad.net/git-core/ppa/ubuntu xenial main

Lakukan


sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt -y install git

Download Tool

Check versi git (pastikan > 1.8.2), misalnya

git --version
git version 2.21.0

Alternatif lain, compile git dari source code menggunakan cara


download tool development terbaru

rm -Rf /usr/local/src/dev
cd /usr/local/src
git clone https://github.com/RangeNetworks/dev.git

Download Source Code

Pada masa lalu, proses download source code menggunakan SSH secara automatis login. Ini hanya bisa dilakukan jika kita sudah generate SSH key untuk GitHub. Lakukan generate SSH key untuk GitHub sebelum melakukan perintah di bawah ini.

Saat ini, kita bisa download secara automatis tanpa perlu setup sshkey untuk github,

cd /usr/local/src/dev
./clone.sh

Build

Kita perlu memilih branch yang akan di compile menggunakan switchto.sh. Sebaiknya pilih branch MASTER terlebih dulu

$ ./switchto.sh master

atau

$ ./switchto.sh 5.0

Setelah memilih branch yang ingin di compile (sebaiknya pilih master), lakukan build

$ ./build.sh SDR1

Proses build akan memakan waktu lumayan lama & akan mendownload banyak source code dari Internet. Pastikan sambungan Internet anda benar-benar joss.

Packages yang berhasil di compile ada di directory BUILD-sometimestamp.

Install

Instalasi aplikasi pendukung

sudo apt-get install bind9 ntp ntpdate

Gunakan dpkg untuk menginstalasi package (ini akan complain depedencies):

sudo dpkg -i BUILD-timestamp/*.deb

Gunakan aptitude untuk mengatasi masalah dependencies

sudo apt-get -f install

Jika di tanya tentang overwrite file konfigurasi, anda harus menentukan. Sangat disarankan untuk overwrite semua file konfigurasi agar jalan dengan baik.

Edit interfaces

Edit file /etc/network/interfaces sesuaikan dengan jaringan anda. Isi default /etc/network/interfaces kira-kira sebagai berikut


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        pre-up iptables-restore < /etc/OpenBTS/iptables.rules
        address 192.168.0.22
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        # dns-* options are implemented by the resolvconf package, if installed
        # Please change this if you have DNS servers on your network, or
        # /etc/bind/named.conf.options if you want DNS caching functionality.
        dns-nameservers 192.168.0.22

# Please DO NOT EDIT THIS.
# You may lose access to your device if you edit this.
auto eth0:1
iface eth0:1 inet static
    name Console
    address 192.168.0.21
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255


hack

GSM.Handover.Noise.Factor

sqlite3 /etc/OpenBTS/OpenBTS.db

masukan

INSERT OR IGNORE INTO "CONFIG" VALUES('GSM.Handover.Noise.Factor',0,0,0,'hacked');
.exit


Tambah rc.local

Edit

vi /etc/rc.local

tambahkan sebelum exit

/usr/sbin/asterisk &
cd /OpenBTS
./sipauthserve &
sleep 5
./smqueue &
sleep 5
./OpenBTS &

open regitration & test

cd /OpenBTS/
./OpenBTSCLI
config Control.LUR.OpenRegistration .*

Lakukan

sudo su
sqlite3 /var/lib/asterisk/sqlite3dir/sqlite3.db

Pada prompt

sqlite>

Ketik

INSERT INTO dialdata_table (exten, dial) VALUES ('2001', 'IMSI001010000000001');
insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI001010000000001','IMSI001010000000001','2001','127.0.0.1','friend','phones','dynamic');

INSERT INTO dialdata_table (exten, dial) VALUES ('2002', 'IMSI001010000000002');
insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI001010000000002','IMSI001010000000002','2002','127.0.0.1','friend','phones','dynamic');

.exit


Untuk memperbaiki data (misalnya ID=1)

DELETE from SIP_BUDDIES where ID = 1;
DELETE from DIALDATA_TABLE where ID = 1;

audit parameter CLI OpenBTS

Menggunakan perintah "audit" di OpenBTSCLI lakukan

OpenBTS> audit
+---------------------------------------------------------------------+
| ERROR : Invalid Values [key current-value (default)]                |
|   To use the default value again, execute: rmconfig key             |
+---------------------------------------------------------------------+
Control.LUR.FailMode "ACCEPT" ("ACCEPT")
GSM.CCCH.BS_AG_BLKS_RES "auto" ("auto")
GSM.CCCH.BS_PA_MFRMS "2" ("2")
GSM.CallerID.Source "auto" ("auto")
NodeManager.API.PhysicalStatus "disabled" ("disabled")
SMS.MIMEType "application/vnd.3gpp.sms" ("application/vnd.3gpp.sms")


Remove semua error Value

rmconfig Control.LUR.FailMode
rmconfig GSM.CCCH.BS_AG_BLKS_RES
rmconfig GSM.CCCH.BS_PA_MFRMS
rmconfig GSM.CallerID.Source
rmconfig NodeManager.API.PhysicalStatus
rmconfig SMS.MIMEType

Running

Untuk menjalankan


/usr/sbin/asterisk &
cd /OpenBTS
./sipauthserve &
sleep 5
./smqueue &
sleep 5
./OpenBTS &

Debugging

Cek

tail /var/log/syslog

Referensi

Pranala Menarik