Difference between revisions of "OpenBTS: RangeNetwork Compile OpenBTS 4.0"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(19 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
** password openbts | ** password openbts | ||
− | * Ada sambungkan ke [[Internet]] untuk men-download [[source code]]. Pastikan sambungan tersebut '''KENCENG / NGEBUT''' :) | + | * 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 | * Instalasi aplikasi pendukung | ||
Line 18: | Line 20: | ||
libsys-hostname-long-perl libunistring0 dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext \ | libsys-hostname-long-perl libunistring0 dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext \ | ||
html2text intltool-debian dh-translations intltool libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \ | html2text intltool-debian dh-translations intltool libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \ | ||
− | libodbc1 odbcinst odbcinst1debian2 unixodbc-dev | + | libodbc1 odbcinst odbcinst1debian2 unixodbc-dev git bind9 ntp |
==Update Git== | ==Update Git== | ||
Line 88: | Line 90: | ||
$ ./switchto.sh 5.0 | $ ./switchto.sh 5.0 | ||
− | + | Setelah memilih branch yang ingin di compile (sebaiknya pilih master), lakukan build | |
$ ./build.sh | $ ./build.sh | ||
+ | |||
+ | 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. | Packages yang berhasil di compile ada di directory BUILD-sometimestamp. | ||
==Install== | ==Install== | ||
+ | |||
+ | Instalasi aplikasi pendukung | ||
+ | |||
+ | sudo apt-get install bind9 ntp | ||
Gunakan dpkg untuk menginstalasi package (ini akan complain depedencies): | Gunakan dpkg untuk menginstalasi package (ini akan complain depedencies): | ||
− | + | sudo dpkg -i BUILD-timestamp/*.deb | |
Gunakan aptitude untuk mengatasi masalah dependencies | 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. | Jika di tanya tentang overwrite file konfigurasi, anda harus menentukan. Sangat disarankan untuk overwrite semua file konfigurasi agar jalan dengan baik. | ||
− | |||
==Edit interfaces== | ==Edit interfaces== | ||
Line 143: | Line 150: | ||
network 192.168.0.0 | network 192.168.0.0 | ||
broadcast 192.168.0.255 | 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 | ||
+ | |||
+ | start sipauthserve | ||
+ | sleep 5 | ||
+ | start smqueue | ||
+ | sleep 5 | ||
+ | start openbts | ||
+ | sleep 5 | ||
+ | start asterisk | ||
+ | |||
+ | ===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== | ==Running== | ||
Line 159: | Line 253: | ||
sudo stop openbts | sudo stop openbts | ||
sudo stop asterisk | sudo stop asterisk | ||
+ | |||
+ | |||
+ | ==Debugging== | ||
+ | |||
+ | Cek | ||
+ | |||
+ | tail /var/log/syslog | ||
==Referensi== | ==Referensi== | ||
Line 164: | Line 265: | ||
* https://github.com/RangeNetworks/dev/wiki | * https://github.com/RangeNetworks/dev/wiki | ||
* https://help.github.com/articles/generating-ssh-keys | * https://help.github.com/articles/generating-ssh-keys | ||
− | + | * https://wush.net/trac/rangepublic/attachment/wiki/WikiStart/OpenBTS-4.0-Manual.pdf | |
==Pranala Menarik== | ==Pranala Menarik== | ||
* [[Git: compile dari source code]] | * [[Git: compile dari source code]] |
Latest revision as of 10:56, 25 July 2014
Sumber: https://github.com/RangeNetworks/dev/wiki
Persiapan Environment
* Siapkan Ubuntu Desktop / Server 32 bit 12.04. Jangan menggunakan 12.04.1 bermasalah dengan repository-nya nanti.
- 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-get install m4 autoconf autotools-dev automake libsqlite3-dev sqlite3 libssl-dev libssl-doc zlib1g-dev \ build-essential dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext html2text intltool-debian libalgorithm-diff-perl \ libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libgettextpo0 libmail-sendmail-perl libstdc++6-4.6-dev \ libsys-hostname-long-perl libunistring0 dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext \ html2text intltool-debian dh-translations intltool libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \ libodbc1 odbcinst odbcinst1debian2 unixodbc-dev git bind9 ntp
Update Git
Pastikan menggunakan git versi terakhir. Edit
vi /etc/apt/sources.list
Tambahkan
deb http://ppa.launchpad.net/git-core/ppa/ubuntu precise main
Lakukan
sudo apt-get update sudo apt-get install git
Download Tool
Check versi git, misalnya
git --version
hasilnya pastikan >1.8.2
git version 2.0.2
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
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.
cd /usr/local/src cd 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 4.0
atau
$ ./switchto.sh v4.0.0
atau
$ ./switchto.sh 5.0
Setelah memilih branch yang ingin di compile (sebaiknya pilih master), lakukan build
$ ./build.sh
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
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
start sipauthserve sleep 5 start smqueue sleep 5 start openbts sleep 5 start asterisk
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 semua layanan yang dibutuhkan jalankan perintah berikut:
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
Debugging
Cek
tail /var/log/syslog
Referensi
- https://github.com/RangeNetworks/dev/wiki
- https://help.github.com/articles/generating-ssh-keys
- https://wush.net/trac/rangepublic/attachment/wiki/WikiStart/OpenBTS-4.0-Manual.pdf