aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-08-24Have osmo-bts request OML routes for all its MOs at startuplaforge/oml-routerHarald Welte5-2/+48
During OML link start-up, osmo-bts now requests a OML route for each of the managed objects that it currently implements. This is done via the 'ORC' (OML Router Control) protocol, which is encapsulated in the extended IPA_PROTO_OSMO multiplex. The responses (ACK/NACK) are not yet processed inside osmo-bts.
2014-08-24remove traces of the old 'oml router'Harald Welte4-152/+1
Prior to the stand-alone OML router there were some early steps, specific to the sysmobts code, to inject OML messages from external programs. Remove that, as it is now obsolete.
2014-08-24A dedicated OML router program (osmobts-omlrouter)Harald Welte5-8/+1280
The idea of this OML router is to be the entity that connects the OML link to the BSC. osmo-bts as well as other programs like sysmobts-mgr and possibly more will then connect to the OML-router rather than the BSC. The point is that those "OML clients" can then register for certain OML messages (particularly the managed objects like TRX, etc.) which then get routed to them. This is particularly useful in the context of 'stacked' multi-TRX BTSs, where we will have two osmo-bts processes, one on each of the TRX, both connecting OML to the oml-router. Through their respective subscription of the baseband transceiver OML object, they will get routed the IPA CONNECT RSL message from the BSC, and both osmo-bts processes will establish independent RSL connections to the BSC.
2014-08-24Use new libosmo-abis features to allow OML on non-standard TCP portHarald Welte4-2/+21
If we run osmo-bts, osmobts-omlrouter and osmo-nitb or osmo-bsc on one machine, we cannot have both omlrouter and osmo-{nitb,bsc} listen on TCP Port 3002. This introduces a new 'oml remote-port <0-65535>' directive to the osmo-bts configuration to connect to sunch a non-standard port.
2014-08-24ctrl: Add sysmobts control interfaceHarald Welte3-1/+255
This sysmobts specific control interface allows for clock calibration from an external program by means of the "trx.0.clock-info" and "trx.0.clock-correction" values.
2014-08-24l1_if: pass private 'void *data' from call to callbackHarald Welte4-44/+62
When enqueueing a command towards the L1, we can now pass along a private data pointer, which then gets passed to the call-back upon completion.
2014-08-24fix build problem introduced with control interfaceHarald Welte2-3/+2
2014-08-24use libocmocore #defines for VTY port numbersHarald Welte2-2/+4
2014-08-24ctrl_if: Move control interface to port 4238Harald Welte2-3/+5
... which is now defined in libosmocore
2014-08-24add control interface to common BTS (for thermal attenuation)Harald Welte4-1/+187
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 Welte8-149/+375
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-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-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-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 Freyther4-3/+169
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 Welte2-16/+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 Freyther2-0/+22
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-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: Verify the structure of IPA and OML messagesHolger Hans Peter Freyther4-8/+198
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: 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-31sysmobts: Remove debug left over from enabling the RTP modeHolger Hans Peter Freyther1-1/+0
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 Freyther5-11/+150
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.
2014-07-25amr: Avoid toggling the CMR from none and a set oneHolger Hans Peter Freyther2-9/+11
For LCR and other systems without out-of-band information we need to indicate the CMR. Not every air message will include the mode and we sent a stream that had the CMR set and not-set. This lead to the AudioCodes MGW only playing every second frame. Remember the last used mode and initialize it to _NONE when we receive the multirate config. In case of a real error we will still use AMR_CMR_NONE. The initial patch is from Harald. I have added the initialization and moving of the defines to amr.h. Manually verified by enabling AMR5.9 and looking at two RTP packages in sequence. In both cases the CMR was 2. I have looked at "amr.nb.cmr != 2" in wireshark and only found the MGCP dummy packet.
2014-06-22sysmobts: Fix typo in the commentHolger Hans Peter Freyther1-1/+1