Commit Graph

8521 Commits

Author SHA1 Message Date
Matan Perelman ba3fe2c908 ctrl: Add setting access control class
Change-Id: I7abbf0adc3798e9224834a68d7cdce4bbe03c9a3
2023-05-01 22:16:30 +03:00
Matan Perelman a8fcc1bb73 ctrl: Add getting access control class
Change-Id: I279249f9047f5edacc9edf3d231e3e74023fc84e
2023-05-01 22:16:30 +03:00
Matan Perelman f4d9dfe6bd ctrl: Add cell reselection hysteresis control
Change-Id: Ia96f6656d99381c039a4b3fd02674215fbbaec91
2023-05-01 22:15:33 +03:00
Matan Perelman 639cd00a22 ctrl: Add penalty time control
The penalty time gives the duration for which the temporary
offset is applied.

Change-Id: Idfdd54dec72fb5f52eee22df018161d75b8c48c8
2023-05-01 19:13:49 +00:00
Neels Hofmeyr 5d8d6d2079 fix mscpool for large msc NRs
Use the proper type that can handle the entire range of MSC numbers we
allow on the VTY, we have:
 #define MSC_NR_RANGE "<0-1000>"

Before this patch, MSC pool round robin would glitch around for any
'msc' numbers 'msc 256' thru 'msc 1000'.

Change-Id: I98bee022c1a78508554d2ff4a10fbce3c53f1128
2023-05-01 00:11:48 +00:00
Neels Hofmeyr a70d6b25c4 fix length check in abis_rsl_rx_rll()
In abis_rsl_rx_rll(), we do the following header length check -- quick
challenge, can you spot the two bugs hidden here?

  struct abis_rsl_rll_hdr *rllh;
  if (msgb_l2len(msg) >
      sizeof(struct abis_rsl_common_hdr) + sizeof(*rllh))
           msg->l3h = &rllh->data[3];

Fix these bugs:

- struct abis_rsl_common_hdr is already included as the first member of
  abis_rsl_rll_hdr, no need to add that.
- We are going to be accessing rrlh->data[3], so we must check for at
  least sizeof(*rllh) + 4.

Change-Id: Ie4aee615c8c904ae8308ec0074d8bc5208137061
2023-05-01 00:11:48 +00:00
Vadim Yanitskiy ea3e3c258d gsm_bts_send_c0_power_red(): check if BTS is online first
... and print a proper error message instead of "not supported".  We
don't know for sure whether it's supported before the BTS is connected.

Change-Id: I080aa7ef331b76918ae48d555eea6e4290c57120
Related: SYS#6435
2023-04-28 18:05:37 +07:00
Vadim Yanitskiy 16922c5017 bts: st_op_enabled_on_enter(): resume C0 power reduction
If power saving is enabled for a BTS, it should remain enabled even
if the BTS is restarted for whatever reason.  This persistence can be
achieved by re-sending the configured power reduction value whenever
the BTS NM FSM enters the ENABLED state again (i.e. reconnects).

Separate gsm_bts_send_c0_power_red() from gsm_bts_set_c0_power_red()
and call the former from st_op_enabled_on_enter().  All we need to do
is to send the value that was configured before, per-timeslot power
reduction limits remain and need not to be updated.

Take a chance to move logging from BTS specific to the generic code.

Change-Id: Ic3f8a2ab0ffd049a8ed84361a3a588c1e1b23ac6
Related: SYS#6435
2023-04-28 18:05:37 +07:00
Vadim Yanitskiy 05e2deb49c bootstrap_rsl(): cosmetic: cache trx->bts and use it directly
Change-Id: I736ebf185028976dad5ff6f61386b6d2eeab8fbd
Related: SYS#6435
2023-04-28 02:21:20 +07:00
Vadim Yanitskiy 253f67f625 struct gsm_bts_model: rename power_ctrl_{set->send}_c0_power_red
Change-Id: I13d9e6ea2a2b7b11f92532d377e71f0e83974622
Related: SYS#6435
2023-04-28 02:19:44 +07:00
Vadim Yanitskiy 856c6dc2f5 bts_is_online(): make the BTS pointer const, return bool
Change-Id: Idb4f9f8862041c5902df0e6e8d1ac2a60ada95df
2023-04-28 02:19:44 +07:00
Oliver Smith 758634eadf debian: set compat level to 10
Related: OS#5958
Change-Id: Id0f168a7d3c2ae6869121397e65ca1d0cfea30d3
2023-04-27 12:28:23 +00:00
Matan Perelman 1619a82825 ctrl: Remove dots from OOM
Change-Id: Ic2c6a052a9f9dcdca225225b38eb0ebdd05ac959
2023-04-25 15:52:09 +03:00
Matan Perelman 41e464e272 ctrl: Add cell reselection offset control
Change-Id: I159bbe14e71dbf1e1add60b57b0b2e03d3146682
2023-04-25 14:58:18 +03:00
Oliver Smith 712343c321 CSD: support non-transparent data rates
Implement gsm0808_data_rate_non_transp_to_gsm0408.

