aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
3 daystbf_dl.cpp: Fix typo in log lineHEADmasterPau Espin Pedrol2-125/+125
Change-Id: I9fdea4246c95897f3e72604981597db828a219a3
5 daysRemove dash from name used in VTY cmd promptPau Espin Pedrol2-2/+2
Others projects don't contain a dash in there, and it seems to cause problems with TTCN3 VTY expectations. Change-Id: I3430abb5fc622dec293457466e760de95fa3a05c
6 daysmanual: Add missing documentation for '-i' command line optionHarald Welte1-1/+3
Change-Id: Iec0f2ecd610e63baba46a63d3e1a0979a9d8c5a8
6 daysmanual: Fix documentation missing "-D" command line optionHarald Welte1-2/+2
Change-Id: I2fd0b6f52ddc6931f413921b45d9756cb1fe456d
6 daysmanual: Fix copy+paste errorHarald Welte1-1/+1
Change-Id: I27744628edeca6895f50f84c6f2f04c2e6e2de0b
7 daysVTY: cosmetic: use osmo_talloc_replace_string()Vadim Yanitskiy1-4/+2
Change-Id: Id09c7d24b48ddecfa96404c3e75330465a11f830
7 daysVTY: add warning about changing PCU socket path at run-timeVadim Yanitskiy1-2/+3
Change-Id: I7cee2d782bd3dfc2cc8d2febc16dca905dcc294e
9 daysClarify (M)CS related VTY attributesPau Espin Pedrol3-14/+17
Some are used to control (M)CS values for downlink while some do it for uplink. Let's make clear which one is used for what. Take the chance to document the fields a bit better than they were. Some more information about the origin of cs_downgrade_threshold can be found in the commit introducing it: 70b96aa232bd9784a94247bf7b193cb2147ada9d. Related: OS#4286 Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8
9 daysdoc: vty: Update osmo-pcu_vty_reference.xmlPau Espin Pedrol1-27/+10
Change-Id: I287893cabf0468f0c110eb751eb887f58ff238c0
2019-11-23PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCHVadim Yanitskiy7-17/+104
Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c Related: OS#1545
2019-11-17pcuif_proto.h: extend RACH.ind with TRX / TS numbersVadim Yanitskiy1-0/+2
Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: If209001885ffb14b64a8e808df3700d85a4b2ef9 Related: OS#1545
2019-11-17PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCHVadim Yanitskiy5-21/+44
Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Related: OS#1545
2019-11-17PTCCH: implement basic message codec and APIVadim Yanitskiy3-0/+54
Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Related: OS#1545
2019-11-10gprs_bssgp_destroy(): fix memleak and NULL-pointer dereferenceVadim Yanitskiy1-6/+1
So far there was a memory leak, because free()ing 'the_pcu.bctx' would cause ASAN to complain. And that's reasonable, because it needs to be freed properly. Moreover, 'the_pcu.bctx' may simply be uninitialized in some cases, e.g. when OsmoPCU is terminated before connecting to the SGSN. Let's use the new bssgp_bvc_ctx_free() from libosmogb. Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Depends: Ia78979379dbdccd6e4628c16f00d0c06d9212172
2019-11-08GprsMs::update_cs_ul(): clarify the meaning of old_link_qualVadim Yanitskiy2-13/+15
Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e
2019-11-08tests/tbf: suspend warnings about the link quality measurementsVadim Yanitskiy2-34/+17
Share a single instance of 'pcu_l1_meas' between all unit tests, set initial measurement values in main(). This way we can get rid of the following warnings: Unable to update UL (M)CS CS-X because we don't have link quality measurements. Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Fixes: OS#3828
2019-11-08BSSGP: properly print BVCI for signalling messages (BVCI=0)Vadim Yanitskiy1-1/+1
Change-Id: I4ac0f48d2e62cd0545e8a1e1b26c9e43ef5e8dde
2019-11-08BSSGP: do not reject SUSPEND ACK / NACK messagesVadim Yanitskiy1-4/+1
Both BSSGP SUSPEND ACK and NACK messages use BVCI=0 (signaling), which always exists. Claiming that BVCI=0 is unknown is wrong. Instead of adding both BSSGP_PDUT_SUSPEND_{ACK,NACK} to the 'if' statement, let's rather avoid rejection for all BVCI=0 messages, as there may be other unlisted message types. Change-Id: I780657c1e8f67e0bef0e92a31db7ba61b57d7ec4 Related: OS#4111
2019-10-16Fix assertion hit upon CCCH Paging RequestPau Espin Pedrol1-1/+1
Recent commit added an assertion to check for buffer boundaries and it actually gets hit. One of the 2 code paths calling pcu_l1if_tx_pch() was passing a buffer of 23 bytes while one of maximum 22 is expected (because plen is not set in the buffer but set inside pcu_l1if_tx_pch()). So it seems before the assert, that code path was actually writing 1 byte outside the boundaries of data buffer, since bitvec_pack() uses data_len field of bitvec. Related: OS#4228 Fixes: 8dc09e73d0b361b27232526ebcd5f25cd8c7edfd Change-Id: I84c5dfd4d5580e9d4c00ed21887cb51bd9abbd2e
2019-10-09encoding: fix space, tabsAlexander Couzens1-30/+30
Change-Id: I80ac88f50bfedfd2b86d548883313b5a187b1e8f
2019-10-09VTY: fix command 'show tbf all': properly filter TBFsVadim Yanitskiy4-19/+22
For a long time the VTY command to show all active TBFs was broken. The TBF filtering (by allocation origin) logic allows one to show TBFs allocated on CCCH, PACCH, or on both of them. In the latter case we have been checking whether a TBF was allocated on both logical channels at the same time. Let's fix this by passing a flag-mask instead of boolean arguments. To be able to use GPRS_RLCMAC_FLAG_* definitions from "tbf.h", let's exclude them from "#ifdef __cplusplus ... #endif" block. Change-Id: I1c9f401368af880a97d32905c4cce0da481ffc21
2019-10-09VTY: refactor pcu_vty_show_ms_all(): use show_ms()Vadim Yanitskiy1-24/+11
Change-Id: I72aa1a1de22602a3ad2a4d19604ae0935c88c750
2019-10-07pcu_l1_if.cpp: Replace value 23 with libosmocore's GSM_MACBLOCK_LENPau Espin Pedrol1-6/+6
Change-Id: Ieec3dd028fffa1a735afaaf3f93da0a1202d122a
2019-10-07pcu_l1_if.cpp: Imm Assign PCH: clarify size of different itemsPau Espin Pedrol1-8/+12
Change-Id: I32876858e3e93951e965b0fc7875c95c1f36f3ac
2019-10-07pcu_l1_if.cpp: Drop unneeded byte in Imm Ass PCH bufferPau Espin Pedrol1-1/+1
paging group is 3 bytes and imm assign with plen prepended is 23 bytes, so there's 1 extra byte not needed and makes code confusing. Change-Id: Id7835e5aa1506505ff54e019b38f30111f79b5dc
2019-10-07pcu_l1_if.cpp: Fix GSMTAP Imm Assign PCH wrong encodingPau Espin Pedrol1-1/+1
Wireshark expects to receive the plen in order to decode it. Fixes: 58543709e422ce6ba20baa232e6a5aced9b99164 Change-Id: I91d1354689300b949760cdbaee03294eab958e12
2019-10-01Log AGCH and PCH blocks using GSMTAPPau Espin Pedrol3-0/+16
Change-Id: I4d62f98801af1b0a290d3dd35bd213ccf3151035
2019-09-30Log RACH Requests using GSMTAPPau Espin Pedrol3-0/+6
Change-Id: Ib686a49e8c630808c30bede5810cd65fc045954a
2019-09-26vty: Fix osmo_tdef timers not listed in write configPau Espin Pedrol1-0/+2
Change-Id: I5c7ae18919e4b016505aa01eea6694d8a3f5df5f
2019-09-26tbf_dl.cpp: Remove dup call to tbf_update_ms_class() in state ↵Pau Espin Pedrol1-1/+0
GPRS_RLCMAC_WAIT_RELEASE tbf_update_ms_class() is already called two lines above in the common path. Fixes: 409efa1ec84c14aaa43bfac85ba4956e9f3cf16a Change-Id: Icbe3805c72a5c77366215be55128b586e5a00fb7
2019-09-26tbf_dl: Setup m_llc_timer in constructor using osmocom APIPau Espin Pedrol1-5/+1
Change-Id: I3e761b319326e33ab1d56c4fb30cafe3b0f96c29
2019-09-26Move tbf_{dl,ul} child constructors to respective .cpp filesPau Espin Pedrol3-24/+24
Fixes: 9d1cdb1f697057033394590a9b2815efe6c08cd9 Change-Id: Id258589d46de42ad4e27889bc396f930b7f94b79
2019-09-25Move out tbf subclasses from tbf.h to their own headersPau Espin Pedrol21-238/+319
It's a good start towards clearing current mess between parent and the 2 children classes. Change-Id: Ibc22ea2e02609af7ee058b8bc15df2115d4c6f60
2019-09-25cosmetic: fix whitespacePau Espin Pedrol4-5/+4
Change-Id: I45bbe4d3c69d573aaff010d16f338c7ec3eaf08a
2019-09-25pdch.cpp: Use pcu_l1_meas previously filled by lower layersPau Espin Pedrol2-21/+19
Otherwise, a new meas object is allocated in the stack in upper layers which doesn't contain the link_qual information (have_link_qual=0), outputting following error: osmo-pcu/src/gprs_ms.cpp:644 Unable to update UL (M)CS CS-2 because we don't have link quality measurements. Change-Id: I1980ca325c8d65f3f6310fa697dd810eec7ab077
2019-09-25pdch.cpp: Refactor bitvec param passing in rcv_control_blockPau Espin Pedrol2-13/+14
Move code in rcv_block_gprs() only needed for rcv_control_block() into the later. This way rcv_block_gprs() is simplified and shows similar code paths with regards to rcv_data_block(). It can now be seen that the main difference between both is the meas param no being passed in the control case. Change-Id: I2a0133463edced93c72ccc743a0cf00d1d6922cf
2019-09-18configure.ac: set C and C++ dialectsOliver Smith1-0/+3
Make sure that the compiler always assumes the same C dialect, to prevent unexpected compiler errors when building with older compilers (on other Linux distrubtions like in OBS, or in docker). Use gnu89 and gnu++03, because that is what the code currently compiles with. Related: https://lists.osmocom.org/pipermail/openbsc/2019-September/013030.html Related: OS#3598 Change-Id: Ia57ba101627e3cc0babeca82631e207a3e2e0960
2019-09-18tests/app_info: fix compiling with older g++Oliver Smith1-13/+17
Do not use C++11 extended initializers to prevent the following error. AppInfoTest.cpp:109:54: error: extended initializer lists only available with -std=c++11 or -std=gnu++11 pcu_prim.u.app_info_req = {0, 15, {0xff, 0x00, 0xff}}; I ran into this when modifying the gerrit build verification job to build with docker (which still uses GCC-4.9). Related: OS#4204 Change-Id: I307cd87af88e86804a90d6466e9cc3909bfe701f
2019-09-17Use osmo_tdef to implement dl-tbf-idle-timePau Espin Pedrol7-21/+27
Change-Id: I5e4f0d2f90e643600b7752525d6c2830856c9d3b
2019-09-17Use osmo_tdef to implement ms-idle-timePau Espin Pedrol5-10/+15
This commit would also remove the option from config_write_pcu() since it's automatically filled in by osmo_tdef, but there was actually a bug because that param was never printed when saving the config... Change-Id: Id8e70b0f44ef2f7e20ecdb3fd8ca93ae2a05b9a3
2019-09-16tests: TbfTest: Unify stderr and stdout to ease debuggingPau Espin Pedrol5-154/+153
osmo-pcu code is really verbose, and since log lines printing start and end of tests are sent to a different file, it's really difficult to understand which test outputs what. Change-Id: I3e887158e2c9585c360d44f12f995f55861170f2
2019-09-16Use osmo_tdef to implement T3190Pau Espin Pedrol3-6/+4
Change-Id: I0c767c526398d98ca47ef98fdaccfc23af11fb0d
2019-09-16Use osmo_tdef for BSSGP T1 and T2Pau Espin Pedrol2-6/+9
Change-Id: I477e5b702c8b956136d93fc1cee01991233e381f
2019-09-14Forward ETWS Primary Notification to MSOliver Smith15-31/+408
Receive an Application Information Request from the BTS via PCU interface. Construct a Packet Application Information message from it (3GPP TS 44.060 11.2.47) and send it to all MS with active TBF. The TTCN-3 test infrastructure to test this feature is not quite ready yet, so I've added C unit tests instead. Related: OS#4048 Change-Id: Ie35959f833f46bde5f2126314b6f96763f863b36
2019-09-13bts.cpp: Fix osmo_tdef initialization on older g++ compilersPau Espin Pedrol1-2/+2
Fixing errrors spotted: bts.cpp:78:1: error: uninitialized const member 'osmo_tdef::T' }; ^ bts.cpp:78:1: error: uninitialized const member 'osmo_tdef::default_val' bts.cpp:78:1: error: uninitialized const member 'osmo_tdef::unit' bts.cpp:84:1: error: uninitialized const member 'osmo_tdef::T' }; ^ bts.cpp:84:1: error: uninitialized const member 'osmo_tdef::default_val' bts.cpp:84:1: error: uninitialized const member 'osmo_tdef::unit' Change-Id: I2dfecf22516f52cc19e0a0442e70dbc4dbc61336
2019-09-12tbf_dl: add comments to the schedulerAlexander Couzens1-2/+13
Change-Id: Ib037f9fda30472313c7a82effb1e925c6abebbe5
2019-09-12Introduce osmo_tdef infra and timer VTY commandsPau Espin Pedrol12-307/+403
This will allow for configuration of some of the timers by the user, and allow him to inspect current values being used. It will be also useful for TTCN3 tests which may want to test some of the timers without having to wait for lots of time. Timers are splitted into 2 groups: BTS controlled ones and PCU controlled ones. The BTS controlled ones are read-only by the user (hence no "timer" VTY command is provided to change them). TbfTest.err output changes due to timers being set up correctly as a consequence of changes. Other application such as pcu_emu.cpp and pcu_main.cpp had to previosuly set the initial values by hand (and did so), but apparently TbfTest.c was missing that part, which is now fixed for free. Depends: libosmocore.git Id56a1226d724a374f04231df85fe5b49ffd2c43c Change-Id: I5cfb9ef01706124be262d4536617b9edb4601dd5
2019-09-11tbf_dl: make preemptive retransmission optionalOliver Smith5-1/+44
Since [1], OsmoPCU already starts to retransmit downlink blocks before the MS has had a chance to receive them and/or send the related acknowledgement in uplink. Make this optional with the new VTY option "no dl-tbf-preemptive-retransmission". [1] e25b5b91f60f20f61096bc6199a05b58ee6c6328 ("tbf: Only create dummy frames if necessary") Related: OS#2408 Change-Id: Id08aed513d4033aa0d4324c6ce07cbb2852f2f92
2019-09-11doc: update generated VTY referenceOliver Smith1-0/+88
Change-Id: I6243a2856df9db0f06e704e51e87113f9b57bb36
2019-09-05Use proper API osmo_timer_setup() to set up timer structPau Espin Pedrol1-2/+1
Change-Id: Idd2b0c5247870bee3b3c3e460a6731ee50a47404