Difference between revisions of "OpenBTS: Build OpenBTS 5.0 di RaspberryPi Ubuntu 20.04 32bit"

From OnnoWiki
Jump to: navigation, search
(Persiapan Environment)
(Build)
 
(12 intermediate revisions by the same user not shown)
Line 39: Line 39:
 
  sudo apt -y install m4 autoconf autotools-dev automake libsqlite3-dev sqlite3 libssl-dev libssl-doc zlib1g-dev \
 
  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 \
 
  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++6-4.7-dev \
+
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libgettextpo0 libmail-sendmail-perl libstdc++6 \
  libsys-hostname-long-perl libunistring0 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 libxml-parser-perl scour libsqlite0 libsqlite0-dev \
  libodbc1 odbcinst odbcinst1debian2 unixodbc-dev python-software-properties ntp ntpdate bind9 upstart
+
  libodbc1 odbcinst odbcinst1debian2 unixodbc-dev ntp ntpdate bind9  
  
==Update Git==
+
sudo apt-get install software-properties-common git-core git
 +
sudo apt --fix-broken install python-pycurl python-apt
  
Pastikan menggunakan git versi terakhir
+
  libunistring0 python-software-properties upstart
 
+
  sudo add-apt-repository ppa:git-core/ppa
+
sudo apt-get update
+
sudo apt-get install git
+
  
 
==Download Tool==
 
==Download Tool==
Line 87: Line 84:
 
  ./switchto.sh 4.0
 
  ./switchto.sh 4.0
 
  ./switchto.sh 5.0
 
  ./switchto.sh 5.0
 +
 +
Agar cocok dengan Ubuntu 20.04, perbaiki/update build.sh
 +
 +
vi build.sh
 +
 +
Edit
 +
 +
# installIfMissing python-software-properties
 +
installIfMissing libortp13
 +
installIfMissing libsrtp2-1
 +
installIfMissing libsrtp2-dev
 +
installIfMissing python3-zmq
  
 
Untuk RangeNetworks RAD1 Lakukan
 
Untuk RangeNetworks RAD1 Lakukan
Line 104: Line 113:
 
  N200
 
  N200
 
  N210
 
  N210
 +
 +
 +
'''ERROR:''''
 +
 +
# Add here commands to clean up after the build process.
 +
/usr/bin/make distclean
 +
make[1]: Entering directory '/usr/local/src/dev/libcoredumper/coredumper-1.2.1'
 +
make[1]: *** No rule to make target 'distclean'.  Stop.
 +
make[1]: Leaving directory '/usr/local/src/dev/libcoredumper/coredumper-1.2.1'
 +
make: [debian/rules:59: clean] Error 2 (ignored)
 +
cp -f /usr/share/misc/config.sub config.sub
 +
cp -f /usr/share/misc/config.guess config.guess
 +
dh_clean
 +
dh_clean: error: Compatibility levels before 5 are no longer supported (level 4 requested)
 +
make: *** [debian/rules:62: clean] Error 255
 +
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2
 +
ERROR: command failed!
 +
# ERROR: command failed!
 +
  
 
Packages yang berhasil di compile ada di
 
Packages yang berhasil di compile ada di

Latest revision as of 16:56, 30 June 2020

Sumber:


Persiapan Environment

* Siapkan Ubuntu Server 32 bit 20.04.

  • Ubuntu Server dapat di instalasi di USB harddisk 8Gbyte! akan habis sekitar 2-3 Gbyte saja untuk OpenBTS.
    • SSH terinstalasi & beroperasi
    • username ubuntu
    • password ubuntu
  • Disable IPv6 (untuk memudahkan)
vi /etc/sysctl.conf
set
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Jalankan
sudo sysctl -p
  • set locale
sudo locale-gen id_ID.UTF-8
  • 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++6 \
libsys-hostname-long-perl  dh-apparmor dpkg-dev fakeroot g++ gettext \
html2text intltool-debian dh-translations intltool libxml-parser-perl scour libsqlite0 libsqlite0-dev \
libodbc1 odbcinst odbcinst1debian2 unixodbc-dev  ntp ntpdate bind9 
sudo apt-get install software-properties-common git-core git
sudo apt --fix-broken install python-pycurl python-apt
libunistring0 python-software-properties upstart

Download Tool

Check versi git, misalnya

git --version

hasilnya pastikan >1.8.2, misalnya,

git version 2.11.0

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/dev
./clone.sh

Build

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


./switchto.sh master
./switchto.sh 4.0
./switchto.sh 5.0

Agar cocok dengan Ubuntu 20.04, perbaiki/update build.sh

vi build.sh

Edit

# installIfMissing python-software-properties
installIfMissing libortp13
installIfMissing libsrtp2-1
installIfMissing libsrtp2-dev
installIfMissing python3-zmq

Untuk RangeNetworks RAD1 Lakukan

./build.sh SDR1


Pilihan selain SDR1 adalah,

SDR1
RAD1
USRP1
B100
B110
B200
B210
N200
N210


ERROR:'

# Add here commands to clean up after the build process.
/usr/bin/make distclean
make[1]: Entering directory '/usr/local/src/dev/libcoredumper/coredumper-1.2.1'
make[1]: *** No rule to make target 'distclean'.  Stop.
make[1]: Leaving directory '/usr/local/src/dev/libcoredumper/coredumper-1.2.1'
make: [debian/rules:59: clean] Error 2 (ignored)
cp -f /usr/share/misc/config.sub config.sub
cp -f /usr/share/misc/config.guess config.guess
dh_clean 
dh_clean: error: Compatibility levels before 5 are no longer supported (level 4 requested)
make: *** [debian/rules:62: clean] Error 255
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2
ERROR: command failed!
# ERROR: command failed!


Packages yang berhasil di compile ada di

BUILDS/tanggal-jam-menit-detik/
BUILDS/2017-04-07--17-25-20

Install

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

sudo dpkg -i BUILDS/2016-02-16--09-54-03/*.deb

atau

cd /usr/local/src/dev/BUILDS/2016-02-16--09-54-03/
dpkg -i *.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.

Overwrite /etc/network/interfaces akan menset menjadi sebuah IP statik yang berbeda dari yang sebelumnya.


Folder penting

Cek

/OpenBTS
/etc/OpenBTS/


Hack Sedikit

mkdir -p /usr/lib/x86_64-linux-gnu/odbc/
cp -Rf /usr/lib/i386-linux-gnu/odbc/* /usr/lib/x86_64-linux-gnu/odbc/

Running

Untuk menjalankan

cd /usr/local/sbin
./sipauthserve &
./smqueue &
asterisk &
cd /OpenBTS/
./OpenBTS &


Bisa di cek kalau jalan

ps ax

hasilnya kira-kira

2485 pts/0    Sl     0:00 ./sipauthserve
2493 pts/0    Sl     0:00 ./smqueue
2750 ?        Ssl    0:00 asterisk
2786 pts/0    Sl     0:00 ./OpenBTS
2798 pts/0    Sl     0:00 ./transceiver 1

Dan akan keluar prompt

system ready

1491560240.165161 3071260416: 
use the OpenBTSCLI utility to access CLI

1491560240.165723 3071260416: OpenBTSCLI network socket support for tcp:49300

OpenBTS> 


Harusnya bisa lebih manusiawi, entah kenapa tidak jalan,

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

Referensi

Pranala Menarik