aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-05-29octphy: integrate channel measurement handlingPhilipp Maier2-15/+50
recent octphy firmware versions do support proper channel measurement handling. The new implementation replaces the old, and for osmo-bts non functional implementation. This commit introduces the necessary adjustments. Older firmeware releses will still work. However, the measurement computation results will still be wrong. Change-Id: I0f053bb10b1cb112a8814ee591969d607888e686
2017-05-27rx_tchh_fn(): Avoid copy+pasting formula to determine odd-ness of fnHarald Welte1-4/+7
Change-Id: Ic2a0bdaa70cc28c1ce8237351b0a0c6b998cf0a3
2017-05-27scheduler_trx: Avoid copy+pasting determining CMR from FNHarald Welte1-8/+12
instead, let's introduce a specific function for that. Also, as this can be easily determined from the frame number, skip one argument to tx_tch_common(). Change-Id: Ibbb9b685cf0b6a45339b0874438a500dd6254bc2
2017-05-27scheduler_trx.c: Avoid code duplication for BER10k computationHarald Welte1-8/+16
Use an (inline) function rather than code copy+pasting Change-Id: I42e76a4707968e428cbd2e43d5df71ef445efece
2017-05-27scheduler_trx.c: Fix typos, improve comments, cosmeticsHarald Welte1-25/+35
Change-Id: I5e2ce70aea8d62657ce3a7d6c16e5a7f8b76c22f
2017-05-27Remove unusued left-over gsm0503_conv.cHarald Welte2-1169/+0
gsm0503_conv.c should have been removed as part of efbef50efc170caccf6354360638cda762dd7fc3 but somehow was left here. It's not referenced/compiled by the Makefile anymore, and the gsm053_conv.c in libosmogsm has superseded it anyway. Change-Id: Icdcca1bc55a83c76ec47918dc4dd301155210091
2017-05-27Implement basic Get Attribute responderMax2-0/+136
Add 3GPP TS 52.021 §8.11.2 Get Attribute Response handling: * report OsmoBTS version * report sysmoBTS sub-model * report OsmoBTS variant Requires I7ecb0c4339530d3a8354a2f94b34063dda87e030 in OpenBSC. Change-Id: I09f95ed995fab5def9dc6e8cc201012fba4db28d Related: OS#1614
2017-05-24measurement: exclude idle channels from uplink measurementPhilipp Maier1-24/+29
The DATA-IND, received from the physical layer does not only include the actual uplink data. It also includes the frames which are received when the channel is idle (which is just noise). This would falsify the measurement results. Depending on the BTS model, the phy may also filter the idle frames and not send a DATA-IND at all, when the channel is idle. If this is the case, the measurement period end can not be detected properly. The idle frames are located at the very end of each measurement period. In order to fix the issue, the measurement perioud has to end early. For TCH/F and TCH/H 1, one frame has to be skipped. For TCH/H 0 two frames are skipped. Example: For a TCH/F in TS0, the Measurement perioud would end at frame number 103. However, 103 is reserverd as idle frame. So we need to detect the end of the measurement period at frame number 103 (-1). Change-Id: I471a767c7974bdacadc3233d0c3e7b7965f6eafa
2017-05-24phy_link: Fix typo in state being printedPau Espin Pedrol1-1/+1
Change-Id: I312eefa6738f8abdeedd2efb574f3e45cd2e8aa3
2017-05-22Remove redundant testMax7-535/+1
After switching to libosmocoding there's no need in low-level bursts test which is part of libosmocoding anyway. Change-Id: Icb8caf62ac653a39a7a82f2225e8edeab7f5afb5
2017-05-22osmo-bts-trx: use libosmocodingMax15-5631/+42
Remove built-in functions and use libosmocoding instead. Change-Id: I1b41bb1a8de655639107ec1f3b75afc240fd316f
2017-05-17measurement: Compute measurement results on measurement idicationPhilipp Maier1-5/+4
Computing the measurement results on in l1sap_info_time_ind() all at once may peak the host CPU. On smaller systems (arm based sysmobts) this might cause a noticable delay of other important tasks (e.g. passing l2 messages back and forth) It makes more sense to compute the measurement results continously when l1sap_info_meas_ind() is executed. Change-Id: Iecb9a30c0d716bfc88221cd752b1ffdc74269e30
2017-05-17measurement: make lchan_meas_check_compute() available to l1sap.cPhilipp Maier2-1/+3
lchan_meas_check_compute() is a static function measurement.c. In order to distribute the measurement result calculation events, we need to be able to call lchan_meas_check_compute() from l1sap.c Change-Id: Ideffe896613e0feda443bc13dac59dcdbbc605aa
2017-05-17measurement: fix measurement reporting periodPhilipp Maier1-3/+35
The measurement reporting for the MS on a SDCCH lacks some of the periods, defined in 3GPP TS 45.008, section 8.4.2. This adds the missing conditions by adding complete lookup tables. Change-Id: I23fba50f48415314da40cf5bf86fce2ed3e66af6
2017-05-17octphy: ensure that 11 bit rach flag is not setPhilipp Maier1-0/+2
The l1 interface does not explicitly set the flag for 11 bit rach when a rach request is received. Since the current and previous octphy firmwares do not support 11 bit rach requests, the flag should be explicitly set to zero. Change-Id: Ifa165c56e54d272caafa45d1bf0e177848fcdfbd
2017-05-17octphy: align frame number for new firmware versionsPhilipp Maier1-0/+15
Firmware releases OCTSDR-2G-02.07.00-B1314-BETA and newer require to align the GPRS frame number (fn-3) for ph_data indications. To preserve compatibility the header version is checked during compile time and the right method is compiled in. Change-Id: Ib93d5fb3b34ff92f10021a0e9ce9c8aa3044b7ff
2017-05-17octphy: activate CBCH after all physical channels are activatedPhilipp Maier1-1/+1
CBCH is activated when the SAPI for TS0 is activated. Since the CBCH can be configured on any physical TS, we wait until all (TS7 is the last) physical timeslots are configured. Change-Id: Ie307bf9f370a346686e3bd8c8a8483953a1bc279
2017-05-17measurement/cosmetic: Fixup source code commentPhilipp Maier1-1/+15
the function is_meas_complete() uses the *_meas_rep_fn104[] lookup tables, defined at the beginning of the source file. These lookup tabels contain a lot of magic numbers. This commit adds a more elaborated comment with a reference to the specification/section in order make the values understandable. Change-Id: Ic6e4037f965772e6b851c67662d5e7bf64cc04eb
2017-05-17measurement/cosmetic: Fixup source code commentPhilipp Maier1-1/+14
the function ber10k_to_rxqual() has only a very brief comment with the spec reference. This commit adds a more explainatory comment that makes it easier to understand from where the ber10k constants are taken. Change-Id: I3d3488c97d0bffa7d449d3675afcc75b2a6a2703
2017-05-15Prepare for BTS attribute reporting via OMLMax5-25/+39
* move BTS model name resolution into separate function * add convenience wrappers for BTS type and number fo TRX and use then in L1 interface Change-Id: I4649100df8f1b8e095f210fc294567ba014c0b6a Related: OS#1614
2017-05-10Set BTS variant while initializing BTS modelMax4-0/+4
This will allow proper BTS attribute reporting via OML in follow-up patches. Change-Id: I1c49d6c39fb4dac7a46ee25ceacf4c6ef0f0b736 Related: OS#1614
2017-05-09osmo-bts-trx/l1_if.c: cosmetic: drop double checkVadim Yanitskiy1-3/+3
Change-Id: I25a8f85ee65e1c0dd54049ffacc039702ca36c8f
2017-05-09Prepare for extended SI2quater supportMax3-37/+44
SI2quater support as per 3GPP TS 44.018 will require chnages to the way System Information is stored because it uses 1:n instead of 1:1 mapping between SI type and generated SI content. This should not affect other SI types though. To facilitate this transition: * convert the code to always use GSM_LCHAN_SI helper instead of accessing buffer directly * move duplicated code to inline function * add logging for buffer truncation and corresponding length values Requires I74e4e3cb86364cec869a1472a41b4a95af0d50dd in OpenBSC. Change-Id: Ie97be6ead6ce6d2d425fbfac8429bb90afb95acc Related: RT#8792
2017-05-08Signal to BSC when PCU disconnectsMax2-1/+6
While at it - do not serialize NULL as a string when delivering OML Failure Report. Change-Id: I41a731bd719aee0bbb98d3236405fb3a7f3ddec0 Related: OS#1615
2017-05-08bts: revert trx shutdown orderPhilipp Maier1-1/+1
When a new TRX is allocated using gsm_bts_trx_alloc() (see gsm_data_shared.c in openbsc.git), than it is added to the list in order. When octphy is shutting down the BTS, it uses llist_for_each_entry() to iterate the tansceiver list to shut all transceivers down. This means it starts the shut down process with the primary TRX and then continues with the secondary transceivers in order. However, octphy does not allow to close primary TRX if the secondary TRX is open. The shutdown sequence must begin with the secondary transceivers and finish with the primiary transceiver as last item. The problem can be easily fixed by iterating the transceiver list in reverse order using llist_for_each_entry_reverse() instead of llist_for_each_entry() Since this is a change in the common code, all BTS models (not only octphy) are affected, but from the logical perspective, this change makes sense for all other BTS models too. Change-Id: I18485de586b402610f9e98053d69e92bc9b18dc2
2017-04-30sysmobts: Store a simple network config in the EEPROM as wellHolger Hans Peter Freyther4-8/+168
Make it possible to store: * Static vs. DHCP mode * IPv4 address * Netmask * GW IPv4 address * DNS IPv4 address Add a simple CRC8 and pick 0xFF as initial value so an all zero EEPROM will not generate a 0 CRC. The code tries to differentiate exit code between unreadable EEPROM and CRC error. This is a reference to see if we want to have store it in the EEPROM or not. Change-Id: Id8a37fe952ef2a8ef36778729f506f900accf8d1
2017-04-29sysmobts: Make reservation for mode/netmask/ip and sucHolger Hans Peter Freyther2-1/+16
Change-Id: Ib98856356dc296be9e449d35479bc9234c0c4d32
2017-04-28osmo-bts-trx: cosmetic log fixMax1-9/+11
Print actual value causing error and the check range. Change-Id: Ic36c0558cdbd1790c167f290a40007b42f5de65d
2017-04-27Fix RTP duration adjustment not done when speech resumes in DTX mode.Jean-Francois Dionne1-6/+2
RTP jitter increases continuously because duration is not updated when speech resumes in DTX mode. Change-Id: Ib51ed95a449369222c957b3acebd9ce1f66c5435
2017-04-26Add MS TO to RSL measurementsMax2-5/+44
Add optional MS timing offset (3GPP TS 45.010 § 1.2) to RSL MEASUREMENT RESULT (3GPP TS 48.058 § 8.4.8). The value is calculated either directly from corresponding BTS measurement or from 3GPP TS 48.058 § 9.3.17 Access Delay (for known TA) and is invalidated after RSL report is sent until new measurement indication or RACH is received. Change-Id: I4dfe5c48834a083e757d5de3236a02e15a238b28 Related: OS#1574
2017-04-13octphy: set tx/rx antenne IDs via VTYPhilipp Maier4-0/+64
add support for the TX/RX antenna-id feature that has been introduced with release OCTSDR-2G-02.07.00-B1314-BETA. The user can now set individual ID numbers for the TX and for the RX antenna. Change-Id: I872fe3c4d7b593358a4ce2f02cf0726611b9f3aa
2017-04-13octphy: add conditional compilation to support latest octasic header releasePhilipp Maier3-3/+74
With octasics latest release (octsdr-2g-02.07.01-B1351-beta), some struct members are moved or renamed. This patch adds ifdef-logic and configure checks to restore compatibilty. Change-Id: I73287983e8bed8bf64b2ab87e6b810c2c59ea6fd
2017-04-13octphy: display hint in case of wrongly configured transceiver numberPhilipp Maier1-0/+2
Making use of the multi-trx feature requires to tell osmo-bts that more than one transceiver are available. Otherwise it will complain that not enough transceivers are available. This can be quite confusing, even a correct config file will fail to parse if it specifies more transcrivers than available. This patch adds a hint to the error message so that the user knows that he should check the -t commandline option Change-Id: Ifbeacd9d43f7c6cd74a1e1b33288e66828fe843f
2017-04-13octphy: print log message for multi-trx supportPhilipp Maier1-0/+6
Some header file versions support multi-trx and some do not. After to compiling it is very difficult to find out if the binary is multi-trx capable por not. This patch adds a log line that should rule out any doubts. Change-Id: I257c0a5e7c5ff5df2f0a603d1ede6db5679382e0
2017-04-13l1sap: improve log outputPhilipp Maier1-1/+3
Print toa and ra value with the "RACH for packet access" log message. Change-Id: I3a2dde95947438aa8348a0a9fc8566cbc177aa2d
2017-04-13octphy: add CBCH supportPhilipp Maier2-1/+19
add Support for CBCH channels in osmo-bts-octphy Change-Id: Ic5c8363b4dd8ba78ab22bd5527c08d1162331540
2017-04-13octphy: fix usage of wrong define constantPhilipp Maier1-1/+1
octphy_hw_get_rf_ant_tx_config() uses define constant cOCTVC1_HW_MSG_RF_PORT_INFO_ANTENNA_RX_CONFIG_CID instead of cOCTVC1_HW_MSG_RF_PORT_INFO_ANTENNA_TX_CONFIG_CID. This commit replaces exchanges the wrong constant with the correct one. Change-Id: Ie4de23daf79bb07ca0c0b818eefe350d18d27e4d
2017-04-10Handle TXT indication from OsmoPCUMax2-0/+28
* handle OML message * handle OsmoPCU version message * show stored PCU version in 'show bts ..' vty command Requires OpenBSc with I6710d53115f34634a7b70969cc05fd5c72ff8ab2. Change-Id: I16e73198501487a5b1076bf83390b85538d5af73 Related: OS#1614, 1615
2017-04-06sysmobts: Don't start with 0dBm TRX output power before rampingHarald Welte5-3/+30
In case a system has a high-gain external PA (like a 40dB PA) connected externally, we cannot simply switch the transceiver to 0 dBm in trx_init() only to then start the ramping at much lower levels once the PHJ completes in trx_init_compl_cb(). The result would be a short 0 + 40 dBm spike followed by later ramping. We want to avoid that spike, particularly its associated inrush current, so let's bring up the board with smething very conservative like -50 dBm, and then ramp from there. Change-Id: I0ad91fce64f65e0213c9fcfde3390ace519055db Fixes: SYS#3259
2017-03-23vty: reduce code duplicationMax1-32/+6
Use libosmocore's osmo_str2lower() instead of local equivalent. Change-Id: I7faced2eaf0f6f87f06081235eea9d4c3ba71a7e
2017-03-23osmo-bts-trx/l1_if.c: use channel combination III for TCH/HVadim Yanitskiy1-1/+1
Currently the channel combination II is used for TCH/H, which allows only one lchan to be allocated. The reason is that it saves a bit of CPU by disabling UL burst detection on lchan 1. There is also the channel combination III, which allows to increase channel capacity, providing two lchans on a single TCH/H timeslot. Ideally we should implement some dynamic II <-> III switching depending on the network load level. But for now this change replaces the channel combination of TCH/H by III, until dynamic switching is implemented. Fixes issue: https://osmocom.org/issues/1795 Change-Id: I8fd4abb42c153fcd26bcfe22a2554b5c2d02d810
2017-03-23Sync protocol with OsmoPCUMax1-4/+19
Copy-paste changes from OsmoPCU commit 0a8fae8d141c2cfa4387ffe9b35402d5b8cc85cd. Change-Id: I15e6cc86604947a173e8675ba4b41a3bda2d3296
2017-03-23osmo-bts-trx: fix scheduling of broken framesMax1-2/+4
* DTXu: don't set marker for broken frames * do not attempt to send 0-length bursts to avoid flood of errors after bts startup Change-Id: Icb536f951386b9abe34c0dacbb203f3db1e41bb3
2017-03-20l1sap: fix PTCCH detectionPhilipp Maier1-1/+4
The macro L1SAP_IS_PTCCH(fn) only detects a PTCCH channel at fn%52 = 12, the detection logic has been extended in order to detect PTCCH at fn%52 = 38. See also 3GPP TS 05.02, Clause 7, Table 6 of 9 Change-Id: Ia6f3333121e5e920c5e1d562a081d0a1b58a1153
2017-03-17README: update some of the limitationsHarald Welte1-4/+20
Change-Id: Ifec983e02ce517d4fe17d595b65312c53b0429b7
2017-03-17README: Add general project information and convert to markdownHarald Welte2-14/+69
Also, make sure README.md is included in EXTRA_DIST Change-Id: Icd9192833e1f95758c84cad85f0f0289ff4eb32a
2017-03-16jenkins: add value_string termination checkNeels Hofmeyr4-0/+10
Change-Id: Id4eb92924c03748563921e3f56cc0e5e0ffff502 Depends: libosmocore change-id I2bc93ab4781487e7685cfb63091a489cd126b1a8
2017-03-15l1sap: fix rach reason (ra) parsingPhilipp Maier1-1/+1
The ra parameter indicates the reason for the received rach request. osmo-bts uses the ra parameter to determine if the received rach request is packet access related. If yes, osmo-bts will forward the request to the PCU. In order to determine if the ra is packet related or not, the higher 4 bits must be equel to 0x7 and at least one of the lower 4 bits must be zero. The current method lacks checking of the lower 4 bits. It would also accept 0b01111111, which is reserved for future use. This commit extends the check to take also the last 4 bits into accound. See also: 3GPP TS 04.08, Table 9.9 Change-Id: I5eb88c42a91e158d9bfa4105ec9636035baf8959
2017-03-14Check for suitable lchan type when detecting HOMax2-2/+12
Log error when handover RACH is detected on wrong channel: according to 3GPP TS 44.018 it can only be seen on SACCH and DCCH. Change-Id: Iacbcc8441d6cfbb8f808948a8baddde1ebca488a Related: OS#1898
2017-03-14Handle ctrl cmd allocation failuresMax1-18/+19
Check that ctrl command was successfully allocated before using it. Fixes: CID163884 Change-Id: Id19e1ce5fae6f936c9ed93f9a6317b57d28d7311