Difference between revisions of "OpenBTS: FreeSWITCH"

From OnnoWiki
Jump to navigation Jump to search
 
Line 10: Line 10:
 
Required Libraries/Utilities
 
Required Libraries/Utilities
  
To fulfill various package dependencies of OpenBTS (minus the PBX) you'll need the following packages:
+
Instalasi paket berikut
  
    autoconf
+
autoconf
 +
libtool
 +
libosip2
 +
libortp
 +
libusb-1.0
 +
g++
 +
sqlite3
 +
libsqlite3-dev (sipauthserve only)
 +
libreadline6-dev
 +
libncurses5-dev
  
    libtool
+
di turunan debian
  
    libosip2
+
sudo apt-get install autoconf libtool libosip2-dev libortp-dev \
 +
libusb-1.0-0-dev g++ sqlite3 libsqlite3-dev erlang libreadline6-dev \
 +
libncurses5-dev
  
    libortp
+
==System Diagram==
 
 
    libusb-1.0
 
 
 
    g++
 
 
 
    sqlite3
 
 
 
    libsqlite3-dev (sipauthserve only)
 
 
 
    libreadline6-dev
 
 
 
    libncurses5-dev
 
 
 
These can be installed (on a Debian-flavored unix distro) with the following command:
 
 
 
sudo apt-get install autoconf libtool libosip2-dev libortp-dev libusb-1.0-0-dev g++ sqlite3 libsqlite3-dev erlang libreadline6-dev libncurses5-dev
 
 
 
System Diagram
 
  
 
In this diagram, Black links are network connections (SIP). Red links are file system connections (sqlite3 lookups). Blue links are ODBC (network/local DB lookups).
 
In this diagram, Black links are network connections (SIP). Red links are file system connections (sqlite3 lookups). Blue links are ODBC (network/local DB lookups).
Line 60: Line 53:
 
To verify proper driver installation, run the uhd_usrp_probe utility installed with the UHD driver. Output should be similar to the following truncated output. Also, to facilitate of FPGA loading times, it is suggested that the uhd_usrp_probe be run at least once after powering on the device and before starting OpenBTS.
 
To verify proper driver installation, run the uhd_usrp_probe utility installed with the UHD driver. Output should be similar to the following truncated output. Also, to facilitate of FPGA loading times, it is suggested that the uhd_usrp_probe be run at least once after powering on the device and before starting OpenBTS.
  
$ uhd_usrp_probe  
+
$ uhd_usrp_probe  
 +
 +
linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300;  UHD_003.005.004-140-gfb32ed16
  
linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300; UHD_003.005.004-140-gfb32ed16
+
-- Opening a USRP2/N-Series device...
 +
-- Current recv frame size: 1472 bytes
 +
-- Current send frame size: 1472 bytes
 +
  _____________________________________________________
 +
  /
 +
|      Device: USRP2 / N-Series Device
 +
|    _____________________________________________________
 +
|    /
 +
|  |      Mboard: USRP2 r4
 +
|  |  hardware: 1024
 +
|  |  mac-addr: 00:50:c2:85:36:1e
 +
|  |  ip-addr: 255.255.255.255
 +
|  |  subnet: 255.255.255.255
 +
|  |  gateway: 255.255.255.255
 +
|  |  gpsdo: none
 +
|  |  serial: 1566
 +
|  |  FW Version: 12.4
 +
|  |  FPGA Version: 10.1
  
-- Opening a USRP2/N-Series device...
+
==Install Stage==
-- Current recv frame size: 1472 bytes
 
-- Current send frame size: 1472 bytes
 
  _____________________________________________________
 
/
 
|      Device: USRP2 / N-Series Device
 
|    _____________________________________________________
 
|    /
 
|  |      Mboard: USRP2 r4
 
|  |  hardware: 1024
 
|  |  mac-addr: 00:50:c2:85:36:1e
 
|  |  ip-addr: 255.255.255.255
 
|  |  subnet: 255.255.255.255
 
|  |  gateway: 255.255.255.255
 
|  |  gpsdo: none
 
|  |  serial: 1566
 
|  |  FW Version: 12.4
 
|  |  FPGA Version: 10.1
 
 
 
Install Stage
 
  
 
The following packages are necessary to continue, (be forewarned they were built for Ubuntu 12.04 x86-64 system). Also this version of openbts was built for uhd devices:
 
The following packages are necessary to continue, (be forewarned they were built for Ubuntu 12.04 x86-64 system). Also this version of openbts was built for uhd devices:
Line 91: Line 84:
 
Install the packages in the following order, (if any dependencies pop-up install them as well):
 
Install the packages in the following order, (if any dependencies pop-up install them as well):
  
sudo dpkg -i a53_1.0-1_amd64.deb
+
sudo dpkg -i a53_1.0-1_amd64.deb
sudo dpkg -i openbts-public_3.2_amd64.deb
+
sudo dpkg -i openbts-public_3.2_amd64.deb
sudo dpkg -i smqueue-public_3.2_amd64.deb
+
sudo dpkg -i smqueue-public_3.2_amd64.deb
sudo dpkg -i sipauthserve-public_3.2_amd64.deb
+
sudo dpkg -i sipauthserve-public_3.2_amd64.deb
  
Running OpenBTS
+
==Running OpenBTS==
  
 
At this point, we should be able to perform a basic sanity check of OpenBTS.
 
At this point, we should be able to perform a basic sanity check of OpenBTS.
  
 
(from OpenBTS root)
 
(from OpenBTS root)
cd /OpenBTS
+
 
sudo ./OpenBTS
+
cd /OpenBTS
 +
sudo ./OpenBTS
  
 
You should see output like this:
 
You should see output like this:
  
system ready
+
system ready
use the OpenBTSCLI utility to access CLI
+
use the OpenBTSCLI utility to access CLI
  
 
And if you scan for GSM towers on your phone, you should see a 00101 (test) network. If you try to attach, it will reject you. This is because OpenBTS, by default, only allows registered handsets to connect. As we are not running our registration server (sipauthserve) no phones will camp. From here, we should look at a few OpenBTS configuration variables. Connect to OpenBTS with the OpenBTSCLI command:
 
And if you scan for GSM towers on your phone, you should see a 00101 (test) network. If you try to attach, it will reject you. This is because OpenBTS, by default, only allows registered handsets to connect. As we are not running our registration server (sipauthserve) no phones will camp. From here, we should look at a few OpenBTS configuration variables. Connect to OpenBTS with the OpenBTSCLI command:
  
 
(from OpenBTS root)
 
(from OpenBTS root)
cd /OpenBTS
+
 
sudo ./OpenBTSCLI
+
cd /OpenBTS
 +
sudo ./OpenBTSCLI
  
 
and then, in the CLI
 
and then, in the CLI
  
config
+
config
  
 
You will see a lot of stock configuration options. You can find these listed here. Most of these only need to be tweaked if you are moving beyond a simple desktop setup. However, a few are required for basic operation. These are:
 
You will see a lot of stock configuration options. You can find these listed here. Most of these only need to be tweaked if you are moving beyond a simple desktop setup. However, a few are required for basic operation. These are:
Line 127: Line 122:
 
The values can be modified from OpenBTSCLI with the config command. For example,
 
The values can be modified from OpenBTSCLI with the config command. For example,
  
config Control.LUR.OpenRegistration .*
+
config Control.LUR.OpenRegistration .*
  
 
to allow registrations from any phone regardless of their provider. Caution: With this config all phones have access, without any restriction. When an antenna is attached, at least your neighbors will connect, so do not try this at home :-)
 
to allow registrations from any phone regardless of their provider. Caution: With this config all phones have access, without any restriction. When an antenna is attached, at least your neighbors will connect, so do not try this at home :-)
  
 
If these steps are complete, you have a working BTS. If they do not, check out the common errors.
 
If these steps are complete, you have a working BTS. If they do not, check out the common errors.
Running sipauthserve
+
 
 +
==Running sipauthserve==
  
 
Running sipauthserve will provide you with a registration server. To do so:
 
Running sipauthserve will provide you with a registration server. To do so:
  
cd /OpenBTS
+
cd /OpenBTS
sudo ./sipauthserve
+
sudo ./sipauthserve
  
 
sipauthserve does not have a CLI, so you'll only see a small output:
 
sipauthserve does not have a CLI, so you'll only see a small output:
Line 158: Line 154:
  
 
Remember, if you change any of the variables, you'll need to restart smqueue for the changes to take effect.
 
Remember, if you change any of the variables, you'll need to restart smqueue for the changes to take effect.
Installing the PBX Freeswitch
+
 
 +
==Installing the PBX Freeswitch==
  
 
FreeSwitch is an up-and-coming Asterisk competitor. Its interoperation with OpenBTS is supported primarily by the group at Berkeley. It provides programmatic voice and text routing, as well as a more flexible programming environment for voice/sms applications at the cost of being buggier and having less support.
 
