2011-02-11 17:36:18 +00:00
|
|
|
/* Ericsson RBS-2xxx specific code */
|
|
|
|
|
|
|
|
/* (C) 2011 by Harald Welte <laforge@gnumonks.org>
|
|
|
|
*
|
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2011-03-22 15:47:59 +00:00
|
|
|
#include <osmocom/gsm/tlv.h>
|
2011-02-11 17:36:18 +00:00
|
|
|
|
2017-09-04 13:15:32 +00:00
|
|
|
#include <osmocom/bsc/debug.h>
|
|
|
|
#include <osmocom/bsc/gsm_data.h>
|
|
|
|
#include <osmocom/bsc/abis_om2000.h>
|
|
|
|
#include <osmocom/bsc/abis_nm.h>
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
#include <osmocom/abis/e1_input.h>
|
2017-09-04 13:15:32 +00:00
|
|
|
#include <osmocom/bsc/signal.h>
|
2011-02-11 17:36:18 +00:00
|
|
|
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
#include <osmocom/abis/lapd.h>
|
2011-02-11 17:36:18 +00:00
|
|
|
|
2011-02-13 18:44:47 +00:00
|
|
|
static void bootstrap_om_bts(struct gsm_bts *bts)
|
2011-02-11 17:36:18 +00:00
|
|
|
{
|
|
|
|
LOGP(DNM, LOGL_NOTICE, "bootstrapping OML for BTS %u\n", bts->nr);
|
2016-07-09 20:20:57 +00:00
|
|
|
|
|
|
|
/* FIXME: this is global init, not bootstrapping */
|
|
|
|
abis_om2k_bts_init(bts);
|
|
|
|
abis_om2k_trx_init(bts->c0);
|
|
|
|
|
|
|
|
/* TODO: Should we wait for a Failure report? */
|
|
|
|
om2k_bts_fsm_start(bts);
|
2011-02-11 17:36:18 +00:00
|
|
|
}
|
|
|
|
|
2011-02-13 18:44:47 +00:00
|
|
|
static void bootstrap_om_trx(struct gsm_bts_trx *trx)
|
|
|
|
{
|
|
|
|
LOGP(DNM, LOGL_NOTICE, "bootstrapping OML for TRX %u/%u\n",
|
|
|
|
trx->bts->nr, trx->nr);
|
2016-07-09 20:20:57 +00:00
|
|
|
/* FIXME */
|
2011-02-13 18:44:47 +00:00
|
|
|
}
|
|
|
|
|
2011-02-11 17:36:18 +00:00
|
|
|
static int shutdown_om(struct gsm_bts *bts)
|
|
|
|
{
|
|
|
|
/* FIXME */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-02-13 10:58:21 +00:00
|
|
|
|
|
|
|
/* Tell LAPD to start start the SAP (send SABM requests) for all signalling
|
|
|
|
* timeslots in this line */
|
2011-02-13 13:26:54 +00:00
|
|
|
static void start_sabm_in_line(struct e1inp_line *line, int start)
|
2011-02-13 10:58:21 +00:00
|
|
|
{
|
|
|
|
struct e1inp_sign_link *link;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(line->ts); i++) {
|
|
|
|
struct e1inp_ts *ts = &line->ts[i];
|
|
|
|
|
|
|
|
if (ts->type != E1INP_TS_TYPE_SIGN)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
llist_for_each_entry(link, &ts->sign.sign_links, list) {
|
2016-11-11 18:42:19 +00:00
|
|
|
if (!ts->lapd)
|
|
|
|
continue;
|
2016-10-26 12:20:06 +00:00
|
|
|
lapd_instance_set_profile(ts->lapd,
|
|
|
|
&lapd_profile_abis_ericsson);
|
|
|
|
|
2011-02-13 13:26:54 +00:00
|
|
|
if (start)
|
2011-08-26 17:14:55 +00:00
|
|
|
lapd_sap_start(ts->lapd, link->tei, link->sapi);
|
2011-02-13 13:26:54 +00:00
|
|
|
else
|
2011-08-26 17:14:55 +00:00
|
|
|
lapd_sap_stop(ts->lapd, link->tei, link->sapi);
|
2011-02-13 10:58:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-11 17:36:18 +00:00
|
|
|
/* Callback function to be called every time we receive a signal from INPUT */
|
|
|
|
static int gbl_sig_cb(unsigned int subsys, unsigned int signal,
|
|
|
|
void *handler_data, void *signal_data)
|
|
|
|
{
|
|
|
|
struct gsm_bts *bts;
|
|
|
|
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
if (subsys != SS_L_GLOBAL)
|
2011-02-11 17:36:18 +00:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
switch (signal) {
|
|
|
|
case S_GLOBAL_BTS_CLOSE_OM:
|
|
|
|
bts = signal_data;
|
|
|
|
if (bts->type == GSM_BTS_TYPE_RBS2000)
|
|
|
|
shutdown_om(signal_data);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Callback function to be called every time we receive a signal from INPUT */
|
|
|
|
static int inp_sig_cb(unsigned int subsys, unsigned int signal,
|
|
|
|
void *handler_data, void *signal_data)
|
|
|
|
{
|
|
|
|
struct input_signal_data *isd = signal_data;
|
2016-10-16 21:44:16 +00:00
|
|
|
struct e1inp_ts *e1i_ts;
|
2011-02-11 17:36:18 +00:00
|
|
|
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
if (subsys != SS_L_INPUT)
|
2011-02-11 17:36:18 +00:00
|
|
|
return 0;
|
|
|
|
|
2017-05-25 17:16:40 +00:00
|
|
|
LOGP(DNM, LOGL_DEBUG, "%s(): Input signal '%s' received\n", __func__,
|
|
|
|
get_value_string(e1inp_signal_names, signal));
|
2011-02-11 17:36:18 +00:00
|
|
|
switch (signal) {
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
case S_L_INP_TEI_UP:
|
2011-02-11 17:36:18 +00:00
|
|
|
switch (isd->link_type) {
|
|
|
|
case E1INP_SIGN_OML:
|
2011-02-13 18:44:47 +00:00
|
|
|
if (isd->trx->bts->type != GSM_BTS_TYPE_RBS2000)
|
|
|
|
break;
|
|
|
|
if (isd->tei == isd->trx->bts->oml_tei)
|
|
|
|
bootstrap_om_bts(isd->trx->bts);
|
|
|
|
else
|
|
|
|
bootstrap_om_trx(isd->trx);
|
2011-02-11 17:36:18 +00:00
|
|
|
break;
|
|
|
|
}
|
2011-02-11 17:59:31 +00:00
|
|
|
break;
|
2016-10-16 21:44:16 +00:00
|
|
|
case S_L_INP_TEI_DN:
|
|
|
|
if (isd->trx->bts->type != GSM_BTS_TYPE_RBS2000)
|
|
|
|
break;
|
|
|
|
LOGP(DNM, LOGL_NOTICE, "Line-%u TS-%u TEI-%u SAPI-%u: Link "
|
|
|
|
"Lost for Ericsson RBS2000. Re-starting DL Establishment\n",
|
|
|
|
isd->line->num, isd->ts_nr, isd->tei, isd->sapi);
|
|
|
|
/* Some datalink for a given TEI/SAPI went down, try to re-start it */
|
|
|
|
e1i_ts = &isd->line->ts[isd->ts_nr-1];
|
|
|
|
OSMO_ASSERT(e1i_ts->type == E1INP_TS_TYPE_SIGN);
|
|
|
|
lapd_sap_start(e1i_ts->lapd, isd->tei, isd->sapi);
|
|
|
|
break;
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
case S_L_INP_LINE_INIT:
|
2011-09-26 09:44:22 +00:00
|
|
|
case S_L_INP_LINE_NOALARM:
|
|
|
|
if (strcasecmp(isd->line->driver->name, "DAHDI")
|
2016-11-01 22:39:03 +00:00
|
|
|
&& strcasecmp(isd->line->driver->name, "MISDN_LAPD")
|
|
|
|
&& strcasecmp(isd->line->driver->name, "UNIXSOCKET"))
|
2011-02-11 17:36:18 +00:00
|
|
|
break;
|
2011-02-13 13:26:54 +00:00
|
|
|
start_sabm_in_line(isd->line, 1);
|
|
|
|
break;
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
case S_L_INP_LINE_ALARM:
|
2011-09-26 09:44:22 +00:00
|
|
|
if (strcasecmp(isd->line->driver->name, "DAHDI")
|
2016-11-01 22:39:03 +00:00
|
|
|
&& strcasecmp(isd->line->driver->name, "MISDN_LAPD")
|
|
|
|
&& strcasecmp(isd->line->driver->name, "UNIXSOCKET"))
|
2011-02-13 13:26:54 +00:00
|
|
|
break;
|
|
|
|
start_sabm_in_line(isd->line, 0);
|
|
|
|
break;
|
2011-02-11 17:36:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-02-14 15:17:49 +00:00
|
|
|
static void config_write_bts(struct vty *vty, struct gsm_bts *bts)
|
|
|
|
{
|
|
|
|
abis_om2k_config_write_bts(vty, bts);
|
|
|
|
}
|
|
|
|
|
bsc: on-demand setup of nanoBTS and HSL femto sockets
The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.
This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.
I added two new attributes to the gsm_bts object, they are:
* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.
* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().
Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.
While I was at it, I added several changes/cleanups to this patch:
* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.
* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.
* Add missing e1inp_init() in osmo-bsc.
* Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-14 09:32:48 +00:00
|
|
|
static int bts_model_rbs2k_start(struct gsm_network *net);
|
|
|
|
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
static void bts_model_rbs2k_e1line_bind_ops(struct e1inp_line *line)
|
|
|
|
{
|
|
|
|
e1inp_line_bind_ops(line, &bts_isdn_e1inp_line_ops);
|
|
|
|
}
|
|
|
|
|
2011-02-14 15:17:49 +00:00
|
|
|
static struct gsm_bts_model model_rbs2k = {
|
|
|
|
.type = GSM_BTS_TYPE_RBS2000,
|
|
|
|
.name = "rbs2000",
|
bsc: on-demand setup of nanoBTS and HSL femto sockets
The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.
This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.
I added two new attributes to the gsm_bts object, they are:
* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.
* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().
Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.
While I was at it, I added several changes/cleanups to this patch:
* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.
* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.
* Add missing e1inp_init() in osmo-bsc.
* Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-14 09:32:48 +00:00
|
|
|
.start = bts_model_rbs2k_start,
|
2011-02-14 15:17:49 +00:00
|
|
|
.oml_rcvmsg = &abis_om2k_rcvmsg,
|
|
|
|
.config_write_bts = &config_write_bts,
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
.e1line_bind_ops = &bts_model_rbs2k_e1line_bind_ops,
|
2011-02-14 15:17:49 +00:00
|
|
|
};
|
|
|
|
|
bsc: on-demand setup of nanoBTS and HSL femto sockets
The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.
This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.
I added two new attributes to the gsm_bts object, they are:
* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.
* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().
Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.
While I was at it, I added several changes/cleanups to this patch:
* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.
* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.
* Add missing e1inp_init() in osmo-bsc.
* Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-14 09:32:48 +00:00
|
|
|
static int bts_model_rbs2k_start(struct gsm_network *net)
|
2011-02-11 17:36:18 +00:00
|
|
|
{
|
|
|
|
model_rbs2k.features.data = &model_rbs2k._features_data[0];
|
|
|
|
model_rbs2k.features.data_len = sizeof(model_rbs2k._features_data);
|
|
|
|
|
2016-10-27 15:54:00 +00:00
|
|
|
gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_GPRS);
|
|
|
|
gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_EGPRS);
|
2011-02-11 17:36:18 +00:00
|
|
|
gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_HOPPING);
|
|
|
|
gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_HSCSD);
|
2014-01-19 16:10:50 +00:00
|
|
|
gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_MULTI_TSC);
|
2011-02-11 17:36:18 +00:00
|
|
|
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL);
|
|
|
|
osmo_signal_register_handler(SS_L_GLOBAL, gbl_sig_cb, NULL);
|
2011-02-11 17:36:18 +00:00
|
|
|
|
bsc: on-demand setup of nanoBTS and HSL femto sockets
The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.
This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.
I added two new attributes to the gsm_bts object, they are:
* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.
* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().
Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.
While I was at it, I added several changes/cleanups to this patch:
* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.
* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.
* Add missing e1inp_init() in osmo-bsc.
* Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-14 09:32:48 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int bts_model_rbs2k_init(void)
|
|
|
|
{
|
2011-02-11 17:36:18 +00:00
|
|
|
return gsm_bts_model_register(&model_rbs2k);
|
|
|
|
}
|