aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-octphy
AgeCommit message (Collapse)AuthorFilesLines
2017-05-29octphy: remove old event control codePhilipp Maier1-83/+1
Event handling is done internally in the Octasic BTS. When the TRX is opened, events are enabled automatically and when TRX is closed events are disabled. The change is valid for the recent firmware version and for the last couple of previous releases. Change-Id: I0652627495f6a9bcb0da2431b8beb839bc22062b
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-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-10Set BTS variant while initializing BTS modelMax1-0/+1
This will allow proper BTS attribute reporting via OML in follow-up patches. Change-Id: I1c49d6c39fb4dac7a46ee25ceacf4c6ef0f0b736 Related: OS#1614
2017-04-13octphy: set tx/rx antenne IDs via VTYPhilipp Maier2-0/+53
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 Maier2-2/+37
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: 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-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-02-22octphy: Fix VTY commandsPhilipp Maier3-45/+139
The VTY commands show phy 0 rf-port-stats and show phy 0 clk-sync-stats do not output their results on the VTY console. If one of those commands is entered the user is prompted to view the logtext, which is an uncomfortable solution. This commit adds the missing functionality to print the information in the VTY as well. octphy_hw_api.c contains two value_string structs (radio_std_vals and clocksync_state_vals) which are now exported in octphy_hw_api.h in order to access them from octphy_vty.c Change-Id: Iae5aa91fe2ebba7c2874eed88b15ed66e8c9cd61
2017-02-10all models: fix vty write: bts_model_config_write_phyNeels Hofmeyr1-0/+4
The vty write for phy/inst is broken, leading to a written-out config being unparsable; fix all of these: - in common/vty.c, actually call bts_model_config_write_phy_inst(). - in sysmo and lc15 write the phy instance elements in bts_model_config_write_phy_inst() and not in bts_model_config_write_phy(), which lead to writing the members above their parent 'instance'. - sysmo, lc15 and oct omit the bts_model_config_write_phy_inst() implementation. This did not cause a compilation problem because it was in fact never called. - sysmo writes 'clock-source None' when clk_src is zero, leading to unparsable config (related: OS#1944). Instead omit the 'clock-source' when zero. - osmo-bts-trx seems to be the only part that lacks nothing, yet it also didn't work properly because bts_model_config_write_phy_inst() was never called. This problem existed since commit d784e50747b8cf0ce505489e1451f75be5ccbd4b "Introduce new phy_link and phy_instance abstraction" Change-Id: Icc54fa70045c8fa58e78cf9f788c21a437edfbd4
2017-02-01octphy: Improve OML ADM state handlingPhilipp1-2/+59
Improve state handling for for lock/unlock of OC_RADIO_CARRIER obj class. in bts_model_chg_adm_state() Change-Id: I034114beca95210169429d8ac1eb8648df12fc6c
2017-01-31cosmetic: remove stray newline in octphy's l1_oml.cPhilipp Maier1-2/+1
Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7
2017-01-31cosmetic: Remove stray newlines in octphy_vty.cPhilipp Maier1-5/+0
Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98
2017-01-31octphy VTY: fix vty write output for octphy's phy sectionPhilipp Maier1-7/+7
Fix invalid configuration generated by VTY 'write' command for the 'phy' section of osmo-bts-octphy. The problem was introduced during refactoring commit d784e50747b8cf0ce505489e1451f75be5ccbd4b (Sat Jan 9 13:13:37 2016 +0100, "Introduce new phy_link and phy_instance abstraction") Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533
2017-01-23octphy: set tx attenuation via VTYPhilipp2-7/+29
add code to configure the transmision power via VTY Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981
2016-12-01Remove duplicated codeMax1-4/+3
Remove lchan deactivation related code duplication to facilitate future use for dynamic CCCH re-activation. Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9
2016-11-11Replace link_id constant with defineMax1-4/+4
Instead of using constant for link_id directly, use shared define value. Change-Id: Ibf3d439d8893bd994ba089796175b6c635db2cf8
2016-11-08Add libosmocodec for octphy buildMax1-2/+2
Similar to 45822227577cba5c6c4a4d4d61a7a9e8b4992c25 fix build by linking with libosmocodec explicitly. Change-Id: Ib52135936ae02d804b60f61088b4bdd227a71aa0
2016-10-18Replace magic number with defineMax1-2/+3
SDCCH occupy lchan 0..3 in combined configuration so for CCCH we've always used lchan[4] - replace it with CCCH_LCHAN define and add comment. Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0
2016-10-12octphy: prevent mismatch between dsp-firmware and octphy headersPhilipp1-6/+20
in its current statue l1_oml.c does not check if the version number in the header files (octvc1_main_version.h) matches up the version that is reported from the DSP during startip. This patch ads a check to make sure that the currently loaded firmware and the headers used during compile time match. If a mismatch is detected, osmo-bts exits immediately. Change-Id: Icba5756517d632d53b129c5ce1a1dab4936dab91
2016-10-06octopy: fixing renamed constantPhilipp2-0/+15
The constant cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED in header file octvc1/hw/octvc1_hw_api.h has been renamed to cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE. This commit adds an ifdef decision in to code to ensure that older header files will still work. Change-Id: I4c0b976d29689ace06741c5943434fc33ee2df14
2016-10-06octphy: reintroducing multi-trx supportPhilipp1-1/+19
The multi-trx had to be removed because of build conflicts with octphy header that lack the struct members for needed to support multi-trx. For details see the following revert-commits: ed6b48e4a5fba07c3ecccf689991799ae13a2aaa c9a1f284acf518cb4e62c3898e20398ed53807c3 This commit reintroduces multi trx support and ads an ifdef decision to ensure that header files without multi-trx support still work. Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0
2016-09-24octphy: Fixing band selection for ARFCN 0Philipp1-1/+3
There is now an exception for ARFCN 0 in osmocom_to_octphy_band to distingush ARFCN 0 (E-GSM) and 1-124 (P-GSM). Change-Id: If012f31121e9d0d45b36459807c5f290aa17374f
2016-09-24octphy: Fixing missing payload type in ph. chan. activationPhilipp1-0/+1
in l1_oml.c:ts_connect() the payload type (ulPayloadType) was not configured to full-rate for PDTCHF PACCHF and PTCCHF. Older octasic firmwares (below octsdr-2g-02.06.00-B964-alpha) will tolerate this, newer versions will crash during channel initalitation. Change-Id: Id2f6a439ceb063b10efc7b9d1d70bb5b29a01033
2016-09-06octphy: fix build with OCTSDR-OPENBSC-02.07.00-B708: name changedNeels Hofmeyr2-2/+2
There was an apparent change of name from cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE to cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED in: git://git.osmocom.org/octphy-2g-headers commit 953a258aadf18c05e8128a339f15b1c5bb377cfd "Import headers from OCTSDR-OPENBSC-02.07.00-B708.tgz" In order to build octphy with these headers, apply the same rename in osmo-bts-octphy/*. Change-Id: Ic07055860035a7c1b83ab923817423eeb39f33d3
2016-09-06octphy: fix build: Revert "octphy: add support for multiple trx ids"Neels Hofmeyr1-3/+2
This reverts commit c4fc00d8515ddc9990dfaf700c501cb8fe490cab, except: we keep the part that sets the trx_id in bts_model_phy_instance_set_defaults(). Theoretically, this patch makes a lot of sense, but in order to be able to build osmo-bts-octphy until the headers version is clarified, revert use of usCentreArfcn: Above commit uses an usCentreArfcn member that is never defined in the history of our octphy-2g-headers.git. This usCentreArfcn does exist in a code snapshot OCTSDR-2G-02.05.00-B780-DEBUG, which is not (yet?) publicly available. Also, the current headers version is apparently 02.07, though the octasic version numbers have been known to cause confusion among osmocom folks. This along with one other revert fixes this build problem: make[3]: Entering directory '/n/s/octphy/git/osmo-bts/src/osmo-bts-octphy' CC l1_oml.o l1_oml.c: In function ‘l1if_trx_open’: l1_oml.c:1350:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn = plink->u.octphy.center_arfcn; ^ l1_oml.c:1352:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn = trx->arfcn; ^ In file included from ../../include/osmo-bts/logging.h:5:0, from l1_oml.c:33: l1_oml.c:1365:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, ^ Change-Id: Ic643709e8fb3df2d66337190ed1f07fd230d7dca
2016-09-06octphy: fix build: Revert "octphy: fix for multiple trx with more than 1 dsp"Neels Hofmeyr1-8/+1
This reverts commit 06968beab90806cba94c8b331276e4dc209c152b. Theoretically, this patch makes a lot of sense, but in order to be able to build osmo-bts-octphy until the headers version is clarified, revert use of usCentreArfcn: Above commit uses an usCentreArfcn member that is never defined in the history of our octphy-2g-headers.git. This usCentreArfcn does exist in a code snapshot OCTSDR-2G-02.05.00-B780-DEBUG, which is not (yet?) publicly available. Also, the current headers version is apparently 02.07, though the octasic version numbers have been known to cause confusion among osmocom folks. This along with one other revert fixes this build problem: make[3]: Entering directory '/n/s/octphy/git/osmo-bts/src/osmo-bts-octphy' CC l1_oml.o l1_oml.c: In function ‘l1if_trx_open’: l1_oml.c:1350:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn = plink->u.octphy.center_arfcn; ^ l1_oml.c:1352:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn = trx->arfcn; ^ In file included from ../../include/osmo-bts/logging.h:5:0, from l1_oml.c:33: l1_oml.c:1365:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, ^ Change-Id: I222766f6961f5f35aa3651e2907e3e908fe9a66e
2016-08-08Fill measurements data for L1SAPMax1-1/+12
Fill in values for BER, BTO, Link quality in L1SAP and send them to PCU. Note: this increases the version of BTS <-> PCU protocol. It also requires corresponding changes in libosmocore. All BTS models provide measurements data unless direct DSP access for PCU is enabled. For BTS-specific notes see below. Octphy: conversion from sSNRDb to Link Quality uses formulae which works in practice instead of what's documented for sSNRDb value. Subject to change in future revisions. TRX: C / I link quality estimator is not computed. Change-Id: Ic9693a044756fb1c7bd2ff3cfa0db042c3c4e01c Related: OS#1616
2016-07-28octphy: fix buildMax1-1/+1
The error was introduced in 61372a20de695a151611753689ee9a3018b101f6. Change-Id: I9585eec018b88c5d0548a0a55fa4130bb26aa5b6
2016-06-24Remove duplicated nibble shift codeMax1-38/+0
Those functions are now part of libosmocore. Change-Id: Iab3206e3b41caff23f656a727605032df9798953
2016-06-23Make get_lchan_by_chan_nr globally availableMax1-11/+5
* Remove static qualifier * Remove duplicated code - use generic function instead Change-Id: I37a312648771f58d3087471083cfcebbd97ccf1d
2016-06-18Move copy-pasted code into common partMax1-25/+3
Related: OS#1750 Change-Id: Ic4342eaf7e32a0e9a5f2b16dd196a1f5f03152a9
2016-06-17dyn PDCH: add bts_model_ts_connect() and _disconnect() stubsNeels Hofmeyr1-0/+11
Enhance bts_model_ API in preparation of dyn PDCH switching. These will be used to re-connect a TCH/F_PDCH TS in a different mode: either as TCH/F or as PDCH. All implementations so far return -ENOTSUP, and thus will cause a IPAC PDCH ACT or DEACT *NACK* to be sent to the BSC as soon as these messages are handled. Also add stubs in tests. Change-Id: I21e60c028a1333431c3ed000f788b654d1170b0d
2016-06-14Close TRX session before opening new oneJason DSouza1-1/+43
This fixes the unstable behavior (BTS loosing subscribers after some time) in case previous run of osmo-bts was interrupted (with ctrl+c for example). Change-Id: Ie2119b0b566d01f0e70b38c8a149fecb47def38d
2016-06-13octphy: Use the app. info. defaults as baseMax1-0/+2
Similar to 91565b2d51646657002f91fdc22dce3c7320e13a use default initializers. Change-Id: Ib813249f4295b034eb65658e3f43b4fe86862cf0 Fixes: Os#1642
2016-05-31octphy: Update outdated config param name in error message.Daniel Laszlo Sitzer1-1/+1
Change-Id: I45b8bc09c9aabacc5b908450fe574b5802b88be8 Reviewed-on: https://gerrit.osmocom.org/129 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-03-21octphy: fix for multiple trx with more than 1 dspMax1-1/+8
Explicitly store and use "center" arfcn used by each dsp (1 dsp corresponds to 1 phy link).
2016-03-18octphy: add support for multiple trx idsMax2-2/+4
2016-03-18octphy: use octasic's routines for debug outputMax1-2/+4
2016-03-17octphy: add missing include to fix the buildMax1-0/+1
2016-03-16octphy: Enable TCH/H mode and begin testingHolger Hans Peter Freyther1-3/+0
Upcoming releases will support TCH/H and we should start to test the DSP->RTP code.
2016-03-10octphy: Use the event defaults as baseHolger Hans Peter Freyther1-0/+3
Bad parameters are passed to the event structure and the default initialization should happen.
2016-02-22Fix ocmo-bts-octphy interaction with OsmoPCUMax1-0/+1
Previously osmo-bts-octphy have not provided in-band presence information which cause off-by-one errors and misinterpretation of ph_data_ind by PCU. This fixed now by adding support for explicitly passing PH-DATA presence info. Corresponding check and in-band passing of presence information are removed. Note: this requires libosmocore version with osmo_ph_pres_info_type support integrated. [hfreyther/max: Remove + 1 from the decoded length]
2016-02-15move auto-band configuration commands to common/vty.cHarald Welte1-5/+0
It remains up to the individual BTS hardware models to decide whether or not to register those commands (depending on whether they support the feature) via cfg_bts_auto_band_cmd / cfg_bts_no_auto_band_cmd
2016-02-15Introduce new phy_link and phy_instance abstractionHarald Welte6-231/+348
This way we can model a flexible mapping between any number of PHYs, each having multiple instances, and then map BTSs with TRXx on top of those PHYs.
2016-02-03octphy: Look-up the right timeslot and then the logical chanHolger Hans Peter Freyther1-1/+1
Use the right identifier for the timeslot and not the trx number which would always use ts==0 on the first trx. This should fix ciphering issues for TS>0 (e.g. SDCCH8 on TS==1)
2016-01-22OCTPHY: fix 'make dist' (missing header files)Harald Welte1-1/+1