Difference between revisions of "OpenBTS: 2.8 dari SVN Install"

From OnnoWiki
Jump to navigation Jump to search
 
(86 intermediate revisions by the same user not shown)
Line 1: Line 1:
* [[GNURadio: Ubuntu 11.10 Install | Compile dan Install GNURadio]]. Tanpa [[GNURadio]] terinstall maka [[OpenBTS]] tidak mungkin di instalasi.
+
==Prasyarat==
 +
 
 +
* [[GNURadio: Ubuntu 11.10 Instal GNURadio 3.4.2 | Compile dan Install GNURadio 3.4.2]]. Tanpa [[GNURadio]] terinstall maka [[OpenBTS]] tidak mungkin di instalasi.
 +
* Perhatikan max. GNURadio 3.4.2 yang masih membuat libusrp.
 +
 
  
 
==Instalasi Paket Pendukung dan Asterisk==
 
==Instalasi Paket Pendukung dan Asterisk==
Line 7: Line 11:
 
  sudo apt-get install autoconf libtool libosip2-dev libortp-dev \
 
  sudo apt-get install autoconf libtool libosip2-dev libortp-dev \
 
  libusb-1.0-0-dev g++ sqlite3 libsqlite3-dev erlang \
 
  libusb-1.0-0-dev g++ sqlite3 libsqlite3-dev erlang \
  asterisk asterisk-mysql
+
  asterisk asterisk-mysql cmake
 +
 
 +
Load [[GNURadio]]
 +
 
 +
sudo ldconfig
 +
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
 +
 
 +
Cek apakah [[USRP]] [[GNURadio]] terinstalasi dengan baik menggunakan
 +
 
 +
pkg-config --cflags usrp
 +
 
 +
Harus keluar informasi, misalnya,
 +
 
 +
-I/usr/local/include
 +
 
 +
Jika tidak maka instalasi [[GNURadio]] gagal. Cara yang tampaknya baik bisa di baca di [[GNURadio: Ubuntu 11.10 Instal GNURadio 3.3.0 | Instalasi GNURadio 3.3.0 di Ubuntu 11.10]]
  
 
==Download Source Code OpenBTS via SVN==
 
==Download Source Code OpenBTS via SVN==
Line 14: Line 33:
 
  cd /usr/local/src
 
  cd /usr/local/src
 
  svn co http://wush.net/svn/range/software/public openbts
 
  svn co http://wush.net/svn/range/software/public openbts
 +
 +
==Hacking Source Code 2.8.0 untuk Clock 64MHz==
 +
 +
===Edit Transceiver52M===
 +
 +
Untuk clock 64MHz nampaknya kia perlu menghack [[source code]] supaya menggunakan Clock 64MHz.
 +
 +
sudo su
 +
cd /usr/local/src/openbts/openbts/trunk/Transceiver52M
 +
 +
Edit file berikut & kalimat berikut
 +
 +
UHDDevice.cpp:  const double master_clk_rt = 52e6;
 +
USRPDevice.cpp: const double USRPDevice::masterClockRate = 52.0e6;
 +
USRPping.cpp:  RadioDevice *usrp = RadioDevice::make(52.0e6/192.0);
 +
 +
agar menjadi
 +
 +
UHDDevice.cpp:  const double master_clk_rt = 64e6;
 +
USRPDevice.cpp: const double USRPDevice::masterClockRate = 64.0e6;
 +
USRPping.cpp:  RadioDevice *usrp = RadioDevice::make(64.0e6/236.0);
 +
 +
===Edit TransceiverRAD1===
 +
 +
Ubah TransceiverRAD1
 +
 +
sudo su
 +
cd /usr/local/src/openbts/openbts/trunk/TransceiverRAD1
 +
 +
Edit file berikut & kalimat berikut
 +
 +
RAD1Device.cpp:const double RAD1Device::masterClockRate = (double) 52.0e6;
 +
RAD1ping.cpp:  RAD1Device *usrp = new RAD1Device(52.0e6/192.0);
 +
RAD1RxRawPower.cpp:  RAD1Device *rad1 = new RAD1Device(52.0e6/192.0);
 +
rnrad1Core.cpp:  mFpgaMasterClockFreq = 52000000;
 +
 +
Agar menjadi
 +
 +
RAD1Device.cpp:const double RAD1Device::masterClockRate = (double) 64.0e6;
 +
RAD1ping.cpp:  RAD1Device *usrp = new RAD1Device(64.0e6/236.0);
 +
RAD1RxRawPower.cpp:  RAD1Device *rad1 = new RAD1Device(64.0e6/236.0);
 +
rnrad1Core.cpp:  mFpgaMasterClockFreq = 64000000;
 +
 +
===Edit OpenBTS===
 +
 +
sudo su
 +
cd /usr/local/src/openbts/openbts/trunk/apps
 +
 +
Edit
 +
 +
vi OpenBTS.cpp
 +
 +
Edit
 +
 +
// Start the transceiver interface.
 +
// Sleep long enough for the USRP to bootload.
 +
sleep(5);
 +
 +
supaya menjadi
 +
 +
sleep(15);
  
 
==Install OpenBTS==
 
==Install OpenBTS==
  
Compile & Instalasi OpenBTS
+
Compile & Instalasi [[OpenBTS]]
  
 
  sudo su
 
  sudo su
 
  cd /usr/local/src/openbts/openbts/trunk
 
  cd /usr/local/src/openbts/openbts/trunk
 
  autoreconf -i
 
  autoreconf -i
  # ./configure --with-usrp1  # digunakan kalau kita pakai xtal 52MHz
