aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-07-11pcu_sock: Forward incoming RR GPRS SUSPEND REQ to PCU socketlaforge/gprs-suspendHarald Welte3-4/+50
s specified in 3GPP TS 03.60 Section 16.2.1 and 44.018 Section 3.4.15, a Class B MS is sending a "RR GPRS SUSPEND REQ" via a DCCH to the BTS if it wants to suspend GPRS services. The BSS is now responsible to somehow forward this to the SGSN. As the Gs interface between BSC and SGSN is both optional and doesn't have any provision to forward this message, we have to send it over to the PCU so it can use regular BSSGP signaling to inform the SGSN of the SUSPEND REQUEST. This patch requires libosmocore Change-Id I90113044460a6c511ced14f588876c4280d1cac7 for the related definition of struct gsm48_gprs_susp_req. This patch follows the same logic of whatwas introdiced in osmo-bts as Change-Id I3c1af662c8f0d3d22da200638480f6ef05c3ed1f. Change-Id: I05ac5de16c9d5122c179b3f9b273a0c9c7661e29 Closes: OS#2249
2017-07-11update pcuif_proto with TXT_IND and SUSP_REQ definitions from osmo-bts.gitHarald Welte1-0/+23
Change-Id: I25335a90bfb33953242a09e2af550edf2a799721
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
2017-05-15SI2quater: fix EARFCN inclusion checkMax4-35/+93
Previously only the existance of bts->si_common.si2quater_neigh_list was checked but not the actual number of EARFCNs in it. Fix it by using si2q_earfcn_count() and adjust tests accordingly. While at it - reformat tests to include extra information. The correctness was checked manually by inspecting GSMTAP output. Change-Id: Ic4fb2a9e870db66cac58b1e8d113587b30d64ce2 Related: RT#8792
2017-05-15Restructure SI2quater generationMax8-163/+241
In preparation for extended SI2q messages: * add SI2q-specific accessor macro * add *_offset variables to gsm_bts struct * internalize memory check while generating rest octets - introduce budget concept (number of bits available in a given message) * internalize *arfcn_size() functions as they are not needed outside of si2q_num() anymore * change rest octets generation to work with gsm_bts struct directly * do not generate rest octets if no SI2q is necessary * adjust unit tests accordingly (cosmetic changes only to avoid regressions) Requires: I92e12e91605bdab9916a3f665705287572434f74 in libosmocore Change-Id: Ib554cf7ffc949a321571e1ae2ada1160e1b35fa6 Related: RT#8792
2017-05-15Prepare for BTS attribute reporting via OMLMax3-6/+13
* use define for number of attributes instead of magic number * add sub_model to gsm_bts struct * expand number of BTS features * mark attributes parameter to abis_nm_get_attr() as const Change-Id: I7ecb0c4339530d3a8354a2f94b34063dda87e030 Related: OS#1614
2017-05-12fix subscriber random extension allocation rangeNeels Hofmeyr2-4/+15
The VTY config allows above 32bit range extensions, but db_subscriber_alloc_exten() was unable to generate extensions outside of 32bit. Add VTY regression test and fix the problem by using proper 64bit types. Related: OS#2253 Change-Id: I9afe6a8833004ecd2f3f936b2d5aa4de8e7dbcb0
2017-05-12fix VTY parsing: subscriber-create-on-demand randomNeels Hofmeyr2-1/+12
Fix parsing of the 'subscriber-create-on-demand random' VTY: atoi() is not enough to include the specified range of 1-9999999999. Use atoll() instead to ensure a large enough number space also on 32bit systems. (Note: for me, atoll() truncates at 32 bit when <stdlib.h> is not included.) Add a VTY regression test for this. Related: OS#2253 Change-Id: I353e04481ec567adca383d6b51ba8fb865eed73e
2017-05-10src: use osmo_timer_setup()Pablo Neira Ayuso29-112/+60
Use new function available in libosmocore to set up timers. Compile tested only. Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
2017-05-10Use define for limit on number of BTS featuresMax1-1/+3
Change-Id: Ief81db0b3653fec180e60776ff9bcb0ac1357217 Related: OS#1614
2017-05-09Add forgotten items to .gitignoreMax1-0/+2
Change-Id: I04b2ec1115f6207bd238489db9317bfaee58f3bc
2017-05-09Make BTS type and variant converters shareableMax4-21/+70
* move value_string definition and corresponding functions for BTS type to shared header to make it re-usable by OsmoBTS * use consistent function naming * add similar functions for BTS variant * add enum to be used by OML Attribute Reporting to distinguish between type, variant and other info Change-Id: Ida94725a6fce968443541e3526f48f13758031fd Related: OS#1614
2017-05-08libmsc: send RP-ACK to MS after ESME sends SMPP DELIVER-SM-RESPPablo Neira Ayuso6-17/+184
Hold on with the GSM 04.11 RP-ACK/RP-ERROR that we send to the MS until we get a confirmation from the ESME, via SMPP DELIVER-SM-RESP, that we can route this sms somewhere we can reach indeed. After this change, the conversation looks like this: MS GSM 03.40 SMSC SMPP 3.4 ESME | | | | SMS-SUBMIT | | |------------------->| | | | DELIVER-SM | | |---------------->| | | | | | DELIVER-SM-RESP | | |<----------------| | GSM 04.11 RP-ACK | | |<-------------------| | | | | Before this patch, the RP-ACK was sent back straight forward to the MS, no matter if the sms can be route by the ESME or not. Thus, the user ends up getting a misleading "message delivered" in their phone screen, when the message may just be unroutable by the ESME hence silently dropped. If we get no reply from the ESME, there is a hardcoded timer that will expire to send back an RP-ERROR to the MS indicating that network is out-of-order. Currently this timer is arbitrarily set to 5 seconds. I found no specific good default value on the SMPP 3.4 specs, section 7.2, where the response_timer is described. There must be a place that describes a better default value for this. We could also expose this timer through VTY for configurability reasons, to be done later. Given all this needs to happen asyncronously, ie. block the SMSC, this patch extends the gsm_sms structure with two new fields to annotate useful information to send the RP-ACK/RP-ERROR back to the MS of origin. These new fields are: * the GSM 04.07 transaction id, to look up for the gsm_trans object. * the GSM 04.11 message reference so the MS of origin can correlate this response to its original request. Tested here using python-libsmpp script that replies with DELIVER_SM_RESP and status code 0x0b (Invalid Destination). I can see here on my motorola C155 that message cannot be delivered. I have tested with the success status code in the SMPP DELIVER_SM_RESP too. Change-Id: I0d5bd5693fed6d4f4bd2951711c7888712507bfd
2017-05-08libmsc: use GSM411_RP_CAUSE_MO_NUM_UNASSIGNED as return valuePablo Neira Ayuso2-6/+5
Instead of hardcoded value of 1 plus comment of the right hand side of the statement. Change-Id: I865bdbd6da17a0389044a8e749deeeebcb9cae06
2017-05-08Use libosmocore for SW Description parsingMax5-217/+40
Requires libosmocore with Ib63b6b5e83b8914864fc7edd789f8958cdc993cd. Change-Id: Ib94db414e94a2a1f234ac6f1cb346dca1c7a8be3
2017-05-08Use ipa.py for ctrl testsMax1-16/+8
Remove duplicated code and make sure that python code is actively used as part of test harness Change-Id: I676390abe2f179df6004cdd33d0eaaf60e18df03
2017-05-05Gb: use textual representation for parse logMax1-3/+2
Use textual representation for message type and protocol descriminator in case of Gb parsing errors. Change-Id: Ida925258be119619d8705361730c554a130b75bc Related: SYS#3610
2017-05-04deb: install python scripts from contrib/Max1-0/+1
Add .py scripts from contrib/ to osmo-nitb.deb package. Change-Id: I852815f348ae330980b186e1ddbc78f18f4f42b5 Related: SYS#3028
2017-05-04ctrl: remove boilerplate codeMax2-24/+2
Define subscriber-list-active-v1 ctrl command as RO and remove unnecessary functions. Change-Id: I88fe905c22cf7563415d470b88cb43fca0d52a7f
2017-05-02Fix vty warnings for GEA0Max1-10/+11
Previously vty always used additional checks even for GEA0 (no encryption) which resulted in misleading warnings. Fix this by adding explicit check for GEA0. Related: SYS#3610 Change-Id: I1ee468ab3298076d4cb5c7b1f6293c07e272417b
2017-05-02Make pcap dependency optionalMax2-2/+9
Previously we required pcap.h unconditionally which causes embedded build failure because it's not included in current version of out poky toolchain. We can add it to toolchain but it's only necessary for utils/osmo-meas-pcap2db which is not built for sysmobts anyway so it's easier to just make this dependency optional and build osmo-meas-pcap2db only if it's available - similar to the way we build osmo-meas-udp2db. Related: SYS#3610 Change-Id: I77a5f7eafe0282abedacffad6a9bcb0a8f2b5caa