Related: OS#4393
Change-Id: Ib5f4bdf17a9833f65a0b623a033da838a2594d68
2023-04-20 11:02:31 +02:00
Oliver Smith d128791919 abis_rsl: fix encoding RSL_IE_IPAC_RTP_CSD_FORMAT
The A-bis/IP RTP CSD Format IR Values need to be shifted by 4 bits
instead of 5. See OsmoBTS Abis Protocol Specification § 5.8.14
RSL_IE_IPAC_RTP_CSD_FORMAT.

Related: https://ftp.osmocom.org/docs/osmo-bts/master/osmobts-abis.pdf
Related: OS#4393
Change-Id: I9ce0b2d9b77eef61a6d4dce417efe4e853217dc5
2023-04-19 11:16:02 +02:00
Neels Hofmeyr a4cc4ef8ea fix comment typo
Change-Id: I5c38f47cdf21d4e787341bf68e1e63c713003bbd
2023-04-15 00:07:05 +02:00
Neels Hofmeyr 2dfffad7e3 log: N-PCSTATE: use new value_strings
Related: SYS#6319
Depends: I873ea30e8f64280487769668c748c67ce4ff4023 (libosmo-sccp)
Change-Id: I7a13fcf2bfee232c6cebc3c1180b956a73abc24e
2023-04-14 14:33:07 +00:00
Neels Hofmeyr 8f8af40974 SCCP N-PCSTATE: trigger MSC status on PC availability
Related: SYS#6319
Related: Ia1aea4e33230d6a685b72ea5ba20dd9c7d265d44 osmo-ttcn3-hacks
Related: Ib4a5330df30a73e744c316898817b2fa3271d75e osmo-ttcn3-hacks
Change-Id: I3a0869598b8395601a16d78dbc46eec400c0ea84
2023-04-14 14:32:44 +00:00
Vadim Yanitskiy ba6fd4f8e4 si2quater: check return value of osmo_earfcn_del()
Change-Id: I227dad57737721c40a508f67616d9f5003bb1a3e
Fixes: CID#313584
2023-04-07 18:24:35 +07:00
Vadim Yanitskiy f2f0ab209d si2quater: add CTRL commands for deleting neighbor [EU]ARFCNs
EUTRAN neighbors can be deleted using the following command:

  $ osmo_ctrl.py \
	-d 127.0.0.1 -p 4249 \
	-s "bts.0.si2quater-neighbor-list.del.earfcn" EARFCN

UTRAN neighbors can be deleted using the following command:

  $ osmo_ctrl.py \
	-d 127.0.0.1 -p 4249 \
	-s "bts.0.si2quater-neighbor-list.del.uarfcn" UARFCN,SCRAMBLE

This commit implements only deletion, implementing the add command
would require slightly more effort (lots of manual string parsing),
so it's left as a TODO for later.

Change-Id: I890bffb003f2a0ee9438f6ea6e8067c092504f08
Related: SYS#6401
2023-04-06 22:34:46 +07:00
Pau Espin 58db3305d7 ipaccess nm: Handle TS_EV_OML_DOWN through NM FSM
This way we have much more control on where the events are expected to
happen.

Related: OS#5973
Change-Id: I314b8bbd8721b0420aa4a2a4da9e911834853324
2023-04-05 19:06:32 +00:00
Pau Espin 90b83f9195 ipaccess nm: Delay marking TS as usable until OML reports Enabled state
The BTS can immediatelly ACK the OPSTART, but that doesn't mean the TS
is already usable. It should only be used when the BTS reports it is in
Enabled state.

Related: OS#5973
Change-Id: I712aa22252d29ceea152c25a5da75542e1691faf
2023-04-05 19:06:32 +00:00
Vadim Yanitskiy 143dc67c99 si2quater: bts_earfcn_add(): do not add duplicate EARFCNs
We don't want to have duplicate EARFCNs in the config file.
The desired behavior is modifying existing EARFCNs.

Change-Id: Ia2fd8bd86d9f093967c1b0b0135151d2d5386dc1
Related: SYS#6401
2023-04-05 19:05:56 +00:00
Vadim Yanitskiy 117c699107 si2quater: bts_uarfcn_add(): modify existsing UARFCNs
Do not print an error, modify the existsing UARFCNs instead.

