aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-05-20Add support for NuRAN Wireless Litecell 1.5 BTSYves Godin7-0/+1166
Layer 1 compatibility with previous generation or NuRan GSM product, therefore the support for the Litecell 1.5 uses its own sources instead of using tons of ifdef/endif. Max's amendments: * make headers path configurable * use configured TRX instead of hardcoded value * split subdir-objects into separate commit * cosmetic changes Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Fixes: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/61 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-05-19Change internal API for consistencyMax3-9/+10
Make TRX API (void *) consistent with the way it's used (integer). Use uint8_t for TRX numbering everywhere (we don't expect hardware with more than 256 transceivers in the near future). This change helps to avoid unnecessary casts and make API much clearer. Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/59 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-19add .gitreviewAlexander Couzens1-0/+3
A .gitreview file is required to use git review. More information about git review https://www.mediawiki.org/wiki/Gerrit/git-review Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b Reviewed-on: https://gerrit.osmocom.org/68 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-05-17Enable subdir-objects automake optionYves Godin1-0/+1
Change-Id: I01fd264fd1f990f39cdbf309149e0eb857d7732f Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/60 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Jenkins Builder
2016-05-17Restructure sourcesMax7-20/+29
Move hardware-spicefic files into subdirectory similar to the way it's done in OsmoBTS to make adding new hardware support easier. Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/58 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-04-22Rename define for direct hw accessMax3-6/+6
2016-04-22Cleanup build leftoversMax1-1/+1
2016-04-13jenkins: Add the build script from jenkins hereHolger Hans Peter Freyther1-0/+42
This can be used to replicate a build issue more easily.
2016-04-01misc: Ignore test files and debian packagingHolger Hans Peter Freyther1-0/+15
2016-04-01debian: Initial debian packagingHolger Hans Peter Freyther7-0/+67
Add initial debian package for plain osmo-pcu (without the sysmoBTS supporot).
2016-03-30fix compiler warnings about format string for size_tHarald Welte1-3/+3
with gcc-5.3 on x86_64 I get the following compliler warnings: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t {aka long unsigned int} This patch resolves them
2016-03-30Support puncturing scheme selection for EGPRS DLAravind Sirsikar4-30/+127
Adds support to find the puncturing scheme for retransmission with MCS change, retransmission with no MCS change, transmission case. Puncturing scheme selection for retransmission case with MCS change is aligned with TS 44.060 9.3.2.1. Puncturing scheme selection for retransmission without MCS change, fresh transmission is aligned with TS 44.060 10.4.8a.3.1, 10.4.8a.2.1, 10.4.8a.1.1
2016-03-30Update CPS calculation with new data structuresAravind Sirsikar3-15/+27
Update existing CPS calculation function to align with new data structure introduced
2016-03-30Add data structure for CPS calculation in DLAravind Sirsikar2-0/+27
Define new data structure with respect to TS 44.060 10.4.8a.3.1, 10.4.8a.2.1, 10.4.8a.1.1 for puncturing scheme values and initialize the variable introduced
2016-03-30Refactor the Uplink RLC header parsing functionBhargava Abhyankar2-65/+84
Parsing the uplink data header for GPRS and EGPRS header type 3 is handled in separate functions. This patch will enhance modularity of the code.
2016-03-16Introduce EGPRS header type1 and type2 in ULAravind Sirsikar1-0/+38
Defines new structures for UL EGPRS header type1 and type2 for supporting MCS5-MCS9
2016-03-16Fix issue in encoding CSN_RECURSIVE_ARRAYSaurabh Sharan3-0/+10
The remaining_bits_len is correctly decremented while encoding CSN_RECURSIVE_ARRAY for fixing the bug. Details of the bug is in https://projects.osmocom.org/issues/1641 During introduction of basic EGPRS feature new hex dump message PUASS, from a different working network log was used in Unit test. It exposed the issue of incorrect handling of recursive array encoding in osmo-pcu. Fixes: OS#1641
2016-03-15Add test vectors for EGPRS messagesSaurabh Sharan2-2/+37
This patch is the test suite modification for the fix encoding of padding bits. New test vectors have been added both in downlink and uplink.
2016-03-15Fix encoding of padding bits to start with 0 bitSaurabh Sharan4-22/+27
This patch is for fixing encoding of padding bits according to the 3gpp spec 44.060 section 11, wherein it shall always start with 0 bit followed with spare padding bits. During introduction of basic EGPRS feature new hex dump messages from a different working network log were used in Unit test. These exposed the issue of incorrect handling of padding bits encoding in osmo-pcu. Corrections in the existing test vector of rlcmac is also updated. In testsuite tbf appropriate corrections for the Tbftest.err is also done.
2016-03-04pcu: Fix compiler warning about using stringHolger Hans Peter Freyther1-1/+1
Make the gsmtap hostname const to avoid turning a constant into a mutable character. We never tried to modify the string so the warning didn't reveal a genuine issue. pcu_main.cpp:49:28: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] static char *gsmtap_addr = "localhost"; // FIXME: use gengetopt's default value instead
2016-03-04tbf: Fix copy and paste in the set_mode routineHolger Hans Peter Freyther1-1/+1
This is the second attempt to fix what looks like a copy and paste issue. The code assigns m_current_cs_ul and then compares the _dl variant, then assigns m_current_cs_ul with a default value. It seems to indicate that _ul should be used. Fixes: Coverity: CID 1351733
2016-03-04Revert "Refactor coding scheme assignment code"Holger Hans Peter Freyther1-33/+32
Roll-out the refactoring change. The code did not include the necessary update to the test result and there are some concerns about it in itself and the right approach would have been to fix the copy and paste issue, then do the refactoring. This reverts commit 22d7e75e1f160e5337140d9f3dcb2679b621b646.
2016-02-25Refactor coding scheme assignment codeMax1-32/+33
Previously this code used too much copy-paste of boilerplate code which is error-prone and hard to read. Factor out actual (M)CS assignment into separate function and use it for both DL and UL cases in respective mode. Fixes: Coverity: CID 1351733
2016-02-22alloc: Fix UBSAN for accessing the array at -16Holger Hans Peter Freyther1-3/+3
This test will check that we exhaust the available TFIs, so the last TFI is -16 and then we try to store to that address. It is surprising that it worked!
2016-02-22Add gsmtap support to generic btsMax1-11/+27
Instrument TX and RX functions dealing with regular BTS (without direct DSP access) to use GSMTAP. Previously only DSP-related functions were instrumented.
2016-02-22Introduce --gsmtap-ip/-i optionMax4-7/+23
This option allows user to use custom IP address instead of default "localhost". Correspondingly gsmtap init moved from sysmoBTS-specific code up to "bts" struct level. This way it can be easier reused by other implementations. The lack of regressions was verified by checking following command on sysmoBTS: "./osmo-pcu -c osmo-pcu.cfg -r 1 -i 192.168.10.1" where 192.168.10.1 is the host which was running wireshark and netcat: "nc -u -l 192.168.10.1 -p 4729" to accept gsmtap flow.
2016-02-22Ignore files generated by cscope toolMax1-0/+1
Signed-off-by: Max <msuraev@sysmocom.de>
2016-02-22Merge remote-tracking branch 'origin/jerlbeck/master'Holger Hans Peter Freyther39-1437/+6737
This adds EDGE support and at the same time is changing a lot of code on GPRS support as well. Due my business decision of completing as much as possible during the time we had the unit test coverage is not as extensive as I had hoped for. This is just the beginning. We do not support mixed GPRS/EDGE support and have plenty of things to improve throughput. Thanks to On-Waves for supporting a project with so many unknowns and uncertainty and Jacob for leading the effort at sysmocom.
2016-02-14Fix missing '-V / --version' in print_help()Harald Welte1-0/+1
2016-02-08edge: Support all coding schemes for BSSGP flow controlJacob Erlbeck1-31/+50
Currently the MCS schemes are not supported when the leak rate is being computed. This leads to a lower value for the leak rate, thus limiting the throughput to GPRS-like ranges. Use the payload size reported by GprsCodingScheme instead. Sponsored-by: On-Waves ehf
2016-02-08edge: Work-around to not use MCS-6 with paddingJacob Erlbeck2-6/+12
Currently single BSN blocks of size 68 (a single unit from MCS-8) are put into a MCS-6 block with padding according to TS 44.060 Annex J. Unfortunately, these packets are ignored by the E71. This might be related to the currently incorrect usage of the puncturing schemes and the RSB bit (the puncturing schemes are not updated and the RBS flag is never set). Avoid downgrading from MCS-8 to MCS-6 if there is no second block available. Send the block twice instead. Sponsored-by: On-Waves ehf
2016-02-08edge: Compare len instead of using cs.isCombinableJacob Erlbeck2-12/+15
Comparing the coding scheme properties doesn't seem to be strong enough, since create_dl_acked_block(fn, ts, index, index2) sometimes had to combine data units of different size this way. Check the registered size of the BSN blocks instead, since these must match if two blocks are to be combined in a single RLC data message with MCS7-9. It is not yet clear, what exactly goes wrong with the current implementation, but this commit fixes the problem which trigger the assertion in create_dl_acked_block. Sponsored-by: On-Waves ehf
2016-02-08edge: Send a second BSN block in an RLC message if possibleJacob Erlbeck4-193/+200
Currently only one BSN block is encoded in each RLC data message, even if MSC7-9 are used, which transport two independant (except for a max BSN delta of 512) BSN blocks. In that case, the same block is just put twice into the same message. The current create_dl_acked_block(fn, ts) method handles block selection (resend, new BSN, dummy block, ...) and restart handling in one method and is too complex to extend it accordingly. Therefore this commit move the block selection/creation handling into a new method (take_next_bsn) which delivers the next BSN along with a hint, whether it may be combined with another block. In that case, the function can be called a second time (this time with a valid previous BSN, that's the one returned by the first call) to get the second BSN. The real block generation method create_dl_acked_block(fn, ts, index, index2) is then called with both BSNs as indices (the second must be -1, if there is only one BSN). Note that every BSN returned by take_next_bsn should be passed to create_dl_acked_block to avoid state inconsistencies. Sponsored-by: On-Waves ehf
2016-02-08edge: Refactor create_dl_acked_block for multi-block supportJacob Erlbeck3-83/+338
Currently the method is hard-coded to support a single BSN only. MCS-7 to MCS-9 encode 2 data blocks into a single RLC data message. This commit refactors create_dl_acked_block to process any number of blocks internally. Note that this does not extend the parameter list accordingly and just duplicates the BSN if these MCS are being used. Sponsored-by: On-Waves ehf
2016-02-08ms: Fix GprsMs::current_cs_dl()Jacob Erlbeck1-1/+1
Currently the queue length is overwritten by the remaining chunk length, which should be added instead. This may result in a lower CS/MCS value than expected. Add the chunk length instead if the TBF is present. Sponsored-by: On-Waves ehf
2016-02-08tbf/tests: Add tests for EGPRS TBF establishmentJacob Erlbeck3-16/+1897
Add a test for EGPRS two phase access based on RA caps. Add a test for DL TBFs where data block are encoded with each MCS. Sponsored-by: On-Waves ehf
2016-02-08rlc: Use the rlc structure to access the data unit in the RLC messageJacob Erlbeck2-21/+31
Currently most offsets are hard-coded which makes it difficult to access the data units and their headers when padding has to be taken into account. These offset are already provided by the gprs_rlc_data_info_init_ul/dl functions. Change the encoder/decoder to use these values. Note that some assumptions (bit alignment) are still present in the code and checked by assertions. Sponsored-by: On-Waves ehf
2016-02-08rlc: Add gprs_rlc_mcs_cps_decodeJacob Erlbeck2-0/+31
To access EGPRS data blocks, the optional padding must be taken into account. Whether padding has been used must be dervied from the CPS field in the header of the RLC EGPRS data message. Add this function to decode the CPS value and extract that information. Sponsored-by: On-Waves ehf
2016-02-08rlc: Add with_padding argument to gprs_rlc_data_info_init_dl/ulJacob Erlbeck4-31/+41
The offsets of the data areas change when padding is used (see TS 44.060, 9.3.2.1 and Annex J for details). Extend the parameter lists to pass the with_padding flag and use that information to compute the correct offsets. Sponsored-by: On-Waves ehf
2016-02-08cs: Add GprsCodingScheme::optionalPaddingBitsJacob Erlbeck3-15/+23
Return the amount of optional padding bits, which is 6*8 for MCS-3 and MCS-6 and 0 for all other coding schemes. The padding is needed the encode 68 byte data blocks (MCS-8) with these schemes. See TS 44.060, 9.3.2.1 and Annex J for details. Sponsored-by: On-Waves ehf
2016-02-08cs: Add family related methodsJacob Erlbeck3-16/+86
Add family handling and the related methods family, isFamilyCompatible, isCombinable, decToSingleBlock to GprsCodingScheme. Sponsored-by: On-Waves ehf
2016-02-08edge/vty: Set initial MCSJacob Erlbeck1-0/+42
This adds the following VTY command (config-pcu node): - mcs <1-9> sets initial DL and UL MCS to the same value - mcs <1-9> <1-9> sets initial DL and UL MCS separately - no mcs sets the default values Sponsored-by: On-Waves ehf
2016-02-08rlc: Support encoding of EGPRS header type 1 + 2Jacob Erlbeck4-8/+104
Currently only header type 3 (MCS-1 to MCS-4) is supported. Add header structs to rlc.h and extend Encoding::rlc_write_dl_data_header accordingly. Sponsored-by: On-Waves ehf
2016-02-08tbf: Add state WAIT_ASSIGNJacob Erlbeck5-114/+167
Currently the state on the TBF is set to ASSIGN when it is created and in general changed to FLOW when it is acknowledged by the MS. The moment when the assignment is really transmitted to the MS (which can take some time) is not reflected by the state. A TBF can considered to be valid, when the assignment is received by the MS. Add the state WAIT_ASSIGN that is entered when the assigment has been send to the MS (more precisely: when the corresponding RTS has been processed or the message has been sent to the BTS). The TBF, its PDCH(s), and its TFI can be assumed to be valid, when the TBF has a state of WAIT_ASSIGN or higher (assuming that the TBF starting time has not been set, which is currently only done for SBA, which are not associated with a TBF). Note that due to queuing in the BTS there can still be a invalid time period for immediate assignments, when the request is lingering in the AGCH or PCH queues. Sponsored-by: On-Waves ehf
2016-02-08ms: Add current_pacch_slots methodJacob Erlbeck3-0/+34
The PACCH is specific to an MS and may change when a TBF is established or removed (see TS 44.060, 8.1.1.2.2). For multislot class type 2 phones, more than one timeslot may be used to transmit RLC/MAC control messages. Add a method that returns a set of TS which can be used for the PACCH. Sponsored-by: On-Waves ehf
2016-02-08sched: Do PACCH assignments for the same direction lastJacob Erlbeck1-4/+23
Currently the selection of a pending control message is done round robin. It can possibly happen, that a DL assigment is sent on a DL TBF while an UL assignment is pending. The MS will replace the old DL TBF in that case, so that it can no longer be used for the PACCH so that the UL assignment is lost. Give assigment requests for the same direction a lower priority. Sponsored-by: On-Waves ehf
2016-02-08tbf: Only free TBF if it was replaced in rcv_control_ackJacob Erlbeck1-2/+4
Currently the TBF whose PACCH has been used to send an assigment is freed if it is in state WAIT_RELEASE. Sometimes this TBF could be used for several assignments (e.g. an 'old' DL TBF is used to assign an UL and then a DL TBF). The second of these assigments will never be sent in that case. On the other hand, the MS replaces a TBF of the same direction, so the old one can be freed in that case. Only free the TBF if it is in state WAIT_RELEASE and has the same direction like the new one. Sponsored-by: On-Waves ehf
2016-02-08edge: Support EGPRS in IMM ASSIGNMENTJacob Erlbeck1-0/+25
Tell the MS to use EGPRS if EGPRS is enabled on the TBF. Note that only downlink TBF will be supported so far. Thus single-phase uplink assignments may not work properly. Sponsored-by: On-Waves ehf
2016-02-08encoding: Redesign Encoding::write_immediate_assignment APIJacob Erlbeck4-42/+62
The EGPRS support will need more information to encode the IMMEDIATE ASSIGMENT. Instead of adding more parameters pass a pointer to the TBF unless an SBA shall be done (indicated by tbf == NULL). All values that can be derived from the TBF and are not needed for an SBA are removed from the parameter list. Return a negative value on error. Sponsored-by: On-Waves ehf
2016-02-08encoding: Refactor write_immediate_assignmentJacob Erlbeck1-79/+98
Move the IA rest encoding into separate functions fpr uplink and downlink. Sponsored-by: On-Waves ehf