+
  ./configure --with-usrp1               # '''*RECOMMENDED*''' untuk clock 52MHz, butuh libusrp
  ./configure
+
  ./configure --with-uhd                  # ''NOT RECOMMENDED''
 +
  ./configure --with-usrp1 --with-resamp  # untuk clock 64MHz, butuh libusrp
 
  make clean
 
  make clean
 
  make
 
  make
 
  make install
 
  make install
 +
cd /usr/local/src/openbts/openbts/trunk/apps
 +
ln -s ../Transceiver52M/transceiver
 +
cd /usr/local/src/openbts/openbts/trunk/
 +
sudo mkdir -p /usr/local/share/usrp/rev4/
 +
sudo cp Transceiver52M/std_inband.rbf /usr/local/share/usrp/rev4/
  
Instalasi Database Konfigurasi
+
Instalasi [[Database]] Konfigurasi [[OpenBTS]]
  
 
  cd /usr/local/src/openbts/openbts/trunk
 
  cd /usr/local/src/openbts/openbts/trunk
Line 35: Line 121:
 
  sudo sqlite3 -init ./apps/OpenBTS.example.sql /etc/OpenBTS/OpenBTS.db
 
  sudo sqlite3 -init ./apps/OpenBTS.example.sql /etc/OpenBTS/OpenBTS.db
 
  .exit
 
  .exit
 +
 +
Beberapa catatan minimal yang harus di set dari [[database]] [[OpenBTS]]
 +
 +
* GSM.Radio.Band - Set parameter ini untuk menentukan [[GSM]] band yang sesuai dengan [[hardware]] yang kita gunakan.
 +
* GSM.Radio.C0 - Ini adalah [[ARFCN]]. Set sesuai dengan band yang kita gunakan.
 +
* Control.LUR.OpenRegistration - Set menggunakan regular expression sesuai denan IMSI dari test phone. Parameter ini memberitahukan [[OpenBTS]] untuk tidak me-reject handset karena registration server di bawah tidak me-responds. Sehingga sangat bermanfaat untuk proses debugging dan inisialisasi sistem. Tentang regular expression dapat dibaca di http://en.wikipedia.org/wiki/Regular_expression
 +
 +
===Contoh Error Saat Compile OpenBTS===
 +
 +
Jika [[GNURadio]] tidak terinstalasi dengan baik akan keluar Error berikut
 +
 +
configure: error: Package requirements (usrp > 3.1) were not met:
 +
No package 'usrp' found
 +
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 +
installed software in a non-standard prefix.
 +
Alternatively, you may set the environment variables USRP_CFLAGS
 +
and USRP_LIBS to avoid the need to call pkg-config.
 +
See the pkg-config man page for more details.
 +
 +
Alternatif solusinya
 +
 +
# [[GNURadio: Ubuntu Install | Gunakan GNURADIO 3.3.0]]
 +
# Masukan PKG_CONFIG_PATH ke .bashrc
 +
 +
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  
 
==Instalasi Smqueue==
 
==Instalasi Smqueue==
  
Lakukan
+
Smqueue dapat di instalasi dengan melakukan langkah berikut
  
 
  cd /usr/local/src/openbts/smqueue/trunk
 
  cd /usr/local/src/openbts/smqueue/trunk
Line 47: Line 158:
 
  make install
 
  make install
  
Selanjutnya, inisialisasi konfigurasi database OpenBTS
+
Selanjutnya, inisialisasi konfigurasi [[database]] [[OpenBTS]]
  
 
  cd /usr/local/src/openbts/smqueue/trunk
 
  cd /usr/local/src/openbts/smqueue/trunk
Line 54: Line 165:
 
  .exit
 
  .exit
  
==Instalasi Subscriber Register==
+
==Instalasi Subscriber Registry==
  
 
Lakukan
 
Lakukan
  
  cd /usr/local/src/SR-P2.8.0
+
  cd /usr/local/src/openbts/subscriberRegistry/trunk/configFiles
  ./configure
+
sudo mkdir /var/lib/asterisk/
  make clean
+
sudo mkdir /var/lib/asterisk/sqlite3dir
  make
+
sudo sqlite3 -init subscriberRegistryInit.sql /var/lib/asterisk/sqlite3dir/sqlite3.db
  make install
+
.exit
 +
 
 +
Yang agak repot adalah menginstalasi Asterisk Real Time
 +
 
 +
