aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-08-24fix build problem introduced with control interfaceHarald Welte3-3/+3
2014-08-24use libocmocore #defines for VTY port numbersHarald Welte2-2/+4
2014-08-24ctrl_if: Move control interface to port 4238Harald Welte3-4/+6
... which is now defined in libosmocore
2014-08-24add control interface to common BTS (for thermal attenuation)Harald Welte5-1/+190
Using this control interface, an external program can request attentuation of the transmitter for thermal management reasons. The external application doesn't have to know anthing about the actual transmit power, but it can just configure a certian value of milli-dB (1/10000 bel) and update (increase/decrease) that value depending on the thermal environment.
2014-08-24New generic transmit power handlingHarald Welte13-152/+455
In order to support transmit power reduction by thermal management as well as the variety of new internal / external PA configurations of BTSs, we need a slightly more complex system. Also, as at high power a single dB can be quite a big difference, we are now doing all computations in milli-dB(m), i.e. 1/10000 bel. Ramping is now used both for up and down ramping, as that is useful in cases where you want to gracefully shut down a cell by shrinking its radius, gradually handing over subscribers to neighboring cells. Furthermore, this code is becoming part of the 'common' codebase, as it is not really specific to how sysmobts is working. The user can specify a single aggregate value for external system gain/attenuation. Let's say you have 1dB loss of antenna cable, so you can put that as 'user-gain -1' into the config, which means that a 'transmit power of 20dBm' will be compensatet for that and the TRX is instructed to output 21dBm to compensate the cable loss. Similarly, external PAs can be described by a positive user-gain. One of the next steps will be to communicate those values and the nominal power capability of the specific BTS to the BSC, so the BSC will automatically show correct signal levels in the VTY and log files. The code includes provisions for future extensions regarding * an external and an internal PA with calibration tables * a thermal attenuation setting to be controlled by the site manager
2014-08-24remove copy of gsm_bts_num()Harald Welte1-15/+0
... which is now available from gsm_data_shared.[ch] of openbsc
2014-08-22sysmobts: Use the uc connection on both slave and masterHolger Hans Peter Freyther3-6/+11
We can use this on both slave and master. But only have the master switch on the PA.
2014-08-21Merge branch 'sysmocom/features/sysmobts-mgr-temp'Holger Hans Peter Freyther9-203/+780
Implement the first round of temperature control and actions. Only the PA can be switched off, it will never be switched on again, in case the microcontroller doesn't respond we will do nothing as well. These todos need to be addressed in the near future.
2014-08-21sysmobts: Enable the PA on start and disable it as first actionHolger Hans Peter Freyther5-6/+66
The PA will be unconditionally turned. This makes it possible that in case of a crash, the PA will be turned on and then we will do the temperature measurement and turn it off again. There are no known crashes with the sysmobts-mgr right now so the risk seems to be okay. In case we can't switch off the PA we have no way to escalate it right now. We have not seen a dead uc either so the risk is okay as well. We can't switch the PA back on once we reach the normal level as the BTS might transmit with full power and we would need more current than the power supply/rails can carry. So leave the system off right now. What is missing is to use the OML router to actually inform the BSC that something bad has happened at the BTS.
2014-08-21sysmobts: Show the current temperature controls state int he VTYHolger Hans Peter Freyther3-0/+8
2014-08-21sysmobts: Provide information about the state transitionsHolger Hans Peter Freyther1-0/+12
2014-08-21sysmobts: Implement a small state machine for temp controlHolger Hans Peter Freyther6-7/+206
Check the temperature and move between "NORMAL", "WARNING" and "CRITICAL" state. We will only return from CRITICAL to WARNING when the temperature has significantly changed, and when being in state "WARNING" we enter an intermediate state to allow an easy hysteris.
2014-08-21sysmobts: Remove the sbt2050 timer and move defines backHolger Hans Peter Freyther3-19/+6
We haven't done anything with the result of the micro controller query and querying every six hours for the temperature of the system will not help us. We need to query the temperatures more frequently but avoid writing to the eeprom too frequently so we will start another timer for that.
2014-08-21sysmobts: Simplify some includes/dependenciesHolger Hans Peter Freyther3-19/+1
2014-08-21sysmobts: Begin to add various limits and actionsHolger Hans Peter Freyther3-13/+275
The idea is that for different parts of the system we can define thresholds for warning and critical (severe) temperate thresholds. And once any of these temperatures is reached we will execute an action. When crossing from NORMAL to WARNING or WARNING to SEVERE we will need to apply some hysteris before switching back to the lower level. E.g. when being SEVERE mode, at least wait until we are below the warning level again. Besides being able to switch off things we could start reducing the transmit power of the system until the system is cold enough again. No action is implemented so far, everything is varpoware!
2014-08-21sysmobts: Fix the temperature log message alignmentHolger Hans Peter Freyther1-1/+1
2014-08-21sysmobts: Move ipaccess-find counterpart to a dedicated source fileHolger Hans Peter Freyther5-145/+212
2014-08-21sysmobts: Fix the build when no 2050 uc header file was foundHolger Hans Peter Freyther1-0/+14
Fix the build (provide empty stubs) when the header file is not present.
2014-08-21Merge branch 'sysmocom/features/sysmobts-mgr'Holger Hans Peter Freyther4-49/+133
Add some VTY code to show the temperature on all devices and to query the external micro controller for voltage/current and the temperature in the "show manager" command. It should probably be a "show system" command though.
2014-08-21sysmobts: Fix the power request resultHolger Hans Peter Freyther3-25/+63
We want to know which componets are enabled and the voltage and current used by the components.
2014-08-21sysmobts: Read the temperature sensors on the deviceHolger Hans Peter Freyther1-0/+16
Read the sensors that are always present and the ones that are only present on the sysmoBTS 2050.
2014-08-21sysmobts: Add is_sbts2050_masterHolger Hans Peter Freyther3-4/+11
2014-08-21sysmobts: Read the model number and trx once from the deviceHolger Hans Peter Freyther3-21/+43
Use it for the ipaccess-find response and for the sysmobts classification code. This can be used by the vty in a second.
2014-08-21sysmobts: Initialize fd with an invalid fdHolger Hans Peter Freyther1-1/+2
Initialize the ucinfo with an invalid fd to prevent writing on fd=0 by accident.
2014-08-21Merge commit 'sysmocom/features/sysmobts-mgr-vty'Holger Hans Peter Freyther11-345/+562
Some re-factorings. Still a very long way to go. It should work with haralds re-based but that wasn't verified due my toolchain not having the most recent libosmocore. The service file and screenrc change has not been verified either.
2014-08-21sysmobts: Use another logp region as it is mostly related to rempHolger Hans Peter Freyther1-3/+3
2014-08-21sysmobts: There is only one uc make it a singletonHolger Hans Peter Freyther3-74/+76
Move the init and polling into the sysmoBTS related part. In the future we should have _one_ temperature control.
2014-08-21sysmobts: Clean-up the parsing routinesHolger Hans Peter Freyther2-40/+38
2014-08-21sysmobts: Move the sysmoBTS 2050 controller handlingHolger Hans Peter Freyther4-260/+286
Move the code to a separate file to keep things nicely apart of each other.
2014-08-21sysmobts: Add VTY support to the sysmobts-mgrHolger Hans Peter Freyther8-6/+197
Add VTY support to the manager. This way we can interactively inspect the state of the system and trigger events.
2014-08-20adopt to recent libosmocore ipa renameHarald Welte1-0/+1
2014-08-18TLVP_PRES_LEN is now in libosmocore, avoid redefining itHarald Welte1-0/+2
2014-08-18replace oml_{osmo,ipa}_magic[] with abis_nm_{osmo,ipa}_magicHarald Welte3-19/+13
the latter is now in libosmogsm.
2014-08-18Migrate to osmo_get_macaddr() in recent libosmocoreHarald Welte1-27/+2
get_mac_addr() is generally useful and shouldn't be hidden in the osmo-bts/abis.c file
2014-08-09sysmobts: Add a unit test that checks of the behaviorHolger Hans Peter Freyther4-3/+100
We need to build a lot more code to be able to test these two new routines. I didn't want to move the code to a utils file as the check is called from a hot path. Add accessors to the inlined variant to be used by the unit test. While writing the unit tests I noticed that a re-transmission of the ciphering command would lead to an attempt to enable ciphering again. I am not sure that this MphConfig is idempotent.
2014-08-09sysmobts: Deal with ciphering when we have a transport clashHolger Hans Peter Freyther1-12/+31
The network is configured with early classmark sending. This means that the phone might send a "classmark change" message at the same time we send a ciphering mode command. When we received the CM message we assumed we have just received the first ciphered message and enabled ciphering for tx as well. When we snoop the Ciphering Mode Command extract the N(S) variable and when we receive an I frame from the MS see if it handled our message by comparing the MS N(R) to BTS N(S) + 1.
2014-07-31Merge branch 'sysmocom/features/oml-router'Holger Hans Peter Freyther13-10/+477
2014-07-31sysmobts: Make sure that the omlrouter is in a FHS pathHolger Hans Peter Freyther3-6/+7
I wondered if I should use the 'abstract namespace' feature of Linux but just put the router into /var/run/ to make it work out of the box. Change the signature to provide a sane error message.
2014-07-31sysmobts: Add testcase for ETSI/12.21 messageHolger Hans Peter Freyther2-0/+18
2014-07-31sysmobts: Extend the testcase for a Osmo message as wellHolger Hans Peter Freyther1-16/+36
2014-07-31sysmobts: Verify the structure of IPA and OML messagesHolger Hans Peter Freyther10-10/+302
Extend the router to verify that the message received is properly encoded. The code can deal with the basic structure of ETSI OML and vendor specific messages for ip.access and the osmocom project.
2014-07-31sysmobts: Remove debug left over from enabling the RTP modeHolger Hans Peter Freyther1-1/+0
2014-07-31sysmobts: Begin with an OML router that will be used by the managerHolger Hans Peter Freyther4-2/+138
Begin with the basics of a OML Router. This is currently only capable of accepting a connection and read messages but it will evolve into a router in multiple stages. The first usage will be by the sysmobts-mgr. An OML Error Indication will be sent by the sysmobts-mgr and it will be forwarded to the BSC. In the second step we will set a relative power reduction from the sysmobts-mgr. In the long-term this code will be used to communicate with a second TRX.
2014-07-31tests: Move the "pcu_direct" symbol into the stubs to be sharedHolger Hans Peter Freyther4-3/+1
2014-07-31oml: Make it possible to include the file directlyHolger Hans Peter Freyther1-0/+4
Fixes: ../../include/osmo-bts/oml.h:8:42: warning: ‘struct gsm_bts’ declared inside parameter list [enabled by default] int down_oml(struct gsm_bts *bts, struct msgb *msg); ^ ../../include/osmo-bts/oml.h:8:42: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] ../../include/osmo-bts/oml.h:12:52: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_mo_send_msg(struct gsm_abis_mo *mo, struct msgb *msg, uint8_t msg_type); ^ ../../include/osmo-bts/oml.h:13:31: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_mo_opstart_ack(struct gsm_abis_mo *mo); ^ ../../include/osmo-bts/oml.h:14:32: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_mo_opstart_nack(struct gsm_abis_mo *mo, uint8_t nack_cause); ^ ../../include/osmo-bts/oml.h:15:32: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_mo_statechg_ack(struct gsm_abis_mo *mo); ^ ../../include/osmo-bts/oml.h:16:33: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_mo_statechg_nack(struct gsm_abis_mo *mo, uint8_t nack_cause); ^ ../../include/osmo-bts/oml.h:19:29: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_mo_state_chg(struct gsm_abis_mo *mo, int op_state, int avail_state); ^ ../../include/osmo-bts/oml.h:22:31: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] void oml_mo_state_init(struct gsm_abis_mo *mo, int op_state, int avail_state); ^ ../../include/osmo-bts/oml.h:26:10: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int success); ^ ../../include/osmo-bts/oml.h:29:33: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_tx_state_changed(struct gsm_abis_mo *mo); ^ ../../include/osmo-bts/oml.h:31:33: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] int oml_mo_tx_sw_act_rep(struct gsm_abis_mo *mo); ^ ../../include/osmo-bts/oml.h:36:4: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default] uint8_t cause);
2014-07-31sysmobts: Enable the direct RTP mode for firmware >= 3.11Holger Hans Peter Freyther2-2/+18
We need to patch the CMR due wanting to support systems that still have Audiocodes hardware in their chain. I have manually tested and could listen to my own voice on: TCH/H & AMR 5.9 & PTSN & BSC TCH/F & FR1 & Other subscriber & NITB TCH/F & EFR & Other subscriber & NITB TCH/H & HR1 & Other subscriber & NITB TCH/H & AMR 5.9 & Other subscriber & NITB The tests were done using the Nokia E71, a Blackberry curve and for the PTSN a HTC 8S were used.
2014-07-30sysmobts: Make it possible to slowly ramp up the output powerHolger Hans Peter Freyther7-12/+155
For systems with a bigger PA enabling the full output power at once might draw more current than a power supply can provide. This code will step up the output power in smaller steps to avoid this situation.
2014-07-25sysmobts: Provide VTY routines to do clock calibrationsHolger Hans Peter Freyther3-2/+150
The sysmoBTS2050 does not have a OCXO and we should not rely on the GPS module to always have a fix. Instead use the TCXO by default and from time to time (and we know we have a fix calibrate the TCXO). This can be done by: trx 0 rf-clock-info reset wait... trx 0 rf-clock-info correct write The output is currently only written to the log as the VTY connection might go away during the operation. The reset will set the approriate reference clock and the correct will attempt to determine and apply the correction. The write terminal will make sure that next on start a known good value will be used.
2014-07-25sysmobts: Free the message on older firmware releasesHolger Hans Peter Freyther1-0/+1
Seen while implementing a new functionality in the code.
2014-07-25sysmobts: Include the model and master/slave in the unitidHolger Hans Peter Freyther1-0/+31
Make it more easy to find the right BTS model and know what is the master/slave.