FreeSwitch is an up-and-coming Asterisk competitor. Its interoperation with OpenBTS is supported primarily by the group at Berkeley. It provides programmatic voice and text routing, as well as a more flexible programming environment for voice/sms applications at the cost of being buggier and having less support.
Line 189: Line 186:
 
  sudo dpkg -i python-libvbts_0.0.1-1_all.deb
 
  sudo dpkg -i python-libvbts_0.0.1-1_all.deb
  
Configuration Stage
+
==Configuration Stage==
  
 
Perform the following operations:
 
Perform the following operations:
Line 215: Line 212:
 
  sudo fs_cli
 
  sudo fs_cli
  
Making an Echo Call
+
==Making an Echo Call==
  
 
Run openbts, openbtscli, smqueue, sipauthserve. In OpenBTSCLI, perform the following operation, substituting address with our inet_address, (which can be found using ifconfig):
 
Run openbts, openbtscli, smqueue, sipauthserve. In OpenBTSCLI, perform the following operation, substituting address with our inet_address, (which can be found using ifconfig):

Latest revision as of 11:04, 16 February 2014

Sumber: https://wush.net/trac/rangepublic/wiki/DebOpenBTS


  • Instalasi GNURadio 3.4.2. untuk USRP
  • Instalasi OpenBTS versi terakhir

Note the Package System Only Works on Ubuntu 12.04 running on x86-64 architecture

The packages can be obtained from http://vmphone2.cs.berkeley.edu/all_packages/. Required Libraries/Utilities

Instalasi paket berikut

autoconf
libtool
libosip2
libortp
libusb-1.0
g++
sqlite3
libsqlite3-dev (sipauthserve only)
libreadline6-dev
libncurses5-dev

di turunan debian

sudo apt-get install autoconf libtool libosip2-dev libortp-dev \
libusb-1.0-0-dev g++ sqlite3 libsqlite3-dev erlang libreadline6-dev \
libncurses5-dev

System Diagram

In this diagram, Black links are network connections (SIP). Red links are file system connections (sqlite3 lookups). Blue links are ODBC (network/local DB lookups).

Install OpenBTS, Smqueue, Sipauthserve and the Transceiver All Other Devices (except for USRP1)

All UHD devices from Ettus Research - with the exception of the USRP1 - use the UHD (Universal Hardware Driver) with OpenBTS. In addition, the UmTRX from Fairwaves uses a its own UHD driver, which is API compatible.

UHD devices include the following:

   Ettus Research
       B-Series: B100, B200, B210
       N-Series: N200, N210, USRP2 
   Fairwaves
       UmTRX 

Instructions to install UHD can be found here. Recently released B200 and B210 devices currently require building UHD from the master branch. Released binary versions of UHD are suitable for other devices.

Information on UmTRX and the Fairwaves UHD driver is available here.

To verify proper driver installation, run the uhd_usrp_probe utility installed with the UHD driver. Output should be similar to the following truncated output. Also, to facilitate of FPGA loading times, it is suggested that the uhd_usrp_probe be run at least once after powering on the device and before starting OpenBTS.

$ uhd_usrp_probe 

linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300;  UHD_003.005.004-140-gfb32ed16
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
  _____________________________________________________
 /
|       Device: USRP2 / N-Series Device
|     _____________________________________________________
|    /
|   |       Mboard: USRP2 r4
|   |   hardware: 1024
|   |   mac-addr: 00:50:c2:85:36:1e
|   |   ip-addr: 255.255.255.255
|   |   subnet: 255.255.255.255
|   |   gateway: 255.255.255.255
|   |   gpsdo: none
|   |   serial: 1566
|   |   FW Version: 12.4
|   |   FPGA Version: 10.1 

Install Stage

The following packages are necessary to continue, (be forewarned they were built for Ubuntu 12.04 x86-64 system). Also this version of openbts was built for uhd devices:

   openbts-public_3.2_amd64.deb smqueue-public_3.2_amd64.deb sipauthserve-public_3.2_amd64.deb a53_1.0-1_amd64.deb

Install the packages in the following order, (if any dependencies pop-up install them as well):

sudo dpkg -i a53_1.0-1_amd64.deb
sudo dpkg -i openbts-public_3.2_amd64.deb
sudo dpkg -i smqueue-public_3.2_amd64.deb
sudo dpkg -i sipauthserve-public_3.2_amd64.deb

Running OpenBTS

At this point, we should be able to perform a basic sanity check of OpenBTS.

(from OpenBTS root)

cd /OpenBTS
sudo ./OpenBTS

You should see output like this:

system ready
use the OpenBTSCLI utility to access CLI

And if you scan for GSM towers on your phone, you should see a 00101 (test) network. If you try to attach, it will reject you. This is because OpenBTS, by default, only allows registered handsets to connect. As we are not running our registration server (sipauthserve) no phones will camp. From here, we should look at a few OpenBTS configuration variables. Connect to OpenBTS with the OpenBTSCLI command:

(from OpenBTS root)

cd /OpenBTS
sudo ./OpenBTSCLI

and then, in the CLI

config

You will see a lot of stock configuration options. You can find these listed here. Most of these only need to be tweaked if you are moving beyond a simple desktop setup. However, a few are required for basic operation. These are:

   GSM.Radio.Band - Set this to the GSM band appropriate for your hardware.
   GSM.Radio.C0 - This is the  ARFCN. Set it to something appropriate for your band.
   Control.LUR.OpenRegistration - Set this to a  regular expression matching the IMSIs of your test phones. This tells OpenBTS to not reject your handset just because your registration server (below) isn't responding. Useful for debugging and initializing the system. 

The values can be modified from OpenBTSCLI with the config command. For example,

config Control.LUR.OpenRegistration .*

to allow registrations from any phone regardless of their provider. Caution: With this config all phones have access, without any restriction. When an antenna is attached, at least your neighbors will connect, so do not try this at home :-)

If these steps are complete, you have a working BTS. If they do not, check out the common errors.

Running sipauthserve

Running sipauthserve will provide you with a registration server. To do so:

cd /OpenBTS
sudo ./sipauthserve

sipauthserve does not have a CLI, so you'll only see a small output:

ALERT 139639310980928 sipauthserve.cpp:214:main: ./sipauthserve (re)starting

Remember, if you change any of the config variables, you'll need to restart sipauthserve for the changes to take effect. Running Smqueue

Smqueue is run with the following command:

(from the smqueue directory) cd /OpenBTS sudo ./smqueue

Smqueue does not have a command-line interface, instead just reading configuration values and processing messages. So you'll only see a small output:

ALERT 140545832068928 smqueue.cpp:2421:main: smqueue (re)starting smqueue logs to syslogd facility LOCAL7, so there's not much to see here

Remember, if you change any of the variables, you'll need to restart smqueue for the changes to take effect.

Installing the PBX Freeswitch

FreeSwitch is an up-and-coming Asterisk competitor. Its interoperation with OpenBTS is supported primarily by the group at Berkeley. It provides programmatic voice and text routing, as well as a more flexible programming environment for voice/sms applications at the cost of being buggier and having less support.

Instalasi Aplikasi Pendukung

apt-get install libpq5 libfreeswitch1
apt-get install freeswitch-music-default freeswitch-sounds-en-us-callie freeswitch-sounds-en-us freeswitch-sounds-en


Instalasi Freeswitch

Perform the following operations:

cd /usr/local/src
tar -zxvf freeswitch_vanilla.tar.gz
tar -zxvf freeswitch_all.tar.gz
cd /usr/local/src/freeswitch_vanilla

Assuming you have all the necessary packages in the directory run, (note these packages were built for Ubuntu 12.04 x86-64 system):

cd /usr/local/src/freeswitch_vanilla
sudo dpkg -i *.deb

If the system complains about unmet dependencies cherry pick install debian packages from freeswitch_all.

Now install two extra dependencies, smspdu and libvbts by running, (note make sure to do this in the following order):

sudo dpkg -i python-smspdu_1.0-1_all.deb
sudo dpkg -i python-libvbts_0.0.1-1_all.deb

Configuration Stage

Perform the following operations:

Edit

vi /usr/share/freeswitch/conf/vanilla/dialplan/default.xml

Ubah

<context name="default">

Menjadi

<context name="public">.

Lakukan

mkdir /etc/freeswitch
sudo cp -r /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/

Running Freeswitch and Freeswitch Console

sudo freeswitch
sudo fs_cli

Making an Echo Call

Run openbts, openbtscli, smqueue, sipauthserve. In OpenBTSCLI, perform the following operation, substituting address with our inet_address, (which can be found using ifconfig):

 config SIP.Proxy.Speech address:5060
 config SIP.Proxy.SMS address:5060

Misalnya

 config SIP.Proxy.Speech 192.168.0.3:5060
 config SIP.Proxy.SMS 192.168.0.3:5060


Coba echo call ke 9196.


Referensi

Pranala Menarik

Persiapan

Script

OpenBTS 2.6

OpenBTS 2.8

Multi OpenBTS 2.8

OpenBTS 3.1.x

Ettus E110

Ettus N210

RangeNetworks


GPRS

Briker OpenBTS

FreeSWITCH OpenBTS

Power Amplifier

Lain Lain

Catatan Legal dan Pendukung

Catatan Sejarah

Dokumentasi Video

Perjuangan OpenBTS