aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-06-18Implement IuCS (large refactoring and addition)Neels Hofmeyr103-3121/+4774
osmo-nitb becomes osmo-msc add DIUCS debug log constant add iucs.[hc] add msc vty, remove nitb vty add libiudummy, to avoid linking Iu deps in tests Use new msc_tx_dtap() instead of gsm0808_submit_dtap() libmgcp: add mgcpgw client API bridge calls via mgcpgw mgcp: hack RAB success from nano3G: patch first RTP payload The ip.access nano3G needs the first RTP payload's first two bytes to read hex 'e400', or it will reject the RAB assignment. Add flag patched_first_rtp_payload to mgcp_rtp_state to detect the first RTP payload on a stream, and overwrite its first bytes with e400. This should probably be configurable, but seems to not harm other femto cells (as long as we patch only the first RTP payload in each stream). Only do this when sending to the BTS side. Change-Id: Ie13ff348117e892d41b8355ab6c24915301eaeaf
2017-06-18mscsplit: various preparations to separate MSC from BSCNeels Hofmeyr28-268/+447
Disable large parts of the code that depend on BSC presence. Don't set msg->lchan nor msg->dst. Don't use lchan in libmsc. Decouple lac from bts. Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication: Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to different interfaces depending on the actual subscriber connection. While iu_tx() is going to be functional fairly soon, the a_tx() is going to be just a dummy for some time (see comment). Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer and an indicator for the Integrity Protection status on Iu (to be fully implemented in later commits). Add lac member to gsm_subscriber_connection, to allow decoupling from bts->location_area_code. The conn->lac will actually be set in iu.c in an upcoming commit ("add iucs.[hc]"). move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi(). libmsc: duplicate gsm0808 / gsm48 functions (towards BSC). In osmo-nitb, libmsc would directly call the functions on the BSC level, not always via the bsc_api. When separating libmsc from libbsc, some functions are missing from the linkage. Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also add a _tx to gsm0808_cipher_mode(): * add msc_gsm0808_tx_cipher_mode() (dummy/stub) * add msc_gsm48_tx_mm_serv_ack() * add msc_gsm48_tx_mm_serv_rej() Call these from libmsc instead of * gsm0808_cipher_mode() * gsm48_tx_mm_serv_ack() * gsm48_tx_mm_serv_rej() Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places. Temporarily disable all paging to be able to link libmsc without libbsc. Skip the paging part of channel_test because the paging is now disabled. In osmo-nitb, paging is done on BSC level and MSC level "at the same time". When the new MSC is fully operational, paging will be controlled separately on the MSC level, and the BSC (RNC) level will be instructed over an IuCS or A-interface to negotiate paging with the MS (UE). This MSC level paging does not yet exist and will be added in subsequent commits. msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values for return val, to avoid dependency on libbsc headers. Make callable from other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c add gsm_encr to subscr_conn move subscr_request to gsm_subscriber.h subscr_request_channel() -> subscr_request_conn() move to libmsc: osmo_stats_vty_add_cmds() gsm_04_08: remove apply_codec_restrictions() gsm0408_test: use NULL for root ctx move to libbsc: gsm_bts_neighbor() move to libbsc: lchan_next_meas_rep() move vty config for t3212 to network level (periodic lu) remove unneccessary linking from some tests remove handle_abisip_signal() abis_rsl.c: don't use libvlr from libbsc Change-Id: I9cf80f9c2c8a53a29e42f000029e680a9922cb41
2017-06-18IuPS adjustmentsHarald Welte5-23/+46
SGSN: Don't indicate GERAN in Iu mode PDP CTX ACT REQ to GGSN sgsn_ranap_iu_event: handle some events without valid MM context sgsn init: pass sgsn_config pointer to sgsn_vty_init(), not sgsn_parse_config IuPS: cosmetic: explicitly check RAN type; move comment Change-Id: I8375ba42dd47d7ccd9ce9290767d6f8653a23b94
2017-06-18osmo-nitb: change default config file name to osmo-nitb.cfgNeels Hofmeyr1-1/+1
Since the VLR development marks a move away from the 'openbsc' name, now is a good opportunity to also change the default config file name to the more accurate and obvious 'osmo-nitb.cfg'. Change-Id: I47658dad59ec38c39be59415db5f648c9e4c79f2
2017-06-18osmo-nitb: change default db name to sms.dbNeels Hofmeyr1-1/+1
libvlr now delegates subscriber management to osmo-hlr, so the database no longer represents a HLR. It basically only stores SMS, so reflect that fact in the default database name. Change-Id: Ibf766d9f7f67aae17f76988d6279da20ad18e4bc
2017-06-18SI3: indicate R99+ MSC to GSM MS to enable UMTS AKANeels Hofmeyr1-0/+3
Change-Id: Iaf11218327f139e8cabfbc5f9916505c66eadbd8
2017-06-18Add msc_vlr test suite for MSC+VLR end-to-end testsNeels Hofmeyr34-2/+15305
Change-Id: Ic073f3a069a7f5e7e421e0e56140f069ee9b10b8
2017-06-18Use libvlr in libmsc (large refactoring)Harald Welte67-3831/+2147
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of development collapsed in one patch. The original history may still be available as branch neels/vlr_orig. TODO: This commit may be split in several smaller changes before merging to master. SMS: The SQL based lookup of SMS for attached subscribers no longer works since the SQL database no longer has the subscriber data. Replace with a round-robin on the SMS recipient MSISDNs paired with a VLR subscriber RAM lookup whether the subscriber is currently attached. If there are many SMS for not-attached subscribers in the SMS database, this will become inefficient: a DB hit returns a pending SMS, the RAM lookup will reveal that the subscriber is not attached, after which the DB is hit for the next SMS. It would become more efficient e.g. by having an MSISDN based hash list for the VLR subscribers and by marking non-attached SMS recipients in the SMS database so that they can be excluded with the SQL query already. There is a sanity limit to do at most 100 db hits per attempt to find a pending SMS. So if there are more than 100 stored SMS waiting for their recipients to actually attach to the MSC, it may take more than one SMS queue trigger to deliver SMS for subscribers that are actually attached. This is not very beautiful, but is merely intended to carry us over to a time when we have a proper separate SMSC entity. Introduce gsm_subscriber_connection ref-counting in libmsc. Related: OS#1592 Change-Id: I702ba504ce2de93507312c28eca8d11f09f4ee8b
2017-06-18Add libvlr implementationHarald Welte17-0/+5440
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of development collapsed in one patch. The original history may still be available as branch neels/vlr_orig. Related: OS#1592 Change-Id: I3f75de5f0cc2ff77f276fd39832dd3621309c4b9
2017-06-18logging: auth request: use hexdump without spaces for RAND, AUTNNeels Hofmeyr1-2/+2
Change-Id: I656d8619a1adc93e2f627f4e1ba21512a7374279
2017-06-18gsup_client: allow passing a unit id to identify with HLRNeels Hofmeyr4-7/+21
Before, each GSUP client would contact the HLR with an identical unit id, i.e. "SGSN-00-00-00-00-00-00", with the result that some messages were sucked off by the wrong client. Pass explicit unit name from each gsup client user, so that OsmoMSC is "MSC" and OsmoSGSN is "SGSN". Hence the HLR can properly route the messages. Todo: also set some values instead of the zeros. Unrelated cosmetic change while editing the arguments: gsup_client_create()'s definition's oap client config arg name mismatched the one used in the declaration. Use oapc_config in both. Change-Id: I3f8d6dd47c7013920e2a4bde006ed77afd974e80
2017-06-18GPRS/IuPS: remove all 3G authentication dev hacksNeels Hofmeyr2-44/+2
UMTS auth works now with the external OsmoHLR. Change-Id: I1204f388cf1311ec98b3eaf7505d7e18e73f03d0
2017-06-18Add vty command "radio-link-timeout infinite" for uplink rx testingHarald Welte6-23/+79
When we are performing Rx sensitivity testing on a BTS, we want to deactivate the connection failure criterion / radio link timeout, i.e. no matter how many SACCH frames in uplink are failed to decode, the BTS should never close the channel. OsmoBTS Change-Id I736f21f6528db5c16fa80cdb905af20673797be5 covers a way how this behavior can be requested from the BTS via an OML attribute. This patch adds support to the BSC to actually set that attribute. Do not use this in production networks, as the BTS will keep open radio channels indefinitely even if the phone is gone and no longer transmitting anything. This is a pure testing feature. Change-Id: I6cb94e0f024934f7baeeb728ca9ed3042fbf16d2
2017-06-15bsc_init: Forget which SIs are valid for the trxMax3-7/+13
Previously the SI generation lead to setting the BCCH SIs for all TRX in a multi-trx setup. This is because we create the SIs globally but si_valid appears to be limited to the 'current' trx. Warn if we attempt to set SIs for the BCCH on a trx that does not have a BCCH. Change-Id: Ie0e288252a2e7709c4dae16b96a0b1512278847f Tweaked-by: Max <msuraev@sysmocom.de>
2017-06-15Update SI data structures and generationMax9-165/+354
To support segmented SI2quater as per 3GPP TS 44.018 we'll have to support multiple SI messages (up to 16 for SI2q) for a given type in contrast to existing 1:1 mapping: * expand storage space to hold up to 16 SI messages (spec limit) * add assertions for budget calculations * generate multiple SI2q messages * adjust SI2q-related tests * use precise check for number of SIq messages instead of approximate estimation Change-Id: Ic516ec9f0b821557d9461ae9f1c0afdd786f3b05 Related: OS#1660
2017-06-15Move SI-related definesMax5-10/+11
* move SI2quater related defines to shared header * add define from OsmoBTS which checks for presence of a given SI message in gsm_bts struct. Rename it to avoid conflicts with OsmoBTS code and to match naming conventions of similar macros. Change-Id: I11432c93c772d1ead6d45a7bb0f1d13d492c82f1 Related: OS#1660
2017-06-12OML: fix potential OOB memory accessMax1-2/+2
Use sizeof target BTS feature storage to make sure we always fit into pre-allocated memory. Also use it for log check. Change-Id: Ib107daa6e8b9bc397a10756071849f8ff82455d5 Fixes: CID 170581
2017-06-09Request and parse BTS feature list via OMLMax1-0/+40
Request features supported by BTS when getting attributes over OML. Change-Id: Ic35b2865998bca3c2c0cb4b77e4e73d12e08bd7e Related: OS#1614
2017-06-09Get TRX attributesMax4-37/+77
Request per-TRX attributes in addition to BTS attributes. Change-Id: I2b61131b9930afd03357c0b66947ee856d58cc46 Related: OS#1614
2017-06-09don't re-implement osmo_talloc_replace_string()Harald Welte11-51/+42
osmo_talloc_replace_string() was introducd into libosmocore in 2014, see commit f3c7e85d05f7b2b7bf093162b776f71b2bc6420d There's no reason for us to re-implement this as bsc_replace_string here. Change-Id: I6d2fcaabbc74730f6f491a2b2d5c784ccafc6602
2017-05-31Add remote BTS feature storage and helpersMax3-0/+39
In addition to compile-time defined BTS model features we also need run-time BTS features reported by BTS via OML. This should be shared by BSC and BTS. To accommodate for this, add following: * features bitvec to gsm_bts struct * features descriptions * comments to avoid confusion between 2 feature sets * helper functions to set/query particular feature * upper boundary on number of supported features and assertion for it Change-Id: I02bd317097ba66585c50ebd4e8fc348f6dc3dad9 Related: OS#1614
2017-05-31Adjust BTS model feature checkMax3-9/+9
Rename gsm_bts_has_feature() -> gsm_btsmodel_has_feature() and adjust type signature to match gsm_btsmodel_set_feature() function and avoid confusion with upcoming functions to check/set BTS features reported over OML. Change-Id: I97abdedbef568e0c2fbd37c110f7d658cf20e100 Related: OS#1614
2017-05-29libbsc: Create pcu-socket only as specified in config fileHarald Welte4-16/+27
Since commit b4999b60d48bcbb5aa575973d068e07ab672e095 we created PCU sockets at hard-coded paths in the filesystem by default for all BTSs. This is inflexible and prevents the use of multiple BSC instances on a single filesystem, or the placement of the sockets in a more secure location than /tmp. The new approach with this patch is that * no PCU sockets are created by default * only for those BTSs where a 'pcu-socket' is configured via VTY, the socket will actually be created Change-Id: Ie9079470584777dcc31f85f9bf0808f479156ccb Closes: OS#2293
2017-05-28bsc_vty: Add command to manually issue IPAC MDCXHarald Welte1-1/+31
Using this command, one can modify the RTP stream associated with a given logical channel and (re)direct it to a specified IP:Port. Change-Id: I63e03b932038a4e2f6d51c5541b52e4a42df27bf
2017-05-27bsc_vty.c: Add command for manual [de]actiovation of logical channelsHarald Welte1-0/+119
Sometimes it is useful to manually activate (or decativate) a given logical channel from the VTY. Doing this on the BSC (rather than the BTS) ensures that the BSC knows that this timeslot / channel is allocated and there is no risk to have clashes between the BSC "owning" the resources and the BTS allocating some by itself. Change-Id: I44fc3904678eb48bd3ab1a3da8c0c265fa082e0d
2017-05-27bsc_vty.c: Further simplify vty_get_ts()Harald Welte1-6/+7
We can also move the string-to-numeric conversion inside vty_get_ts() to reduce the amount of work required in the caller. Change-Id: I2a74ed06e90e39d39f53fff39bb96df172728c0e
2017-05-27bsc_vty: Factor vty_get_ts() out of pdch_act_cmd()Harald Welte1-14/+26
Resolving a timeslot based on its numeric identities is a generally useful function, so lets' factor that out. Change-Id: Id2570232f82542487a1133be7efb1dc1eb3029a8
2017-05-27bsc_api.c: Documentation for handle_mr_config()Harald Welte1-2/+13
Change-Id: I6edd442afc7c20f8f097198941bc592d429ba5da
2017-05-27costmetic: Document gsm48_multirate_config() + const-ify inputHarald Welte2-2/+7
We generally use const pointers for input arguments. Also, document input/output arguments of function and add spec reference. Change-Id: I2532cde69a18e3b021f7371e68f67a28a43d8b5f
2017-05-25Use new e1inp_signal_names from libosmo-abis to print input signal namesHarald Welte2-7/+4
Change-Id: I156027ecdd1456228c9f8776577edd48e70c19da
2017-05-25abis_rsl: use msgb_pull to parse tlli from msgAlexander Couzens1-4/+2
Change-Id: I971bf6c8821689f9d8a1294a9b3bf1af9c4091f7
2017-05-25abis_rsl: fix off-by-one length check when parsing ericson tlli fieldAlexander Couzens1-1/+1
Change-Id: I658f6d82a67944345ddda5534fa996dca9e990ab
2017-05-25pcu_sock: Fix broken paging commandPhilipp Maier1-7/+20
The pcu sends us an already made up MAC-Block that contains the paging request. pcu_sock.c is parsing this paging request wrongly and fails silently, which results into a dropping of the request. This commit fixes the parsing problems. Change-Id: Iefef08123bdc351afd8287d3f27ebf0ae58a6e7d
2017-05-25pcu_sock: Forward imm.ass PCU originated messagesPhilipp Maier4-0/+59
The PCU sends imm.ass messages in response to a rach request. Those messages need to be forwarded to RSL in order to get them send. This commit introduces the required functionality for that Change-Id: Ice099c4ed7008200ed179e581aba1899c6c29455
2017-05-25pcu_sock: implement direct tlli on AGCHAlexander Couzens2-1/+33
Ericsson allows to attach a reference to immediate assignments. A confirmation of the transmission is then sent back, but only containing the reference, not the whole RLC packet. Change-Id: I945f49e62e2a74a7906e2d49940927773edd04a9
2017-05-25pcu_sock: pcu_tx_info_ind allow to use TRX not starting from 0Alexander Couzens1-1/+1
It would prevent using only e.g. TRX 1 when TRX 0 is disabled. Change-Id: I68dc5e837bd2a3602f7875063c85da4082196274
2017-05-25pcu_sock: set flag PCU_IF_FLAG_SYSMO by setting pcu_direct = 1Alexander Couzens1-1/+1
The use of PCU_IF_FLAG_SYSMO enable the PCU to use DIRECT_PHY code path. Change-Id: I1f5407264fc4f209456ffcb73d7853ff315aab86
2017-05-25pcu_sock: Send non-NULL hLayer1 to PCUHarald Welte1-0/+1
The BSC-located PCU case looks to the PCU like a BTS-located PCU with "direct PHY" access, i.e. the data related primitives are communicated from the PCU directly towards the TRAU Frames or whatever transport method is used between CCU and PCU. In order to make the PCU believe that, we need to pass in a 'layer 1 handle'. As we don't use it, we can just pass any non-zero value and be happy. Change-Id: I8170bd4134904702b6b272e496100361ba473cbc
2017-05-25pcu_sock: Forward paging request from PCU via RSL to BTSHarald Welte1-9/+44
Change-Id: I28bf0995699618f3f5fa15fc8e1733beddfc482f
2017-05-25pcu_sock: get rid of magic numbers and use ARRAY_SIZE() for array iterationHarald Welte1-3/+3
Change-Id: I602b581fab67b3a1c3c03c73a3a99e9afd564e29
2017-05-25pcu_sock: Don't re-implement core functionality like gsm_bts_trx_num()Harald Welte1-14/+2
Change-Id: I5ea506c8240dac124ccf5522d02ba18e4f0cb90d
2017-05-25pcu_sock: add basic pcu interface supportPhilipp Maier10-1/+929
Adds a basic version of a pcu socket interface, similar to the one that can be found in osmo-bts. Change-Id: Ib13cb4099d12fa71e9e0b8727e19ab29e11909b2
2017-05-25libbsc: add debug log message to S_L_INP_* callbacksPhilipp Maier2-0/+7
Improve debug log output of input callbacks by adding a line containing the signal event name. Change-Id: Ifca46dd8b356d0de31cccbd79e406079d3a0d7d2
2017-05-25gsm_data_shared: add value strings for gsm_chreqPhilipp Maier2-0/+11
Change-Id: I23d3be5610a5a46098d2b12feed4245828599aae
2017-05-22ipaccess-config: properly create swloadNeels Hofmeyr1-4/+6
Instead of 20, use the actual buffer sizes of struct sw_load, which are 255. Previous code would truncate a longer string at 20 without(!) NUL termination. In the _len members, store the actual length copied. In previous code, if the source string were longer than 20, we would store only 20 (without NUL term) but still reflect the longer length of the source string. Fix both of these issues for sw_load.file_id / file_id_len and sw_load.file_version / file_version_len. Change-Id: I2e34a1348a290d3f58dd830d08da65b94b3270db
2017-05-20Add missing _CFLAGS and _LIBSAlexander Huemer3-2/+6
These missing pieces go unnoticed if dependencies are not installed in distinct directories. Change-Id: If8d57b72f63d79cc0d8efba7466c6ec177207cbb
2017-05-20libmsc: Map SMPP command status to GSM 04.11 causeKeith3-7/+41
Send SMS RP ERROR with a failure cause that relates to the status returned by the ESME in the deliver_sm_resp. Actual mapping array is limited as most phones I tested don't seem to care about the failure cause anyway, although some will display a different notification for GSM411_RP_CAUSE_MO_NUM_UNASSIGNED Change-Id: I61fb2d9ef4f2d2eabdc49b53d9966ad328d15e51
2017-05-19fix '/include/openbsc ' to have no trailing spaceNeels Hofmeyr1-3/+3
The newline and $NULL manage to append a trailing space to the 'openbsc' dir. This was broken in commit 7b6673fa06dada3ec4586b1c0d735e9df4177a48 "Consistenly format variables in */Makefile.am files" by Change-Id Ifa21513c007072314097b7bec188579972dc1694 Add a comment to prevent this in the future. Reported-by: Andreas Mueller <andreas.mueller@criticallabs.org> Change-Id: I218027459e3b2aaa817d91eb3f69d9c0b10dcd4e
2017-05-18Remove errorneous includeMax1-1/+0
The gsm_data_shared.h header is installable and used by OsmoBTS so it should not include any private (non-installable headers) to avoid OsmoBTS' build failures. Change-Id: Ic25031101fc01bd732fe691132c081ad05fa6a4b
2017-05-17Get basic BTS attributesMax2-0/+77
Request BTS attributes via OML on connection and parse the response: request/parse incoming response as sw-config. Note: only basic BTS-wide KV attributes wrapped in sw-config are supported for now. Change-Id: I589be51daca0cb9e1f3473b93e910e46b06e23ae Related: OS#1614