Change-Id: Iadc884aa8968e2dc01adf26ba68ba9597fa05d94
Related: SYS#6401
2023-04-05 19:05:56 +00:00
Vadim Yanitskiy a60d74ba9c si2quater: bts_uarfcn_add(): check if already added first
This way we print the proper message if the given UARFCN is already
added, no matter if the UTRAN neighbour list is full or not.

Change-Id: Ife83023f6a9e28d77e44e4757457d4d1c879e78f
Related: SYS#6401
2023-04-05 19:05:56 +00:00
Vadim Yanitskiy b8e115c646 cosmetic: bts_vty: switch is not a function, add a space
Change-Id: I3e21d8f31c8ca7359e4ed4e1c978984b7b776a82
Related: SYS#6401
2023-04-05 19:04:05 +00:00
Vadim Yanitskiy b96af7d7ec cosmetic: bts_uarfcn_add(): pass diversity directly to encode_fdd()
Change-Id: I274e5b7cf43b710a58b3c370334c5639c9f5e249
Related: SYS#6401
2023-04-05 19:04:05 +00:00
Oliver Smith 377c1e3fd7 bsc_mgw_setup: use mgcp_client_pool_empty()
Don't fall back to the legacy config if the pool is configured but no
connection to any pool member can be established.

Depends: osmo-mgw I009483ac9dfd6627e414f14d43b89f40ea4644db
Related: OS#5993
Change-Id: I3a8418fb5841c71049ec91439143e1fe5553ed40
2023-04-04 16:32:27 +02:00
Vadim Yanitskiy eb1de89024 gprs: fix has_valid_nsvc(): permit local udp port 0
NSVC local port 0 is actually a valid value, which tells the PCU to
pick a random port for bind()ing.  It was supported before 315af2f9e,
but now osmo-bsc would simply ignore NSVCs with 'local udp port 0'
and leave the respective MOs unconfigured in the BTS.

Change-Id: I0afd83e77f3daeeb082e7db911610428b5bc587c
Fixes: 315af2f9e "bts: ipa/osmo-bts/sysmobts: MO: add support for the second NSVC"
Related: OS#5979
2023-03-31 15:46:29 +00:00
Vadim Yanitskiy a9b4849e49 tests: add more tests for GPRS NSVC parameters
Change-Id: I13d6ac887ddb1c9bc5d1e4122f20405a28f135d4
Related: OS#5979
2023-03-31 15:46:29 +00:00
Vadim Yanitskiy ed5080adb3 tests: rename and extend gprs_{bvci_default->params}.vty
Match default values for all GPRS related params, not only the BVCI.

Change-Id: Ia02e9a97137eb7724f22526fc3768331b35ac55d
Related: OS#5979
2023-03-31 15:46:29 +00:00
Vadim Yanitskiy c8994ea6f7 doc/{examples,manuals}: remove dummy 'gprs nsvc 1'
Change-Id: I976471ad15dbb7be832dc1a87ca794009ee1aa7c
Related: OS#5979
2023-03-31 14:02:15 +00:00
arehbein fffd1b599c PCU interface: Log version when starting listener
Change-Id: Ie3d8ebcb3175412313dfae3b7d560202a98ff8ab
2023-03-31 13:46:23 +00:00
Vadim Yanitskiy 6d369665dd tests: demonstrate the problems of 'si2quater neighbor-list'
* osmo-bsc currently does not support adding multile EARFCNs
  with different thresh/prio/qrxlv parameter values;
* adding an EARFCN which already exists creates a duplicate;
* adding an UARFCN which already exists fails;
* adding UARFCN=0 fails.

Change-Id: Iece6b9058f4eb06f8f2c19311de4f2eea01cfe82
Related: SYS#6401
2023-03-31 10:48:50 +00:00
Vadim Yanitskiy bd6f8887e6 tests: add VTY transcript tests for 'si2quater neighbor-list'
Change-Id: I1209cca6a4ba0b9658a98f1782a9575c01263832
Related: SYS#6401
2023-03-31 10:48:50 +00:00
Vadim Yanitskiy ed8098ab2e osmoappdesc.py: add more config files for testing
Change-Id: I9199f3e39c677dfd6e3936b9cf4897a070156b03
2023-03-31 10:46:04 +00:00
Vadim Yanitskiy f80361d167 tests: $(BUILT_SOURCES) is not defined, depend on osmo-bsc
Change-Id: I640dd2cd599707ad6bc661e7bea08372d85b47df
2023-03-31 10:46:04 +00:00
Pau Espin 27195c50a0 bts-rbs2k: Simplify osmo_fsm_inst_alloc_child_id()
Change-Id: I5344161e5a65ae9959684f0fda7f8b06cbb447f3
2023-03-31 12:13:43 +02:00
Pau Espin d38ccedad7 Move paging queue specific handling to signal callback outside RSL code
The signal is already there but not being used.
Let's further split generic paging code from RSL specificites.

