├── .gitignore
├── .gitmodules
├── .travis.yml
├── AUTHORS
├── CLI
├── CLI.cpp
├── CLI.h
├── CLIBase.cpp
├── CLICommands.cpp
├── CLIServer.cpp
├── Makefile.am
└── README.CLI
├── COPYING
├── ChangeLog
├── Control
├── CBS.cpp
├── CBS.h
├── CodecSet.h
├── ControlCommon.h
├── ControlTransfer.cpp
├── ControlTransfer.h
├── DCCHDispatch.cpp
├── L3CallControl.cpp
├── L3CallControl.h
├── L3Handover.cpp
├── L3Handover.h
├── L3LogicalChannel.cpp
├── L3LogicalChannel.h
├── L3MMLayer.cpp
├── L3MMLayer.h
├── L3MobilityManagement.cpp
├── L3MobilityManagement.h
├── L3SMSControl.cpp
├── L3SMSControl.h
├── L3StateMachine.cpp
├── L3StateMachine.h
├── L3SupServ.cpp
├── L3SupServ.h
├── L3TermCause.cpp
├── L3TermCause.h
├── L3TranEntry.cpp
├── L3TranEntry.h
├── L3Utils.cpp
├── L3Utils.h
├── Makefile.am
├── PagingEntry.cpp
├── PagingEntry.h
├── README.Control
├── RRLPServer.cpp
├── RRLPServer.h
├── RRLP_PDU_Test.cpp
├── TMSITable.cpp
├── TMSITable.h
└── ladders.awk
├── GPRS
├── BSSG.cpp
├── BSSG.h
├── BSSGMessages.cpp
├── BSSGMessages.h
├── ByteVector.cpp
├── ByteVector.h
├── CS4.txt
├── FEC.cpp
├── FEC.h
├── GPRSCLI.cpp
├── GPRSExport.h
├── GPRSInternal.h
├── GPRSRLC.h
├── GPRSTDMA.h
├── MAC.cpp
├── MAC.h
├── MSInfo.cpp
├── MSInfo.h
├── Makefile.am
├── MsgBase.cpp
├── MsgBase.h
├── RLC.cpp
├── RLCEngine.cpp
├── RLCEngine.h
├── RLCHdr.h
├── RLCMessages.cpp
├── RLCMessages.h
├── RList.h
├── ScalarTypes.h
├── TBF.cpp
├── TBF.h
├── makefile.pat
├── makefile.tests
├── notes.txt
├── pat.txt
├── pinghttp.c
└── todo.txt
├── GSM
├── AppInfTest.cpp
├── GSM610Tables.cpp
├── GSM610Tables.h
├── GSMCCCH.cpp
├── GSMCCCH.h
├── GSMChannelHistory.cpp
├── GSMChannelHistory.h
├── GSMCommon.cpp
├── GSMCommon.h
├── GSMConfig.cpp
├── GSMConfig.h
├── GSML1FEC.cpp
├── GSML1FEC.h
├── GSML2LAPDm.cpp
├── GSML2LAPDm.h
├── GSML3CCElements.cpp
├── GSML3CCElements.h
├── GSML3CCMessages.cpp
├── GSML3CCMessages.h
├── GSML3CommonElements.cpp
├── GSML3CommonElements.h
├── GSML3GPRSElements.cpp
├── GSML3GPRSElements.h
├── GSML3MMElements.cpp
├── GSML3MMElements.h
├── GSML3MMMessages.cpp
├── GSML3MMMessages.h
├── GSML3Message.cpp
├── GSML3Message.h
├── GSML3RRElements.cpp
├── GSML3RRElements.h
├── GSML3RRMessages.cpp
├── GSML3RRMessages.h
├── GSML3SSMessages.cpp
├── GSML3SSMessages.h
├── GSMLogicalChannel.cpp
├── GSMLogicalChannel.h
├── GSMRadioResource.cpp
├── GSMRadioResource.h
├── GSMSMSCBL3Messages.cpp
├── GSMSMSCBL3Messages.h
├── GSMTAPDump.cpp
├── GSMTAPDump.h
├── GSMTDMA.cpp
├── GSMTDMA.h
├── GSMTransfer.cpp
├── GSMTransfer.h
├── Makefile.am
├── PhysicalStatus.cpp
├── PhysicalStatus.h
├── PowerManager.cpp
├── PowerManager.h
└── gsmtap.h
├── GSMShare
├── A51.cpp
├── A51.h
├── A51Test.cpp
├── AMRTest.cpp
├── AmrCoder.cpp
├── AmrCoder.h
├── GSM503Tables.cpp
├── GSM503Tables.h
├── L3Enums.cpp
├── L3Enums.h
├── Makefile.am
├── Viterbi.h
├── ViterbiR204.cpp
├── ViterbiR204.h
└── ViterbiTest.cpp
├── Globals
├── GlobalVars.cpp
├── Globals.cpp
├── Globals.h
├── GrabRepoInfo.sh
└── Makefile.am
├── INSTALL
├── INSTALLATION
├── LEGAL
├── Makefile.am
├── Makefile.common
├── NEWS
├── Peering
├── Makefile.am
├── NeighborTable.cpp
├── NeighborTable.h
├── Peering.cpp
└── Peering.h
├── README
├── README.APIs.md
├── SGSNGGSN
├── GPRSL3Messages.cpp
├── GPRSL3Messages.h
├── Ggsn.cpp
├── Ggsn.h
├── LLC.cpp
├── LLC.h
├── Makefile.am
├── Sgsn.cpp
├── Sgsn.h
├── SgsnBase.h
├── SgsnCli.cpp
├── SgsnExport.h
├── iputils.cpp
├── miniggsn.cpp
└── miniggsn.h
├── SIP
├── Makefile.am
├── SIP2Interface.cpp
├── SIP2Interface.h
├── SIPBNF.txt
├── SIPBase.cpp
├── SIPBase.h
├── SIPDialog.cpp
├── SIPDialog.h
├── SIPExport.h
├── SIPMessage.cpp
├── SIPMessage.h
├── SIPParse.cpp
├── SIPParse.h
├── SIPRtp.cpp
├── SIPRtp.h
├── SIPTransaction.cpp
├── SIPTransaction.h
├── SIPUtility.cpp
└── SIPUtility.h
├── SMS
├── Makefile.am
├── SMSMessages.cpp
├── SMSMessages.h
├── SMSTransfer.cpp
└── SMSTransfer.h
├── Scanning
├── Makefile.am
├── Scanning.cpp
└── Scanning.h
├── TRXManager
├── Makefile.am
├── README.TRXManager
├── TRXManager.cpp
├── TRXManager.h
└── clockdump.sh
├── Transceiver52M
├── Complex.h
├── DummyLoad.cpp
├── DummyLoad.h
├── Makefile.am
├── README
├── README.DFEsymbolspaced
├── README.Talgorithm
├── Resampler.cpp
├── Resampler.h
├── Transceiver.cpp
├── Transceiver.h
├── UHDDevice.cpp
├── USRPDevice.cpp
├── USRPDevice.h
├── convert.c
├── convert.h
├── convolve.c
├── convolve.h
├── inband-signaling-usb
├── laurent.m
├── pulseApproximate.m
├── radioClock.cpp
├── radioClock.h
├── radioDevice.h
├── radioInterface.cpp
├── radioInterface.h
├── radioInterfaceResamp.cpp
├── radioVector.cpp
├── radioVector.h
├── runTransceiver.cpp
├── sigProcLib.cpp
├── sigProcLib.h
└── std_inband.rbf
├── TransceiverRAD1
├── Complex.h
├── DummyLoad.cpp
├── DummyLoad.h
├── FactoryCalibration.cpp
├── FactoryCalibration.h
├── Makefile.am
├── PowerScanner.cpp
├── RAD1Cmd.cpp
├── RAD1Device.cpp
├── RAD1Device.h
├── RAD1RxRawPower.cpp
├── RAD1RxRawPowerSweep.cpp
├── RAD1SN.cpp
├── RAD1ping.cpp
├── README
├── README.DFEsymbolspaced
├── README.Talgorithm
├── Transceiver.cpp
├── Transceiver.h
├── ad9862.h
├── burn-rnrad1-eeprom.sh
├── bytesex.h
├── commands.h
├── ezusb.ihx
├── fpga.rbf
├── fpga
│ ├── README.RAD1
│ ├── inband_lib
│ │ ├── chan_fifo_reader.v
│ │ ├── channel_demux.v
│ │ ├── channel_ram.v
│ │ ├── cmd_reader.v
│ │ ├── data_packet_fifo.v
│ │ ├── packet_builder.v
│ │ ├── register_io.v
│ │ ├── rx_buffer_inband.v
│ │ ├── test_comparator.v
│ │ ├── tx_buffer_inband.v
│ │ ├── tx_packer.v
│ │ ├── usb_fifo_reader.v
│ │ ├── usb_fifo_writer.v
│ │ └── usb_packet_fifo.v
│ ├── megacells
│ │ ├── accum32.bsf
│ │ ├── accum32.cmp
│ │ ├── accum32.inc
│ │ ├── accum32.v
│ │ ├── accum32_bb.v
│ │ ├── accum32_inst.v
│ │ ├── add32.bsf
│ │ ├── add32.cmp
│ │ ├── add32.inc
│ │ ├── add32.v
│ │ ├── add32_bb.v
│ │ ├── add32_inst.v
│ │ ├── addsub16.bsf
│ │ ├── addsub16.cmp
│ │ ├── addsub16.inc
│ │ ├── addsub16.v
│ │ ├── addsub16_bb.v
│ │ ├── addsub16_inst.v
│ │ ├── bustri.bsf
│ │ ├── bustri.cmp
│ │ ├── bustri.inc
│ │ ├── bustri.v
│ │ ├── bustri_bb.v
│ │ ├── bustri_inst.v
│ │ ├── clk_doubler.v
│ │ ├── clk_doubler_bb.v
│ │ ├── dspclkpll.v
│ │ ├── dspclkpll_bb.v
│ │ ├── fifo_1kx16.bsf
│ │ ├── fifo_1kx16.cmp
│ │ ├── fifo_1kx16.inc
│ │ ├── fifo_1kx16.v
│ │ ├── fifo_1kx16_bb.v
│ │ ├── fifo_1kx16_inst.v
│ │ ├── fifo_2k.v
│ │ ├── fifo_2k_bb.v
│ │ ├── fifo_4k.v
│ │ ├── fifo_4k_18.v
│ │ ├── fifo_4k_bb.v
│ │ ├── fifo_4kx16_dc.bsf
│ │ ├── fifo_4kx16_dc.cmp
│ │ ├── fifo_4kx16_dc.inc
│ │ ├── fifo_4kx16_dc.v
│ │ ├── fifo_4kx16_dc_bb.v
│ │ ├── fifo_4kx16_dc_inst.v
│ │ ├── mylpm_addsub.bsf
│ │ ├── mylpm_addsub.cmp
│ │ ├── mylpm_addsub.inc
│ │ ├── mylpm_addsub.v
│ │ ├── mylpm_addsub_bb.v
│ │ ├── mylpm_addsub_inst.v
│ │ ├── pll.v
│ │ ├── pll_bb.v
│ │ ├── pll_inst.v
│ │ ├── sub32.bsf
│ │ ├── sub32.cmp
│ │ ├── sub32.inc
│ │ ├── sub32.v
│ │ ├── sub32_bb.v
│ │ └── sub32_inst.v
│ ├── models
│ │ ├── bustri.v
│ │ ├── fifo.v
│ │ ├── fifo_1c_1k.v
│ │ ├── fifo_1c_2k.v
│ │ ├── fifo_1c_4k.v
│ │ ├── fifo_1k.v
│ │ ├── fifo_2k.v
│ │ ├── fifo_4k.v
│ │ ├── fifo_4k_18.v
│ │ ├── pll.v
│ │ └── ssram.v
│ ├── sdr_lib
│ │ ├── adc_interface.v
│ │ ├── atr_delay.v
│ │ ├── bidir_reg.v
│ │ ├── cic_dec_shifter.v
│ │ ├── cic_decim.v
│ │ ├── cic_int_shifter.v
│ │ ├── cic_interp.v
│ │ ├── clk_divider.v
│ │ ├── cordic.v
│ │ ├── cordic_stage.v
│ │ ├── ddc.v
│ │ ├── dpram.v
│ │ ├── duc.v
│ │ ├── ext_fifo.v
│ │ ├── fifo_1kx16.bsf
│ │ ├── fifo_1kx16.cmp
│ │ ├── fifo_1kx16.inc
│ │ ├── fifo_1kx16.v
│ │ ├── fifo_1kx16_bb.v
│ │ ├── fifo_1kx16_inst.v
│ │ ├── fifo_4kx16_dc.bsf
│ │ ├── fifo_4kx16_dc.cmp
│ │ ├── fifo_4kx16_dc.inc
│ │ ├── fifo_4kx16_dc.v
│ │ ├── fifo_4kx16_dc_bb.v
│ │ ├── fifo_4kx16_dc_inst.v
│ │ ├── gen_cordic_consts.py
│ │ ├── gen_sync.v
│ │ ├── hb
│ │ │ ├── acc.v
│ │ │ ├── coeff_rom.v
│ │ │ ├── halfband_decim.v
│ │ │ ├── halfband_interp.v
│ │ │ ├── mac.v
│ │ │ ├── mult.v
│ │ │ ├── ram16_2port.v
│ │ │ ├── ram16_2sum.v
│ │ │ └── ram32_2sum.v
│ │ ├── io_pins.v
│ │ ├── master_control.v
│ │ ├── master_control_multi.v
│ │ ├── phase_acc.v
│ │ ├── ram.v
│ │ ├── ram16.v
│ │ ├── ram32.v
│ │ ├── ram64.v
│ │ ├── rssi.v
│ │ ├── rx_buffer.v
│ │ ├── rx_chain.v
│ │ ├── rx_chain_dual.v
│ │ ├── rx_dcoffset.v
│ │ ├── serial_io.v
│ │ ├── setting_reg.v
│ │ ├── setting_reg_masked.v
│ │ ├── sign_extend.v
│ │ ├── strobe_gen.v
│ │ ├── tx_buffer.v
│ │ ├── tx_chain.v
│ │ └── tx_chain_hb.v
│ └── toplevel
│ │ ├── include
│ │ ├── common_config_1rxhb_1tx.vh
│ │ ├── common_config_2rxhb_2tx.vh
│ │ └── common_config_bottom.vh
│ │ └── usrp_inband_usb
│ │ ├── config.vh
│ │ ├── usrp_inband_usb.csf
│ │ ├── usrp_inband_usb.esf
│ │ ├── usrp_inband_usb.pin
│ │ ├── usrp_inband_usb.psf
│ │ ├── usrp_inband_usb.qpf
│ │ ├── usrp_inband_usb.qsf
│ │ └── usrp_inband_usb.v
├── fpga_regs.h
├── fusb.cpp
├── fusb.h
├── i2c.h
├── ids.h
├── inband-signaling-usb
├── interfaces.h
├── pulseApproximate.m
├── radioDevice.h
├── radioInterface.cpp
├── radioInterface.h
├── rnrad1.h
├── rnrad1Core.cpp
├── rnrad1Core.h
├── rnrad1Rx.cpp
├── rnrad1Tx.cpp
├── runTransceiver.cpp
├── sigProcLib.cpp
├── sigProcLib.h
├── sigProcLibTest.cpp
└── spi.h
├── apps
├── .gdbinit
├── CLI
├── GetConfigurationKeys.cpp
├── JSONEventsClient.cpp
├── Makefile.am
├── OpenBTS.cpp
├── OpenBTS.example.sql
├── OpenBTSCLI.cpp
├── OpenBTSConfig.h
├── OpenBTSDo
├── exportConfigTable.sh
├── generateConfigTable.sh
├── generateTeX.sh
├── importConfigTable.sh
├── iptables.rules
├── logrotated.OpenBTS
├── openbts.conf
├── openbtsconfig
└── rsyslogd.OpenBTS.conf
├── autogen.sh
├── config
├── Makefile.am
├── ax_check_compile_flag.m4
├── ax_ext.m4
├── ax_gcc_x86_avx_xgetbv.m4
├── ax_gcc_x86_cpuid.m4
├── pkg.m4
└── test_ortp_version.cpp
├── configure.ac
├── ctags.sh
├── debian
├── changelog
├── compat
├── control
├── postinst
├── postrm
├── preinst
├── prerm
└── rules
├── doc
├── CodingStandard
└── Makefile.am
├── package
├── deb-after-install.sh
├── deb-before-install.sh
├── rpm-after-install.sh
└── rpm-before-install.sh
└── tools
├── Makefile.am
├── Makefile.standalone
├── README
├── hata.cpp
└── translateConfig.py
/.gitignore:
--------------------------------------------------------------------------------
1 | ._*
2 | *.in
3 | .deps
4 | .libs
5 | *.o
6 | *.lo
7 | *.la
8 | Makefile
9 | aclocal.m4
10 | autom4te.cache
11 | build-arch-stamp
12 | build-indep-stamp
13 | compile
14 | config/test_ortp_version
15 | config.guess
16 | config.h
17 | config.log
18 | config.status
19 | config.sub
20 | config/libtool.m4
21 | config/ltoptions.m4
22 | config/ltsugar.m4
23 | config/ltversion.m4
24 | config/lt~obsolete.m4
25 | configure
26 | configure-stamp
27 | debian/debhelper.log
28 | depcomp
29 | install-sh
30 | libtool
31 | ltmain.sh
32 | missing
33 | stamp-h1
34 | Transceiver52M/transceiver
35 | TransceiverRAD1/RAD1Cmd
36 | TransceiverRAD1/RAD1RxRawPower
37 | TransceiverRAD1/RAD1RxRawPowerSweep
38 | TransceiverRAD1/RAD1SN
39 | TransceiverRAD1/RAD1ping
40 | TransceiverRAD1/sigProcLibTest
41 | TransceiverRAD1/transceiver
42 | apps/OpenBTS
43 | apps/OpenBTSCLI
44 | apps/JSONEventsClient
45 | GSMShare/A51Test
46 | GSMShare/AMRTest
47 | GSMShare/ViterbiTest
48 | TransceiverRAD1/PowerScanner
49 | debian/files
50 | debian/substvars
51 | debian/openbts*
52 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "CommonLibs"]
2 | path = CommonLibs
3 | url = https://github.com/RangeNetworks/CommonLibs.git
4 | branch = master
5 | [submodule "NodeManager"]
6 | path = NodeManager
7 | url = https://github.com/RangeNetworks/NodeManager.git
8 | branch = master
9 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: cpp
2 | compiler: gcc
3 |
4 | notifications:
5 | irc:
6 | channels:
7 | - "chat.freenode.net#openbts"
8 | template:
9 | - "%{repository} : %{message} : %{build_url}"
10 | on_success: change
11 | on_failure: always
12 |
13 | git:
14 | submodules: false
15 |
16 | before_install:
17 | - sudo apt-get update
18 | - sudo apt-get install -qq libortp-dev libusb-1.0-0-dev libreadline-dev
19 | - git clone https://github.com/RangeNetworks/liba53.git
20 | - cd liba53
21 | - dpkg-buildpackage -us -uc
22 | - cd ..
23 | - sudo dpkg -i liba53*.deb
24 | - git clone https://github.com/RangeNetworks/libcoredumper.git
25 | - cd libcoredumper
26 | - ./build.sh
27 | - sudo dpkg -i *.deb
28 | - cd ..
29 | - git submodule update --init --recursive
30 | - sudo ./NodeManager/install_libzmq.sh
31 |
32 | #install:
33 | # - sh bootstrap.sh
34 |
35 | script:
36 | - dpkg-buildpackage -us -uc
37 |
38 |
--------------------------------------------------------------------------------
/CLI/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2009 Free Software Foundation, Inc.
3 | # Copyright 2014 Range Networks, Inc.
4 | #
5 | # This software is distributed under the terms of the GNU Public License.
6 | # See the COPYING file in the main directory for details.
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation, either version 3 of the License, or
11 | # (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see .
20 | #
21 |
22 | include $(top_srcdir)/Makefile.common
23 |
24 | EXTRA_DIST = \
25 | README.CLI
26 |
27 | # AM_CXXFLAGS = -Wall
28 | # AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)
29 |
30 | noinst_LTLIBRARIES = libcli.la
31 |
32 | libcli_la_SOURCES = \
33 | CLIServer.cpp \
34 | CLICommands.cpp \
35 | CLIBase.cpp \
36 | CLI.cpp
37 |
38 | noinst_HEADERS = \
39 | CLI.h
40 |
--------------------------------------------------------------------------------
/CLI/README.CLI:
--------------------------------------------------------------------------------
1 | This is the directory for the OpenBTS command line interface.
2 |
3 |
--------------------------------------------------------------------------------
/ChangeLog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RangeNetworks/openbts/7766ef94f2d885c197430e74a89f02740f0c04e6/ChangeLog
--------------------------------------------------------------------------------
/Control/L3CallControl.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013, 2014 Range Networks, Inc.
3 | *
4 | * This software is distributed under multiple licenses;
5 | * see the COPYING file in the main directory for licensing
6 | * information for this specific distribution.
7 | *
8 | * This use of this software may be subject to additional restrictions.
9 | * See the LEGAL file in the main directory for details.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | */
15 |
16 | #ifndef _L3CALLCONTROL_H_
17 | #define _L3CALLCONTROL_H_ 1
18 |
19 | #include "L3StateMachine.h"
20 | #include
21 | #include
22 |
23 | namespace Control {
24 | void startMOC(const GSM::L3MMMessage *l3msg, MMContext *dcch, L3CMServiceType::TypeCode serviceType);
25 | void initMTC(TranEntry *tran);
26 | void startInboundHandoverMachine(TranEntry *tran);
27 |
28 | }; // namespace
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/Control/L3Handover.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Range Networks, Inc.
3 | *
4 |
5 | This program is distributed in the hope that it will be useful,
6 | but WITHOUT ANY WARRANTY; without even the implied warranty of
7 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8 |
9 | * This software is distributed under multiple licenses;
10 | * see the COPYING file in the main directory for licensing
11 | * information for this specific distribution.
12 | *
13 | * This use of this software may be subject to additional restrictions.
14 | * See the LEGAL file in the main directory for details.
15 | */
16 |
17 | #ifndef L3HANDOVER_H
18 | #define L3HANDOVER_H
19 |
20 | namespace GSM {
21 | class L3MeasurementResults;
22 | class SACCHLogicalChannel;
23 | };
24 |
25 | namespace Control {
26 | class L3LogicalChannel;
27 | class TranEntry;
28 |
29 | void ProcessHandoverAccess(L3LogicalChannel *chan);
30 | bool outboundHandoverTransfer(TranEntry* transaction, L3LogicalChannel *TCH);
31 | void HandoverDetermination(const GSM::L3MeasurementResults* measurements, GSM::SACCHLogicalChannel* sacch);
32 | };
33 | #endif
34 |
--------------------------------------------------------------------------------
/Control/L3SMSControl.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013, 2014 Range Networks, Inc.
3 | *
4 | * This software is distributed under multiple licenses;
5 | * see the COPYING file in the main directory for licensing
6 | * information for this specific distribution.
7 | *
8 | * This use of this software may be subject to additional restrictions.
9 | * See the LEGAL file in the main directory for details.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | */
15 |
16 | #ifndef _L3SMSCONTROL_H_
17 | #define _L3SMSCONTROL_H_
18 |
19 | #include "L3LogicalChannel.h"
20 | #include "ControlCommon.h"
21 |
22 | namespace Control {
23 |
24 | // 3GPP 4.11 5.2. These are the SMS states. It is nearly empty. The only one we care about is awaiting the final ack.
25 | enum SmsState {
26 | SmsNonexistent, // Not an SMS state; we use to mean there is no SMS transaction.
27 | MoSmsIdle,
28 | MoSmsWaitForAck,
29 | // In the spec this is a catch-all for any other state. For us this is a transitory state we dont care about because
30 | // the TranEntry will be removed momentarily.
31 | MoSmsMMConnection,
32 | };
33 |
34 | void startMOSMS(const GSM::L3MMMessage *l3msg, MMContext *dcch);
35 | void initMTSMS(TranEntry *tran);
36 |
37 | };
38 | #endif
39 |
--------------------------------------------------------------------------------
/Control/L3SupServ.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013, 2014 Range Networks, Inc.
3 | *
4 | * This software is distributed under multiple licenses;
5 | * see the COPYING file in the main directory for licensing
6 | * information for this specific distribution.
7 | *
8 | * This use of this software may be subject to additional restrictions.
9 | * See the LEGAL file in the main directory for details.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | */
15 |
16 | #ifndef _L3SUPSERV_H_
17 | #define _L3SUPSERV_H_ 1
18 |
19 |
20 | #include "ControlCommon.h"
21 | #include "L3StateMachine.h"
22 | #include
23 |
24 | namespace Control {
25 |
26 | // The base class for SS [Supplementary Services]
27 | class SSDBase : public MachineBase {
28 | protected:
29 | MachineStatus handleSSMessage(const GSM::L3Message*ssmsg);
30 | SSDBase(TranEntry *wTran) : MachineBase(wTran) {}
31 | };
32 |
33 | void startMOSSD(const GSM::L3CMServiceRequest*cmsrq, MMContext *mmchan);
34 | string ssMap2Ussd(const unsigned char *mapcmd,unsigned maplen);
35 |
36 | };
37 | #endif
38 |
--------------------------------------------------------------------------------
/Control/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2008 Free Software Foundation, Inc.
3 | # Copyright 2010 Kestrel Signal Processing, Inc.
4 | # Copyright 2011, 2014 Range Networks, Inc.
5 | #
6 | # This software is distributed under the terms of the GNU Public License.
7 | # See the COPYING file in the main directory for details.
8 | #
9 | # This program is free software: you can redistribute it and/or modify
10 | # it under the terms of the GNU General Public License as published by
11 | # the Free Software Foundation, either version 3 of the License, or
12 | # (at your option) any later version.
13 | #
14 | # This program is distributed in the hope that it will be useful,
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | # GNU General Public License for more details.
18 | #
19 | # You should have received a copy of the GNU General Public License
20 | # along with this program. If not, see .
21 | #
22 |
23 | include $(top_srcdir)/Makefile.common
24 |
25 | # AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)
26 | # AM_CXXFLAGS = -Wall
27 |
28 | EXTRA_DIST = README.Control
29 |
30 | noinst_LTLIBRARIES = libcontrol.la
31 |
32 |
33 | # L3CallControl.cpp
34 | libcontrol_la_SOURCES = \
35 | L3TermCause.cpp \
36 | L3CallControl.cpp \
37 | PagingEntry.cpp \
38 | L3Handover.cpp \
39 | L3SMSControl.cpp \
40 | L3MobilityManagement.cpp \
41 | L3StateMachine.cpp \
42 | L3SupServ.cpp \
43 | L3MMLayer.cpp \
44 | L3TranEntry.cpp \
45 | L3LogicalChannel.cpp \
46 | L3Utils.cpp \
47 | TMSITable.cpp \
48 | ControlTransfer.cpp \
49 | DCCHDispatch.cpp \
50 | CBS.cpp \
51 | RRLPServer.cpp
52 |
53 |
54 | # TODO - move CollectMSInfo.cpp and RRLPQueryController.cpp to RRLP directory.
55 |
56 | noinst_HEADERS = \
57 | L3TermCause.h \
58 | CodecSet.h \
59 | PagingEntry.h \
60 | L3Handover.h \
61 | L3SMSControl.h \
62 | L3CallControl.h \
63 | L3MobilityManagement.h \
64 | L3StateMachine.h \
65 | L3SupServ.h \
66 | L3MMLayer.h \
67 | L3TranEntry.h \
68 | L3LogicalChannel.h \
69 | L3Utils.h \
70 | ControlCommon.h \
71 | ControlTransfer.h \
72 | TMSITable.h \
73 | TMSITable.h \
74 | CBS.h \
75 | RRLPServer.h
76 |
--------------------------------------------------------------------------------
/Control/README.Control:
--------------------------------------------------------------------------------
1 | This directory contains control-layer functions for the access point.
2 |
3 | Most GSM L3 and VoIP messages terminate here.
4 |
5 | Everything in this directory should be in the Control namespace.
6 |
7 | Components:
8 |
9 | RadioResource -- Functions for RR procedures (paging, access grant)
10 | MobilityManagement -- Functions for MM procedures (CM service, location updating)
11 | CallControl -- Functions for CC (mobile originated, mobile terminated)
12 | SMS -- Funcitons for text messaging.
13 |
14 |
15 |
16 | SIP and RTP UDP/IP Port Assignments
17 |
18 | Component Protocol Port(s)
19 | Asterisk SIP 5060
20 | Zoiper SIP 5061
21 | AP/BTS SIP 5062
22 | Zoiper RTP 16384-16385
23 | Asterisk RTP 16386-16483
24 | AP/BTS RTP 16484-16583
25 |
26 |
--------------------------------------------------------------------------------
/Control/RRLPServer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RangeNetworks/openbts/7766ef94f2d885c197430e74a89f02740f0c04e6/Control/RRLPServer.cpp
--------------------------------------------------------------------------------
/Control/RRLPServer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RangeNetworks/openbts/7766ef94f2d885c197430e74a89f02740f0c04e6/Control/RRLPServer.h
--------------------------------------------------------------------------------
/Control/RRLP_PDU_Test.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Range Networks, Inc.
3 | *
4 | This program is distributed in the hope that it will be useful,
5 | but WITHOUT ANY WARRANTY; without even the implied warranty of
6 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 |
8 | * This software is distributed under multiple licenses;
9 | * see the COPYING file in the main directory for licensing
10 | * information for this specific distribution.
11 | *
12 | * This use of this software may be subject to additional restrictions.
13 | * See the LEGAL file in the main directory for details.
14 | */
15 |
16 | #include "Configuration.h"
17 | #include "RRLPQueryController.h"
18 |
19 | using namespace GSM;
20 | using namespace GSM::RRLP;
21 |
22 | // compile one liner:
23 | // g++ -DRRLP_TEST_HACK -L../GSM/.libs -L../CommonLibs/.libs -I../CLI -I../Globals -I../GSM -I../CommonLibs RRLPQueryController.cpp RRLP_PDU_Test.cpp -lcommon -lGSM -lpthread -o RRLP_PDU_Test
24 |
25 | // Required by various stuff - I think a TODO is to allow tests to work without
26 | // having to copy this line around.
27 | ConfigurationTable gConfig("OpenBTS.config");
28 |
29 | int main()
30 | {
31 | // This is a MsrPositionRsp with valid coordinates
32 | // 38.28411340713501,237.95414686203003,22 (as parsed by the erlang automatically generated
33 | // implementation - checked against a map).
34 | BitVector test("0000011000111000000000000001011000100010000100011111111111111111010010101111101111011110101101100100000011010110110100111000111010100011110010010100111000000000010001000001100000011000110010000010000100010000");
35 | RRLPQueryController c(test);
36 | return 0;
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/GPRS/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2008 Free Software Foundation, Inc.
3 | # Copyright 2014 Range Networks, Inc.
4 | #
5 | # This software is distributed under the terms of the GNU Public License.
6 | # See the COPYING file in the main directory for details.
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation, either version 3 of the License, or
11 | # (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see .
20 | #
21 |
22 | include $(top_srcdir)/Makefile.common
23 |
24 | # AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)
25 | # CXXFLAGS = -g -O2
26 |
27 | noinst_LTLIBRARIES = libGPRS.la
28 |
29 | libGPRS_la_SOURCES = \
30 | MSInfo.cpp \
31 | RLCEngine.cpp \
32 | TBF.cpp \
33 | MAC.cpp \
34 | FEC.cpp \
35 | RLCEngine.cpp \
36 | RLCMessages.cpp \
37 | ByteVector.cpp \
38 | GPRSCLI.cpp \
39 | RLC.cpp \
40 | MsgBase.cpp
41 | #BSSGMessages.cpp
42 | #BSSG.cpp
43 |
44 | noinst_HEADERS = \
45 | ByteVector.h \
46 | FEC.h \
47 | GPRSExport.h \
48 | GPRSInternal.h \
49 | GPRSTDMA.h \
50 | MAC.h \
51 | MsgBase.h \
52 | GPRSRLC.h \
53 | RLCEngine.h \
54 | RLCHdr.h \
55 | RLCMessages.h \
56 | RList.h \
57 | ScalarTypes.h \
58 | TBF.h \
59 | MSInfo.h
60 | # BSSG.h
61 | # BSSGMessages.h
62 |
--------------------------------------------------------------------------------
/GPRS/makefile.tests:
--------------------------------------------------------------------------------
1 | HDR=BSSG.h BSSGMessages.h ByteVector.h FEC.h GPRSExport.h GPRSInternal.h \
2 | GPRSTDMA.h MAC.h MsgBase.h RLCEngine.h RLCHdr.h RLCMessages.h RList.h \
3 | ScalarTypes.h TBF.h Transfer.h Utils.h
4 | #HDR= Utils.h BSSG.h BSSGMessages.h FEC.h GPRSExport.h GPRSInternal.h \
5 | # GPRSTDMA.h MAC.h RLCEngine.h RLCHdr.h RLCMessages.h TBF.h Transfer.h Utils.h BaseTypes.h
6 | SRC= GPRSConfig.cpp TBF.cpp RLCMessages.cpp BSSG.cpp BSSGMessages.cpp ByteVector.cpp FEC.cpp MAC.cpp MsgBase.cpp \
7 | RLCEngine.cpp Transfer.cpp Utils.cpp
8 |
9 | INCLUDE= -I. -I.. -I../CommonLibs -I../Control -I../GPRS -I../GSM -I../SIP -I../SMS -I../TRXManager -I../Globals -I../CLI -I../HLR -I../SR -I../sqlite3
10 |
11 | ODIR=.libs
12 |
13 | OBJ= $(SRC:%.cpp=$(ODIR)/%.o)
14 |
15 |
16 | all: lib
17 |
18 | test1: test1.cpp Makefile libGPRS.a
19 | g++ $(INCLUDE) -o test1 test1.cpp libGPRS.a ../CommonLibs/.libs/libcommon.a
20 |
21 | test2: test1.cpp Makefile libGPRS.a
22 | g++ $(INCLUDE) -o test1 test1.cpp libGPRS.a ../CommonLibs/.libs/libcommon.a ../GSM/.libs/libGSM.a
23 |
24 | lib: $(OBJ)
25 | ar cru $(ODIR)/libGPRS.a $(OBJ)
26 | touch libGPRS.la
27 |
28 | #.cpp.o:
29 | $(ODIR)/%.o: %.cpp
30 | -mkdir o 2>/dev/null
31 | g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../CommonLibs -I../Control -I../GPRS -I../GSM -I../SIP -I../SMS -I../TRXManager -I../Globals -I../CLI -I../HLR -I../SR -I../sqlite3 -Wall -g -c -o $(ODIR)/$*.o $*.cpp
32 |
33 |
34 |
35 |
36 | # g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../CommonLibs -I../Control -I../GPRS -I../GSM -I../SIP -I../SMS -I../TRXManager -I../Globals -I../CLI -I../HLR -I../SR -I../sqlite3 -Wall -O3 -g -O2 -MT RadioResource.lo -MD -MP -MF ".deps/RadioResource.Tpo" -c -o RadioResource.lo RadioResource.cpp; \
37 | then mv -f ".deps/RadioResource.Tpo" ".deps/RadioResource.Plo"; else rm -f ".deps/RadioResource.Tpo"; exit 1; fi
38 |
39 | $(OBJ):$(HDR)
40 |
41 | svnadd:
42 | svn add $(HDR) $(SRC)
43 |
44 | clean:
45 | /bin/rm $(ODIR)/*
46 |
47 | commit:
48 | svn commit $(HDR) $(SRC)
49 |
50 | ping: ping.o
51 | gcc -o ping ping.c
52 |
53 | pinghttp: pinghttp.c iputils.c makefile.tests
54 | gcc -DSTANDALONE=1 -o pinghttp $(CFLAGS) pinghttp.c iputils.c
55 |
56 |
57 | tags: .ALWAYS
58 | cd ..; sh PAT.ctags
59 |
60 | .ALWAYS:
61 |
--------------------------------------------------------------------------------
/GSM/AppInfTest.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011, 2014 Range Networks, Inc.
3 | *
4 | * This software is distributed under multiple licenses;
5 | * see the COPYING file in the main directory for licensing
6 | * information for this specific distribution.
7 | *
8 | * This use of this software may be subject to additional restrictions.
9 | * See the LEGAL file in the main directory for details.
10 |
11 | This program is distributed in the hope that it will be useful,
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | */
15 |
16 | #define LOG_GROUP LogGroup::GSM // Can set Log.Level.GSM for debugging
17 |
18 | #include
19 |
20 | #include
21 | #include
22 |
23 | // Load configuration from a file.
24 | ConfigurationTable gConfig("OpenBTS.config");
25 |
26 | int main()
27 | {
28 | GSM::L3ApplicationInformation ai();
29 | static const char init_request_msbased_gps[4] = {'@', '\x01', 'x', '\xa8'}; // pre encoded PER for the following XER:
30 | static std::vector request_msbased_gps(init_request_msbased_gps,
31 | init_request_msbased_gps + sizeof(init_request_msbased_gps));
32 | GSM::L3ApplicationInformation ai2(request_msbased_gps);
33 |
34 | GSM::L3Frame f(ai2);
35 | std::cout << f;
36 |
37 | return 0;
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/GSM/GSM610Tables.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008 Free Software Foundation, Inc.
3 | * Copyright 2014 Range Networks, Inc.
4 | *
5 | * This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribution.
6 | *
7 | * This use of this software may be subject to additional restrictions.
8 | * See the LEGAL file in the main directory for details.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 |
14 | */
15 |
16 |
17 |
18 | #ifndef GSM610TABLES_H
19 | #define GSM610TABLES_H
20 |
21 |
22 |
23 | namespace GSM {
24 |
25 | /** Table #2 from GSM 05.03 */
26 | extern const unsigned int g610BitOrder[260];
27 |
28 | }
29 |
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/GSM/GSMTAPDump.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008, 2009 Free Software Foundation, Inc.
3 | * Copyright 2014 Range Networks, Inc.
4 | *
5 | * This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribution.
6 | *
7 | This program is distributed in the hope that it will be useful,
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 |
11 | *
12 | * This use of this software may be subject to additional restrictions.
13 | * See the LEGAL file in the main directory for details.
14 |
15 | */
16 |
17 |
18 |
19 | #ifndef GSMTAPDUMP_H
20 | #define GSMTAPDUMP_H
21 |
22 | #include "gsmtap.h"
23 | #include "GSMCommon.h"
24 | #include "GSMTransfer.h"
25 |
26 |
27 | void gWriteGSMTAP(unsigned ARFCN, unsigned TS, unsigned FN,
28 | GSM::TypeAndOffset to, bool is_sacch, bool ul_dln,
29 | const BitVector2& frame,
30 | unsigned wType = GSMTAP_TYPE_UM);
31 | #endif
32 |
33 | // vim: ts=4 sw=4
34 |
--------------------------------------------------------------------------------
/GSM/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2008 Free Software Foundation, Inc.
3 | # Copyright 2014 Range Networks, Inc.
4 | #
5 | # This software is distributed under the terms of the GNU Public License.
6 | # See the COPYING file in the main directory for details.
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation, either version 3 of the License, or
11 | # (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see .
20 | #
21 |
22 | include $(top_srcdir)/Makefile.common
23 |
24 | #AM_CPPFLAGS = -Wall $(STD_DEFINES_AND_INCLUDES)
25 | #AM_CXXFLAGS = -O2 -g
26 |
27 | noinst_LTLIBRARIES = libGSM.la
28 |
29 | libGSM_la_SOURCES = \
30 | GSMChannelHistory.cpp \
31 | GSMCCCH.cpp \
32 | GSMRadioResource.cpp \
33 | GSML3SSMessages.cpp \
34 | GSM610Tables.cpp \
35 | GSMCommon.cpp \
36 | GSMConfig.cpp \
37 | GSML1FEC.cpp \
38 | GSML2LAPDm.cpp \
39 | GSML3CCElements.cpp \
40 | GSML3CCMessages.cpp \
41 | GSML3CommonElements.cpp \
42 | GSML3GPRSElements.cpp \
43 | GSML3Message.cpp \
44 | GSML3MMElements.cpp \
45 | GSML3MMMessages.cpp \
46 | GSML3RRElements.cpp \
47 | GSML3RRMessages.cpp \
48 | GSMLogicalChannel.cpp \
49 | GSMTDMA.cpp \
50 | GSMTransfer.cpp \
51 | GSMTAPDump.cpp \
52 | GSMSMSCBL3Messages.cpp \
53 | PowerManager.cpp\
54 | PhysicalStatus.cpp
55 |
56 | noinst_HEADERS = \
57 | GSMChannelHistory.h \
58 | GSMCCCH.h \
59 | GSMRadioResource.h \
60 | GSML3SSMessages.h \
61 | GSM610Tables.h \
62 | GSMCommon.h \
63 | GSMConfig.h \
64 | GSML1FEC.h \
65 | GSML2LAPDm.h \
66 | GSML3CCElements.h \
67 | GSML3CCMessages.h \
68 | GSML3CommonElements.h \
69 | GSML3GPRSElements.h \
70 | GSML3Message.h \
71 | GSML3MMElements.h \
72 | GSML3MMMessages.h \
73 | GSML3RRElements.h \
74 | GSML3RRMessages.h \
75 | GSMLogicalChannel.h \
76 | GSMTDMA.h \
77 | GSMTransfer.h \
78 | PowerManager.h \
79 | GSMTAPDump.h \
80 | GSMSMSCBL3Messages.h \
81 | gsmtap.h \
82 | PhysicalStatus.h
83 |
84 |
--------------------------------------------------------------------------------
/GSM/PhysicalStatus.h:
--------------------------------------------------------------------------------
1 | /**@file Declarations for PhysicalStatus and related classes. */
2 | /*
3 | * Copyright 2010 Kestrel Signal Processing, Inc.
4 | * Copyright 2011, 2014 Range Networks, Inc.
5 | *
6 | * This software is distributed under multiple licenses;
7 | * see the COPYING file in the main directory for licensing
8 | * information for this specific distribution.
9 | *
10 | * This use of this software may be subject to additional restrictions.
11 | * See the LEGAL file in the main directory for details.
12 |
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 |
17 | */
18 |
19 |
20 |
21 | #ifndef PHYSICALSTATUS_H
22 | #define PHYSICALSTATUS_H
23 |
24 | #include