aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo
AgeCommit message (Collapse)AuthorFilesLines
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-24Use new libosmo-abis features to allow OML on non-standard TCP portHarald Welte1-1/+1
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 Welte1-1/+2
... which is now defined in libosmocore
2014-08-24add control interface to common BTS (for thermal attenuation)Harald Welte1-0/+5
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 Welte4-148/+11
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-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-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 Freyther1-2/+16
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 Freyther1-9/+9
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
2014-05-30sysmobts: Fix the initialization of the BTS manager codeHolger Hans Peter Freyther1-8/+8
The code should only run for the sysmoBTS 2050 and TRX 0. If the device is not marked as 2050 the code would attempt to open /dev/ttyS0 and block forever.
2014-05-25sysmobts: Revert all sysmobts-mgr related changesHolger Hans Peter Freyther9-903/+4
Harald is right and that the code is generally not ready for inclusion. I fell victim of trying to finish it while the code is not ready at all. It is better to re-introduce the patches in a smaller and more tested way. The right way would have been a branch were ready things are split-off the main/wip commit until everything is ready. Revert "sysmobts: Have a common prefix for the enum" This reverts commit 44980347f308fe5bbe48a933dbc81b82b53d310a. Revert "utils: Used the enum manuf_type_id in the parameter of add_manufacturer_id_label" This reverts commit 7d36e5ed46b630203167fc9d5d28e0087fdbd394. Revert "utils: Classify the OML message using the return type" This reverts commit afee0b7929a00500f9c204f3bc7e12f72451e832. Revert "sysmobts: Do not access out of bound string" This reverts commit f5f41e805195c8c3294a9e6a68b10f975fbabbbd. Revert "sysmobts: Separate IPA and OML check into two methods" This reverts commit 13a224063dfcee0be529fba1c8fb9be9c1fb261e. Revert "screenrc: osmobts-mgr now needs a config file" This reverts commit 0a1699ff8a5462c167c24e8b28186abb26331698. Revert "make sure osmobts-mgr.cfg file is included in tarballs" This reverts commit 14c60b425f8146f6a392d2d3de2979c817cd975e. Revert "sysmobts-mgr: Add VTY support for configuring it" This reverts commit c5fedd24c96a4ef6d7a0c0ed3c70d6ef0abd5c17. Revert "sysmobts: Add beginnings of an OML router and create Failure Messages in the sysmobts-manager" This reverts commit c6ab90b27006ff2d1fdfb0b1d7fc01e1dd4a696d.
2014-05-22common: Remove unused gsm_time parameter from lchan_sacch_getHolger Hans Peter Freyther1-1/+1
2014-05-22sysmobts: Avoid memleak when multiple -c arguments are passedHolger Hans Peter Freyther1-1/+1
Rely on optarg pointing to an address that will be valid for the run of the entire application. Fixes: CID 1206578
2014-05-20sysmobts: Have a common prefix for the enumHolger Hans Peter Freyther3-5/+5
Make the manuf_type_id enum have a common prefix for the symbols.
2014-05-20utils: Used the enum manuf_type_id in the parameter of add_manufacturer_id_labelÁlvaro Neira Ayuso2-3/+3
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-20utils: Classify the OML message using the return typeÁlvaro Neira Ayuso2-5/+13
Classify the OML message and return the manufacturer type or an error. Currently ETSI, ip.access and Osmocom are known. Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>