Naga-naganya masih banyak sekali Error di template [[database]] subscriber registry :(
 +
 
 +
-- Loading resources from subscriberRegistryInit.sql
 +
Error: incomplete SQL: CREATE TABLE 'sip_buddies'
 +
(
 +
id                    integer,
 +
name                  VARCHAR(80) not null,
 +
context              VARCHAR(80),
 +
callingpres          VARCHAR(30) DEFAULT 'allowed_not_screened',
 +
deny                  VARCHAR(95),
 +
permit                VARCHAR(95),
 +
secret                VARCHAR(80),
 +
md5secret            VARCHAR(80),
 +
remotesecret          VARCHAR(250),
 +
transport            VARCHAR(10),
 +
host                  VARCHAR(31) not null,
 +
nat                  VARCHAR(5) DEFAULT 'no' not null,
 +
type                  VARCHAR(10) DEFAULT 'friend' not null,
 +
accountcode          VARCHAR(20),
 +
amaflags              VARCHAR(13),
 +
callgroup            VARCHAR(10),
 +
callerid              VARCHAR(80),
 +
defaultip            VARCHAR(40) DEFAULT '0.0.0.0',
 +
dtmfmode              VARCHAR(7) DEFAULT 'rfc2833',
 +
fromuser              VARCHAR(80),
 +
fromdomain            VARCHAR(80),
 +
insecure              VARCHAR(4),
 +
language              CHAR(2),
 +
mailbox              VARCHAR(50),
 +
pickupgroup          VARCHAR(10),
 +
qualify              CHAR(3),
 +
regexten              VARCHAR(80),
 +
rtptimeout            CHAR(3),
 +
rtpholdtimeout        CHAR(3),
 +
setvar                VARCHAR(100),
 +
disallow              VARCHAR(100) DEFAULT 'all',
 +
allow                VARCHAR(100) DEFAULT 'ulaw' not null,
 +
fullcontact          VARCHAR(80),
 +
ipaddr                VARCHAR(40),
 +
port                  int(5) DEFAULT 0,
 +
username              VARCHAR(80),
 +
defaultuser          VARCHAR(80),
 +
subscribecontext      VARCHAR(80),
 +
directmedia          VARCHAR(3),
 +
trustrpid            VARCHAR(3),
 +
sendrpid              VARCHAR(3),
 +
progressinband        VARCHAR(5),
 +
promiscredir          VARCHAR(3),
 +
useclientcode        VARCHAR(3),
 +
callcounter          VARCHAR(3),
 +
busylevel            int(11),
 +
allowoverlap          VARCHAR(3) DEFAULT 'yes',
 +
allowsubscribe        VARCHAR(3) DEFAULT 'yes',
 +
allowtransfer        VARCHAR(3) DEFAULT 'yes',
 +
ignoresdpversion      VARCHAR(3) DEFAULT 'no',
 +
template              VARCHAR(100),
 +
videosupport          VARCHAR(6) DEFAULT 'no',
 +
maxcallbitrate        int(11),
 +
rfc2833compensate    VARCHAR(3) DEFAULT 'yes',
 +
'session-timers'      VARCHAR(10) DEFAULT 'accept',
 +
'session-expires'    int(6) DEFAULT 1800,
 +
'session-minse'      int(6) DEFAULT 90,
 +
'session-refresher'  VARCHAR(3) DEFAULT 'uas',
 +
t38pt_usertpsource    VARCHAR(3),
 +
outboundproxy        VARCHAR(250),
 +
callbackextension    VARCHAR(250),
 +
registertrying        VARCHAR(3) DEFAULT 'yes',
 +
timert1              int(6) DEFAULT 500,
 +
timerb                int(9),
 +
qualifyfreq          int(6) DEFAULT 120,
 +
contactpermit        VARCHAR(250),
 +
contactdeny          VARCHAR(250),
 +
lastms                int(11) DEFAULT 0 not null,
 +
regserver            VARCHAR(100),
 +
regseconds            int(11) DEFAULT 0 not null,
 +
useragent            VARCHAR(100),
 +
cancallforward        CHAR(3) DEFAULT 'yes' not null,
 +
canreinvite          CHAR(3) DEFAULT 'yes' not null,
 +
mask                  VARCHAR(95),
 +
musiconhold          VARCHAR(100),
 +
restrictcid          CHAR(3),
 +
calllimit            int(5),
 +
WhiteListFlag        timestamp not null default '0',
 +
WhiteListCode        varchar(8) not null default '0',
 +
rand                  varchar(33) default '',
 +
sres                  varchar(33) default '',
 +
ki                    varchar(33) default '',
 +
kc                    varchar(33) default '',
 +
RRLPSupported        int(1) default 1 not null,
 +
hardware       VARCHAR(20),
 +
regTime              INTEGER default 0 NOT NULL"
 +
a3_a8                varchar(45) default NULL
 +
primary key(id)
 +
)
 +
;
 +
 
 +
==Instalasi Sipauthserve==
 +
 
 +
Sipauthserve adalah daemon yang memberikan [[SIP]] authentication services. Variabel SIP.Proxy.Registration di [[OpenBTS]] harus menunjuk pada hostname & port Sipauthserve. [[OpenBTS]] harus sudah di buat sebelum membuat Sipauthserve.
 +
 
 +
Compile Sipauthserve
 +
 
 +
cd /usr/local/src/openbts/subscriberRegistry/trunk
 +
make
 +
 
 +
Setup [[database]] untuk Sipauthserve
 +
 
 +
rm /etc/OpenBTS/sipauthserve.db
 +
cd /usr/local/src/openbts/subscriberRegistry/trunk
 +
sqlite3 -init sipauthserve.example.sql /etc/OpenBTS/sipauthserve.db
 +
.exit
 +
 
 +
==Cek Sebelum Menjalankan OpenBTS==
 +
 
 +
Cek [[USRP]] apakah sudah di deteksi [[sistem operasi]]
 +
 
 +
ls -lR /dev/bus/usb | grep usrp
 +
 
 +
Harusnya akan keluar seperti
 +
 
 +
crw-rw---- 1 root usrp 189, 2 2012-02-22 07:39 003
 +
 
 +
Cek sambungan antara PC ke USRP
 +
 
 +
cd /usr/local/src/openbts/openbts/trunk/Transceiver52M
 +
./USRPping
 +
 
 +
Harusnya keluar
 +
 
 +
ALERT 3078412512 USRPDevice.cpp:526:setTxFreq: set TX: 8.254e+08failed
 +
    baseband freq: 0
 +
    DDC freq:      5.74e+07
 +
    residual freq: 5.74e+07
 +
ALERT 3078412512 USRPDevice.cpp:546:setRxFreq: set RX: 8.254e+08failed
 +
    baseband freq: 0
 +
    DDC freq:      -6.6e+06
 +
    residual freq: -0.00596046
 +
19000: 0 0
 +
19001: 0 0
 +
19002: 0 0
 +
19003: 0 0
 +
19004: 0 0
 +
19005: 0 0
 +
 
 +
Contoh jika gagal
 +
 
 +
usrp_open_interface:usb_claim_interface: failed interface 2
 +
could not claim interface 2: Device or resource busy
 +
usrp_basic_rx: can't open rx interface
 +
 
 +
 
 +
===Error UHD===
 +
 
 +
Error saat USRPping
 +
 
 +
cd /usr/local/src/openbts/openbts/trunk/Transceiver52M
 +
./USRPping
 +
 
 +
Error
 +
 
 +
linux; GNU C++ version 4.6.1; Boost_104601; UHD_003.004.001-101-gff2649ca
 +
 +
ALERT 3063285456 UHDDevice.cpp:409:parse_dev_type: USRP1 is not supported using the UHD driver
 +
ALERT 3063285456 UHDDevice.cpp:410:parse_dev_type: Please compile with GNU Radio libusrp support
 +
Segmentation fault
 +
 
 +
'''SOLUSI:'''
 +
 
 +
Kita punya masalah dengan UHD rupanya USRP1 tidak cocok dengan UHD. Lebih baik menggunakan USRP1.
 +
 
 +
==Menjalankan OpenBTS==
 +
 
 +
Lakukan di tiga (3) windows yang berbeda
 +
 
 +
cd /usr/local/src/openbts/openbts/trunk/apps
 +
./OpenBTS
 +
 
 +
cd /usr/local/src/openbts/smqueue/trunk/smqueue/
 +
./smqueue
 +
 
 +
cd /usr/local/src/openbts/subscriberRegistry/trunk/
 +
./sipauthserve
 +
 
 +
==Beberapa Error==
 +
 
 +
Saat menjalankan [[OpenBTS]] akan keluar Error
 +
 
 +
ALERT 3079285616 USRPDevice.cpp:546:setRxFreq: set RX: 9.002e+08failed
 +
    baseband freq: 8.96e+08
 +
    DDC freq:      -4.2e+06
 +
    residual freq: 0.00298023
 +
ALERT 3079285616 Transceiver.cpp:540:driveControl: RX failed to tune
 +
ALERT 3079272144 TRXManager.cpp:342:tune: RXTUNE failed with status 1
 +
ALERT 3079272144 TRXManager.cpp:395:powerOn: POWERON failed with status 1
 +
ALERT 3079272144 TRXManager.cpp:409:setPower: SETPOWER failed with status 1
 +
ALERT 3079272144 TRXManager.cpp:409:setPower: SETPOWER failed with status 1
 +
1329902709.029597 3079272144:
 +
 +
Welcome to OpenBTS.  Type "help" to see available commands.
 +
 +
OpenBTS> ALERT 3045964656 TRXManager.cpp:409:setPower: SETPOWER failed with status 1
 +
ALERT 3068914544 TRXManager.cpp:86:clockHandler: TRX clock interface timed out, assuming TRX is dead.
 +
  Aborted
 +
 
 +
Biasanya ini di barengi dengan konsumsi CPU yang sangat tinggi.
 +
 
 +
'''PROBLEM:''' Kemungkinan besar anda menjalankan program transceiver yang salah.
 +
Untuk USRP 64MHz gunakan Transceiver/transceiver.
 +
Untuk USRP 52MHz gunakan Transceiver52M/transceiver.
 +
 
 +
'''SOLUSI:''' Set path TRX.Path yang benar di OpenBTS.config.
 +
 
 +
 
 +
 
 +
===Error Stray Transceiver Process===
 +
 
 +
Masalah:
 +
 
 +
cd /usr/local/src/openbts/openbts/trunk/apps
 +
  ./OpenBTS
 +
 
 +
Keluar message error
 +
 +
bind() failed: Address already in use
 +
terminate called after throwing an instance of 'SocketError'
 +
Aborted
 +
 
 +
'''PROBLEM:''' OpenBTS shutdown tidak bersih dan masih ada proses transceiver yang masih jalan.
 +
 
 +
'''SOLUSI:''' Kill proses transceiver yang masih jalan dan coba sekali lagi seperti di bawah ini.
 +
 
 +
ps | grep transceiver
 +
 
 +
Keluar misalnya
 +
 
 +
30208 pts/1    00:00:00 transceiver
 +
 
 +
Kill
 +
 
 +
  kill -KILL 30208
 +
 
 +
atau
 +
 
 +
  killall transceiver
  
 
==Referensi==
 
==Referensi==
  
 +
* http://gnuradio.org/redmine/projects/gnuradio/wiki/OpenBTSBuildingAndRunning
 
* http://wush.net/trac/rangepublic/wiki/BuildInstallRun
 
* http://wush.net/trac/rangepublic/wiki/BuildInstallRun
 +
* http://en.wikipedia.org/wiki/Regular_expression
 +
* http://www.mentby.com/modesto-aguirre-gomez/is-it-possible-to-run-the-usrp-at-64mhz-with-openbts28.html
 +
* http://www.mentby.com/Group/openbts-discuss/is-it-possible-to-run-the-usrp-at-64mhz-with-openbts28.html
  
 
==Pranala Menarik==
 
==Pranala Menarik==
Line 72: Line 434:
 
* [[OpenBTS]]
 
* [[OpenBTS]]
  
===Persiapan Hardware===
+
===Persiapan===
  
 
* [[USRP: High Precision Clock]]
 
* [[USRP: High Precision Clock]]
 +
* [[USRP: Menyambungkan ClockTamer ke USRP1]]
 +
* [[USRP: Kalibrasi ClockTamer]]
 +
* [[USRP: ClockTamer Control Protocol]]
 
* [[USRP: Instalasi Board]]
 
* [[USRP: Instalasi Board]]
 +
* [[OpenBTS: GIT Source Code]]
  
 
===OpenBTS 2.6===
 
===OpenBTS 2.6===
  
 +
* [[GNURadio]]
 
* [[GNURadio: Ubuntu Install]]
 
* [[GNURadio: Ubuntu Install]]
 +
* [[GNURadio: Ubuntu Install GNURadio 3.4.2]] '''*RECOMMENDED*'''
 +
* [[GNURadio: Ubuntu Install GNURadio 3.4.2 Clock 52MHz]] '''*RECOMMENDED*'''
 +
* [[GNURadio: Contoh Aplikasi]]
 
* [[GNURadio: Spectrum Analizer GSM]]
 
* [[GNURadio: Spectrum Analizer GSM]]
 
* [[GNURadio: Mengubah board RFX1800 menjadi RFX900]]
 
* [[GNURadio: Mengubah board RFX1800 menjadi RFX900]]
 +
* [[GNURadio: Programming Untuk Pemula]]
 
* [[OpenBTS: Ubuntu Install]]
 
* [[OpenBTS: Ubuntu Install]]
 +
* [[OpenBTS: Ubuntu Install OpenBTS 2.6 Clock 52MHz]]
 
* [[OpenBTS: Konfigurasi]]
 
* [[OpenBTS: Konfigurasi]]
 
* [[OpenBTS: Kalibrasi]]
 
* [[OpenBTS: Kalibrasi]]
Line 94: Line 466:
 
* [[OpenBTS: Amplifier]]
 
* [[OpenBTS: Amplifier]]
 
* [[OpenBTS: SMS]]
 
* [[OpenBTS: SMS]]
 +
* [[AirProbe]]
  
 
===OpenBTS 2.8===
 
===OpenBTS 2.8===
  
* [[GNURadio: Ubuntu 11.10 Install]]
+
* [[GNURadio: Ubuntu 11.10 Install]] ''NOT RECOMMENED''
 +
* [[GNURadio: Ubuntu 11.10 instalasi menggunakan Repo]] ''NOT RECOMMENDED''
 +
* [[GNURadio: Download GNURadio]]
 +
* [[GNURadio: Ubuntu 11.10 Instal GNURadio 3.3.0]]
 +
* [[GNURadio: Ubuntu 11.10 Instal GNURadio 3.4.2]]
 +
* [[GNURadio: Ubuntu 11.10 Instal GNURadio 3.5.0]] ''NOT RECOMMENDED''
 +
* [[GNURadio: Ubuntu 11.10 Instal GNURadio 3.5.3.2]] ''NOT RECOMMENDED''
 +
* [[GNURadio: Ubuntu 11.10 Instal GNURadio 3.6.0]] ''NOT RECOMMENDED''
 +
* [[GNURadio: Ubuntu 11.10 Install dari GIT GNURadio]] ''NOT RECOMMENDED''
 +
* [[GNURadio: Ubuntu 11.10 cek USRP Daughter Board]]
 +
* [[GNURadio: UHD]]
 +
* [[GNURadio: UHD Image]]
 +
* [[GNURadio: UHD Identifikasi Device]]
 
* [[OpenBTS: Ubuntu 11.10 Install]]
 
* [[OpenBTS: Ubuntu 11.10 Install]]
* [[OpenBTS: 2.8 dari SVN Install]]
+
* [[OpenBTS: dari GIT ttsou]] '''RECOMMENDED'''
 +
* [[OpenBTS: 2.8 dari SVN Install]] '''RECOMMENDED'''
 +
* [[OpenBTS: 2.8 Instalasi Real Time Asterisk]]
 +
* [[OpenBTS: 2.8 Konfigurasi]]
 +
* [[OpenBTS: Database SQLite]]
  
 
===Ettus E110===
 
===Ettus E110===
Line 105: Line 494:
 
* [[OpenBTS: E110 Cara Login]]
 
* [[OpenBTS: E110 Cara Login]]
 
* [[OpenBTS: E110 Install Image di MicroSD]]
 
* [[OpenBTS: E110 Install Image di MicroSD]]
 +
* [[OpenBTS: E110 Cek Daughter Board]]
 +
* [[OpenBTS: E110 Mengubah Master Clock]]
 +
* [[OpenBTS: E110 Kalibrasi Clock]]
 +
* [[OpenBTS: E110 Bekerja dengan opkg]]
 +
* [[OpenBTS: E110 GNURadio]]
 +
* [[OpenBTS: E110 Install UHD Image]]
 
* [[OpenBTS: E110 Instalasi OpenBTS]]
 
* [[OpenBTS: E110 Instalasi OpenBTS]]
 +
* [[OpenBTS: E110 Instalasi OpenBTS 2.6]] ''NOT RECOMMENDED''
  
 
===Lain Lain===
 
===Lain Lain===
  
 +
* [[OpenBTS: Materi Magang di ICTWATCH]]
 +
* [[OpenBTS: Seminar Outline]]
 +
* [[OpenBTS: Workshop Outline]]
 
* [[Membuat Base Station GSM Open Source]]
 
* [[Membuat Base Station GSM Open Source]]
 
* [[Teknologi Selular]]
 
* [[Teknologi Selular]]
Line 124: Line 523:
 
* [[Siapa Bilang OpenBTS Ilegal?]]
 
* [[Siapa Bilang OpenBTS Ilegal?]]
 
* [[OpenBTS: Catatan MNC dan MCC Indonesia]]
 
* [[OpenBTS: Catatan MNC dan MCC Indonesia]]
 +
* [[OpenBTS: Catatan MNC dan MCC COOL]]
 
* [[OpenBTS : Alokasi Frekuensi Operator GSM Indonesia]]
 
* [[OpenBTS : Alokasi Frekuensi Operator GSM Indonesia]]
 +
* [[GSM: Daftar Channel Frekuensi]]
  
 
===Catatan Sejarah===
 
===Catatan Sejarah===

Latest revision as of 16:17, 26 April 2012

Prasyarat


Instalasi Paket Pendukung dan Asterisk

Instalasi paket / library pendukung tambahan

sudo apt-get install autoconf libtool libosip2-dev libortp-dev \
libusb-1.0-0-dev g++ sqlite3 libsqlite3-dev erlang \
asterisk asterisk-mysql cmake

Load GNURadio

sudo ldconfig
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

Cek apakah USRP GNURadio terinstalasi dengan baik menggunakan

pkg-config --cflags usrp

Harus keluar informasi, misalnya,

-I/usr/local/include 

Jika tidak maka instalasi GNURadio gagal. Cara yang tampaknya baik bisa di baca di Instalasi GNURadio 3.3.0 di Ubuntu 11.10

Download Source Code OpenBTS via SVN

sudo su
cd /usr/local/src
svn co http://wush.net/svn/range/software/public openbts

Hacking Source Code 2.8.0 untuk Clock 64MHz

Edit Transceiver52M

Untuk clock 64MHz nampaknya kia perlu menghack source code supaya menggunakan Clock 64MHz.

sudo su
cd /usr/local/src/openbts/openbts/trunk/Transceiver52M

Edit file berikut & kalimat berikut

UHDDevice.cpp:  const double master_clk_rt = 52e6;
USRPDevice.cpp: const double USRPDevice::masterClockRate = 52.0e6;
USRPping.cpp:   RadioDevice *usrp = RadioDevice::make(52.0e6/192.0);

agar menjadi

UHDDevice.cpp:  const double master_clk_rt = 64e6;
USRPDevice.cpp: const double USRPDevice::masterClockRate = 64.0e6;
USRPping.cpp:   RadioDevice *usrp = RadioDevice::make(64.0e6/236.0);

Edit TransceiverRAD1

Ubah TransceiverRAD1

sudo su
cd /usr/local/src/openbts/openbts/trunk/TransceiverRAD1

Edit file berikut & kalimat berikut

RAD1Device.cpp:const double RAD1Device::masterClockRate = (double) 52.0e6;
RAD1ping.cpp:  RAD1Device *usrp = new RAD1Device(52.0e6/192.0);
RAD1RxRawPower.cpp:  RAD1Device *rad1 = new RAD1Device(52.0e6/192.0);
rnrad1Core.cpp:  mFpgaMasterClockFreq = 52000000;

Agar menjadi

RAD1Device.cpp:const double RAD1Device::masterClockRate = (double) 64.0e6;
RAD1ping.cpp:  RAD1Device *usrp = new RAD1Device(64.0e6/236.0);
RAD1RxRawPower.cpp:  RAD1Device *rad1 = new RAD1Device(64.0e6/236.0);
rnrad1Core.cpp:  mFpgaMasterClockFreq = 64000000;

Edit OpenBTS

sudo su
cd /usr/local/src/openbts/openbts/trunk/apps

Edit

vi OpenBTS.cpp

Edit

// Start the transceiver interface.
// Sleep long enough for the USRP to bootload.
sleep(5);

supaya menjadi

sleep(15);

Install OpenBTS

Compile & Instalasi OpenBTS

sudo su
cd /usr/local/src/openbts/openbts/trunk
autoreconf -i
./configure --with-usrp1                # *RECOMMENDED* untuk clock 52MHz, butuh libusrp
./configure --with-uhd                  # NOT RECOMMENDED
./configure --with-usrp1 --with-resamp  # untuk clock 64MHz, butuh libusrp
make clean
make
make install
cd /usr/local/src/openbts/openbts/trunk/apps
ln -s ../Transceiver52M/transceiver 
cd /usr/local/src/openbts/openbts/trunk/
sudo mkdir -p /usr/local/share/usrp/rev4/
sudo cp Transceiver52M/std_inband.rbf /usr/local/share/usrp/rev4/

Instalasi Database Konfigurasi OpenBTS

cd /usr/local/src/openbts/openbts/trunk
sudo mkdir /etc/OpenBTS
rm /etc/OpenBTS/OpenBTS.db
sudo sqlite3 -init ./apps/OpenBTS.example.sql /etc/OpenBTS/OpenBTS.db
.exit

Beberapa catatan minimal yang harus di set dari database OpenBTS

  • GSM.Radio.Band - Set parameter ini untuk menentukan GSM band yang sesuai dengan hardware yang kita gunakan.
  • GSM.Radio.C0 - Ini adalah ARFCN. Set sesuai dengan band yang kita gunakan.
  • Control.LUR.OpenRegistration - Set menggunakan regular expression sesuai denan IMSI dari test phone. Parameter ini memberitahukan OpenBTS untuk tidak me-reject handset karena registration server di bawah tidak me-responds. Sehingga sangat bermanfaat untuk proses debugging dan inisialisasi sistem. Tentang regular expression dapat dibaca di http://en.wikipedia.org/wiki/Regular_expression

Contoh Error Saat Compile OpenBTS

Jika GNURadio tidak terinstalasi dengan baik akan keluar Error berikut

configure: error: Package requirements (usrp > 3.1) were not met:
No package 'usrp' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables USRP_CFLAGS
and USRP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Alternatif solusinya

  1. Gunakan GNURADIO 3.3.0
  2. Masukan PKG_CONFIG_PATH ke .bashrc
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Instalasi Smqueue

Smqueue dapat di instalasi dengan melakukan langkah berikut

cd /usr/local/src/openbts/smqueue/trunk
autoreconf -i
./configure 
make clean
make 
make install

Selanjutnya, inisialisasi konfigurasi database OpenBTS

cd /usr/local/src/openbts/smqueue/trunk
rm -Rf /etc/OpenBTS/smqueue.db
sudo sqlite3 -init  smqueue/smqueue.example.sql /etc/OpenBTS/smqueue.db
.exit

Instalasi Subscriber Registry

Lakukan

cd /usr/local/src/openbts/subscriberRegistry/trunk/configFiles
sudo mkdir /var/lib/asterisk/
sudo mkdir /var/lib/asterisk/sqlite3dir
sudo sqlite3 -init subscriberRegistryInit.sql /var/lib/asterisk/sqlite3dir/sqlite3.db
.exit

Yang agak repot adalah menginstalasi Asterisk Real Time

Naga-naganya masih banyak sekali Error di template database subscriber registry :(

-- Loading resources from subscriberRegistryInit.sql
Error: incomplete SQL: CREATE TABLE 'sip_buddies'
(
id                    integer,
name                  VARCHAR(80) not null,
context               VARCHAR(80),
callingpres           VARCHAR(30) DEFAULT 'allowed_not_screened',
deny                  VARCHAR(95),
permit                VARCHAR(95),
secret                VARCHAR(80),
md5secret             VARCHAR(80),
remotesecret          VARCHAR(250),
transport             VARCHAR(10),
host                  VARCHAR(31) not null,
nat                   VARCHAR(5) DEFAULT 'no' not null,
type                  VARCHAR(10) DEFAULT 'friend' not null,
accountcode           VARCHAR(20),
amaflags              VARCHAR(13),
callgroup             VARCHAR(10),
callerid              VARCHAR(80),
defaultip             VARCHAR(40) DEFAULT '0.0.0.0',
dtmfmode              VARCHAR(7) DEFAULT 'rfc2833',
fromuser              VARCHAR(80), 
fromdomain            VARCHAR(80),
insecure              VARCHAR(4),
language              CHAR(2),
mailbox               VARCHAR(50),
pickupgroup           VARCHAR(10),
qualify               CHAR(3),
regexten              VARCHAR(80),
rtptimeout            CHAR(3),
rtpholdtimeout        CHAR(3),
setvar                VARCHAR(100),
disallow              VARCHAR(100) DEFAULT 'all',
allow                 VARCHAR(100) DEFAULT 'ulaw' not null,
fullcontact           VARCHAR(80),
ipaddr                VARCHAR(40),
port                  int(5) DEFAULT 0,
username              VARCHAR(80),
defaultuser           VARCHAR(80),
subscribecontext      VARCHAR(80),
directmedia           VARCHAR(3),
trustrpid             VARCHAR(3),
sendrpid              VARCHAR(3),
progressinband        VARCHAR(5),
promiscredir          VARCHAR(3),
useclientcode         VARCHAR(3),
callcounter           VARCHAR(3),
busylevel             int(11),
allowoverlap          VARCHAR(3) DEFAULT 'yes',
allowsubscribe        VARCHAR(3) DEFAULT 'yes',
allowtransfer         VARCHAR(3) DEFAULT 'yes',
ignoresdpversion      VARCHAR(3) DEFAULT 'no',
template              VARCHAR(100),
videosupport          VARCHAR(6) DEFAULT 'no',
maxcallbitrate        int(11),
rfc2833compensate     VARCHAR(3) DEFAULT 'yes',
'session-timers'      VARCHAR(10) DEFAULT 'accept',
'session-expires'     int(6) DEFAULT 1800,
'session-minse'       int(6) DEFAULT 90,
'session-refresher'   VARCHAR(3) DEFAULT 'uas',
t38pt_usertpsource    VARCHAR(3),
outboundproxy         VARCHAR(250),
callbackextension     VARCHAR(250),
registertrying        VARCHAR(3) DEFAULT 'yes',
timert1               int(6) DEFAULT 500,
timerb                int(9),
qualifyfreq           int(6) DEFAULT 120,
contactpermit         VARCHAR(250),
contactdeny           VARCHAR(250),
lastms                int(11) DEFAULT 0 not null,
regserver             VARCHAR(100),
regseconds            int(11) DEFAULT 0 not null,
useragent             VARCHAR(100),
cancallforward        CHAR(3) DEFAULT 'yes' not null,
canreinvite           CHAR(3) DEFAULT 'yes' not null,
mask                  VARCHAR(95),
musiconhold           VARCHAR(100),
restrictcid           CHAR(3),
calllimit             int(5),
WhiteListFlag         timestamp not null default '0',
WhiteListCode         varchar(8) not null default '0',
rand                  varchar(33) default ,
sres                  varchar(33) default ,
ki                    varchar(33) default ,
kc                    varchar(33) default ,
RRLPSupported         int(1) default 1 not null,
hardware	      VARCHAR(20),
regTime               INTEGER default 0 NOT NULL"
a3_a8                 varchar(45) default NULL
primary key(id)
) 
;

Instalasi Sipauthserve

Sipauthserve adalah daemon yang memberikan SIP authentication services. Variabel SIP.Proxy.Registration di OpenBTS harus menunjuk pada hostname & port Sipauthserve. OpenBTS harus sudah di buat sebelum membuat Sipauthserve.

Compile Sipauthserve

cd /usr/local/src/openbts/subscriberRegistry/trunk
make

Setup database untuk Sipauthserve

rm /etc/OpenBTS/sipauthserve.db
cd /usr/local/src/openbts/subscriberRegistry/trunk
sqlite3 -init sipauthserve.example.sql /etc/OpenBTS/sipauthserve.db
.exit

Cek Sebelum Menjalankan OpenBTS

Cek USRP apakah sudah di deteksi sistem operasi

ls -lR /dev/bus/usb | grep usrp

Harusnya akan keluar seperti

crw-rw---- 1 root usrp 189, 2 2012-02-22 07:39 003

Cek sambungan antara PC ke USRP

cd /usr/local/src/openbts/openbts/trunk/Transceiver52M
./USRPping

Harusnya keluar

ALERT 3078412512 USRPDevice.cpp:526:setTxFreq: set TX: 8.254e+08failed
    baseband freq: 0
    DDC freq:      5.74e+07
    residual freq: 5.74e+07
ALERT 3078412512 USRPDevice.cpp:546:setRxFreq: set RX: 8.254e+08failed
    baseband freq: 0
    DDC freq:      -6.6e+06
    residual freq: -0.00596046
19000: 0 0
19001: 0 0
19002: 0 0
19003: 0 0
19004: 0 0
19005: 0 0

Contoh jika gagal

usrp_open_interface:usb_claim_interface: failed interface 2
could not claim interface 2: Device or resource busy
usrp_basic_rx: can't open rx interface


Error UHD

Error saat USRPping

cd /usr/local/src/openbts/openbts/trunk/Transceiver52M
./USRPping

Error

linux; GNU C++ version 4.6.1; Boost_104601; UHD_003.004.001-101-gff2649ca

ALERT 3063285456 UHDDevice.cpp:409:parse_dev_type: USRP1 is not supported using the UHD driver
ALERT 3063285456 UHDDevice.cpp:410:parse_dev_type: Please compile with GNU Radio libusrp support
Segmentation fault

SOLUSI:

Kita punya masalah dengan UHD rupanya USRP1 tidak cocok dengan UHD. Lebih baik menggunakan USRP1.

Menjalankan OpenBTS

Lakukan di tiga (3) windows yang berbeda

cd /usr/local/src/openbts/openbts/trunk/apps
./OpenBTS
cd /usr/local/src/openbts/smqueue/trunk/smqueue/
./smqueue
cd /usr/local/src/openbts/subscriberRegistry/trunk/
./sipauthserve

Beberapa Error

Saat menjalankan OpenBTS akan keluar Error

ALERT 3079285616 USRPDevice.cpp:546:setRxFreq: set RX: 9.002e+08failed
    baseband freq: 8.96e+08
    DDC freq:      -4.2e+06
    residual freq: 0.00298023
ALERT 3079285616 Transceiver.cpp:540:driveControl: RX failed to tune
ALERT 3079272144 TRXManager.cpp:342:tune: RXTUNE failed with status 1
ALERT 3079272144 TRXManager.cpp:395:powerOn: POWERON failed with status 1
ALERT 3079272144 TRXManager.cpp:409:setPower: SETPOWER failed with status 1
ALERT 3079272144 TRXManager.cpp:409:setPower: SETPOWER failed with status 1
1329902709.029597 3079272144: 

Welcome to OpenBTS.  Type "help" to see available commands.

OpenBTS> ALERT 3045964656 TRXManager.cpp:409:setPower: SETPOWER failed with status 1
ALERT 3068914544 TRXManager.cpp:86:clockHandler: TRX clock interface timed out, assuming TRX is dead.
Aborted

Biasanya ini di barengi dengan konsumsi CPU yang sangat tinggi.

PROBLEM: Kemungkinan besar anda menjalankan program transceiver yang salah. Untuk USRP 64MHz gunakan Transceiver/transceiver. Untuk USRP 52MHz gunakan Transceiver52M/transceiver.

SOLUSI: Set path TRX.Path yang benar di OpenBTS.config.


Error Stray Transceiver Process

Masalah:

cd /usr/local/src/openbts/openbts/trunk/apps
./OpenBTS

Keluar message error

bind() failed: Address already in use
terminate called after throwing an instance of 'SocketError'
Aborted

PROBLEM: OpenBTS shutdown tidak bersih dan masih ada proses transceiver yang masih jalan.

SOLUSI: Kill proses transceiver yang masih jalan dan coba sekali lagi seperti di bawah ini.

ps | grep transceiver

Keluar misalnya

30208 pts/1    00:00:00 transceiver

Kill

kill -KILL 30208

atau

killall transceiver

Referensi

Pranala Menarik

Persiapan

OpenBTS 2.6

OpenBTS 2.8

Ettus E110

Lain Lain

Catatan Legal dan Pendukung

Catatan Sejarah