Change-Id: Iabc1c29908a5136501d6dc6e60f8777dab511b86
2023-03-31 12:12:21 +02:00
Pau Espin 4de0769720 abis_rsl: Document spec ref of CCCH Load Ind
Change-Id: Iada13bb29688249eecbd492388a6d4b0cc95575d
2023-03-30 15:51:02 +02:00
arehbein 097925b626 main: Give specific error message
vty_read_config() returns an errno number or zero; add the appropriate error string in case of error

Change-Id: I0015824a29ebf8aaeaa996ab4d2cb2769ea48864
2023-03-25 08:04:25 +00:00
Pau Espin ad253850d8 Use new GSM0408 defines for half-octet tags
The old ones have been deprecated and shall not be used anymore·

Depends: libosmocore.git Change-Id I799e35dc8d4d153fa63bf50563a5482cdf4de2d7
Change-Id: Id3be8e38ec87ae39c4e1b4fab163563b24fb2cee
2023-03-25 01:12:25 +00:00
Philipp Maier 2365db4856 doc: bts-examples: discuss Ericsson RBS EGPRS configuration
Add a configuration file example to illustrate how exactly EGPRS is
configured on ericsson RBS BTSs.

Related: OS#5198
Change-Id: I2fb5b4d9300b16b0fac48f33b5db81442ab25031
2023-03-24 14:20:42 +01:00
Philipp Maier f99952c2b0 examples: update erissson GPRS config files
The example config files that illustrate how to set up GPRS/EGPRS using
a BSC co-located PCU do not have any of the general GPRS parameters set.
Lets add a gprs prameter block to both of them.

Related: OS#5198
Change-Id: Ifc538940fadca08d03a36bf6a28392f22640493d
2023-03-24 14:20:42 +01:00
Philipp Maier ccd69e9b2f doc: running: Describe how to configure a co-located PCU
The manual does not yet mention the possibility to configure a BSC
co-located PCU. Lets add a short description to the chapter
Running OsmoBSC, Configure primary Links that enables users to get an
idea where exactly the BSC co-located PCU has its place in the RAN
infrastructure and which links it is connected with. Also give a short
example how to setup the unix domain socket path.

A more detailed description, especially about the timeslot configuration
will be added with a follow up patch for bts.adoc

Related: OS#5198
Change-Id: I3af3cd8ef7099bb94f4cb25513e9dfdc5fcc1b5a
2023-03-24 14:20:42 +01:00
Philipp Maier 4743ea578c bts: bts: Explain Ericsson's interface switch (IS)
The built in interface switch in ericsson RBS base stations no where
explained. From the example configuration files alone it is not possible
to understand how the IS configuration works. Let's add a chapter that
explains how the IS configuration works.

Related: OS#5198
Change-Id: Ib6ebd7fdfe9063c0d8cacf53ffd27f6099d9038a
2023-03-24 14:20:42 +01:00
Neels Hofmeyr 25bbe8895c add location_services_fsm_bsc.dot
Change-Id: I3bdcc90c59459473a5f2e06d9018a2a98147a6b9
2023-03-22 09:58:47 +00:00
Neels Hofmeyr 7a0bef1ae4 segfault: verify lchan presence on Assignment Complete
User reports a SEGV:

 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  send_assignment_complete (conn=conn@entry=0x557dbabb75a0) at assignment_fsm.c:188
 #1  0x0000557db66aa6b0 in assignment_success (conn=0x557dbabb75a0) at assignment_fsm.c:277
 #2  0x00007f6007afee82 in _osmo_fsm_inst_dispatch (fi=0x557db9615b80, event=4, data=0x0, file=0x7f6007a7dc21 "mgcp_client_endpoint_fsm.c", line=513) at fsm.c:875
 #3  0x00007f6007a78c12 in ?? () from /lib/x86_64-linux-gnu/libosmo-mgcp-client.so.9

 version: osmo-bsc 1.9.0.111.fc339.202212220009

The situation apparently is conn->lchan == NULL (primary lchan is gone),
but Assignment has just concluded. Apparently an unexpected / orthogonal
event has interrupted operations.

During assignment_success(), do not assume that conn->lchan is still
present. This should normally be true, but if not, fail the assignment
procedure instead of crashing osmo-bsc.

Related: SYS#6382
Change-Id: I4db25d0458f620954a1ca345282f5d8316341919
2023-03-22 09:22:58 +00:00
arehbein d7b277ff01 gsm_bts_check_ny1: Prevent possible division by zero
Do this by setting the minimal value for T3105 to 1 in its timer definition.

Fixes: Coverity scan CID#307389
Change-Id: I1fd0b92ab507a58fed6e9649eaa4770f1ad1cbad
2023-03-21 20:16:15 +00:00