Skip to content

Instantly share code, notes, and snippets.

@shamrin
Last active March 29, 2020 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save shamrin/8b2d6c1493c70544c39e to your computer and use it in GitHub Desktop.
Save shamrin/8b2d6c1493c70544c39e to your computer and use it in GitHub Desktop.
Install OsmoNITB with SMPP

Quick Osmocom OpenBSC installation

Prerequisites

  • Ubuntu Trusty (previous LTS and in between versions should work too)
  • sudo apt-get install gcc make git autoconf libtool pkg-config build-essential automake libortp-dev python libsqlite3-dev

Installing

git clone https://gist.github.com/8b2d6c1493c70544c39e.git osmonitb
cd osmonitb
./install.sh

Running

osmo-nitb -c openbsc.cfg -l db.sqlite3 -P -m -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM

At this point you should be able to get to OpenBSC management interface:

telnet localhost 4242

Or you can try to get to SMPP socket at port 2775. SMPP parameters are at the end of openbsc.cfg file. If you manage to send messages through SMPP, they should appear in db.sqlite3 database.

Installing and running in Docker

(optional, for Docker fans; or for convenience)

docker build --rm -t osmocom .
docker run -i -t -w /root osmocom bash
osmo-nitb -c openbsc.cfg -l db.sqlite3 -P -m -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM &
telnet localhost 2775 # SMPP socket
from ubuntu:trusty
maintainer Alexey Shamrin <shamrin@gmail.com>
env DEBIAN_FRONTEND noninteractive
run apt-get update -q -y && apt-get install -y -q gcc make git autoconf libtool pkg-config build-essential automake libortp-dev python libsqlite3-dev
add openbsc.cfg /root/
add install.sh /root/
run /root/install.sh
#!/bin/bash
set -e
CURRENT=$(readlink -e $(dirname $0))
# libdbi with sqlite3 driver: because OpenBSC now fails with libdbi in Trusty
cd $CURRENT && git clone http://git.code.sf.net/p/libdbi/libdbi \
&& cd libdbi \
&& git checkout libdbi-0.8.3 \
&& autoreconf -i \
|| autoreconf -i \
&& ./configure --disable-docs && make && sudo make install \
&& sudo ldconfig \
&& cd ..
cd $CURRENT && git clone http://git.code.sf.net/p/libdbi-drivers/libdbi-drivers \
&& cd libdbi-drivers \
&& git checkout libdbi-drivers-0.8.3.1 \
&& autoreconf -i \
|| autoreconf -i \
&& ./configure --with-sqlite3 --disable-docs --with-sqlite3-dir=/usr/lib/x86_64-linux-gnu/ \
&& make && sudo make install \
&& sudo ldconfig \
&& cd ..
# libosmocore
cd $CURRENT && git clone git://git.osmocom.org/libosmocore.git \
&& cd libosmocore \
&& autoreconf -i \
|| autoreconf -i \
&& ./configure && make && sudo make install \
&& sudo ldconfig \
&& cd ..
# libosmo-abis
cd $CURRENT && git clone -b fairwaves/master git://git.osmocom.org/libosmo-abis.git \
&& cd libosmo-abis \
&& autoreconf -i \
|| autoreconf -i \
&& ./configure && make && sudo make install \
&& sudo ldconfig \
&& cd ..
# libsmpp34
cd $CURRENT && git clone git://git.osmocom.org/libsmpp34 \
&& cd libsmpp34 \
&& autoreconf -i \
|| autoreconf -i \
&& ./configure && make && sudo make install \
&& sudo ldconfig \
&& cd ..
# OpenBSC
cd $CURRENT && git clone -b fairwaves/master git://git.osmocom.org/openbsc.git \
&& cd openbsc/openbsc/ \
&& autoreconf -i \
&& ./configure --enable-smpp \
&& make && make check && sudo make install \
&& cd ../..
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver ipa
network
network country code 1
mobile network code 1
short name Osmocom
long name Osmocom
auth policy closed
location updating reject cause 13
encryption a5 0
neci 1
rrlp mode none
mm info 1
handover 0
handover window rxlev averaging 10
handover window rxqual averaging 1
handover window rxlev neighbor averaging 10
handover power budget interval 6
handover power budget hysteresis 3
handover maximum distance 9999
timer t3101 10
timer t3103 0
timer t3105 0
timer t3107 0
timer t3109 4
timer t3111 0
timer t3113 60
timer t3115 0
timer t3117 0
timer t3119 0
timer t3141 0
bts 0
type sysmobts
band GSM900
cell_identity 0
location_area_code 1
training_sequence_code 7
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
channel allocator ascending
rach tx integer 9
rach max transmission 7
ip.access unit_id 1801 0
oml ip.access stream_id 255 line 0
gprs mode none
trx 0
rf_locked 0
arfcn 74
nominal power 23
max_power_red 0
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
timeslot 1
phys_chan_config SDCCH8
timeslot 2
phys_chan_config TCH/F
timeslot 3
phys_chan_config TCH/F
timeslot 4
phys_chan_config TCH/F
timeslot 5
phys_chan_config TCH/F
timeslot 6
phys_chan_config TCH/F
timeslot 7
phys_chan_config TCH/F
trx 1
rf_locked 0
arfcn 84
nominal power 23
max_power_red 0
rsl e1 tei 0
timeslot 0
phys_chan_config TCH/F
timeslot 1
phys_chan_config TCH/F
timeslot 2
phys_chan_config TCH/F
timeslot 3
phys_chan_config TCH/F
timeslot 4
phys_chan_config TCH/F
timeslot 5
phys_chan_config TCH/F
timeslot 6
phys_chan_config TCH/F
timeslot 7
phys_chan_config TCH/F
smpp
local-tcp-port 2775
system-id OSMO-SMPP
policy closed
esme OSMPP
password 12345
default-route
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment