aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/main.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-10bts: In case the line isn't created do not exit with code 1Holger Hans Peter Freyther1-1/+1
The service file will prevent a re-launch of the sysmobts.service in case the main process exits with '1'. In case the ethernet is not available yet the routine would fail and the sysmobts process will not be restarted. unable to connect/bind socket: Network is unreachable <000f> input/ipaccess.c:885 cannot open OML BTS link: Network is unreachable unable to connect to BSC root@sysmobts-v2:~# echo $? 2 Fixes: SYS#736
2014-08-24ctrl: Add sysmobts control interfaceHarald Welte1-0/+1
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-24fix build problem introduced with control interfaceHarald Welte1-1/+0
2014-08-24use libocmocore #defines for VTY port numbersHarald Welte1-1/+2
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 Welte1-5/+1
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-07-31sysmobts: Make sure that the omlrouter is in a FHS pathHolger Hans Peter Freyther1-2/+3
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: Begin with an OML router that will be used by the managerHolger Hans Peter Freyther1-0/+8
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-30sysmobts: Make it possible to slowly ramp up the output powerHolger Hans Peter Freyther1-0/+5
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-05-25sysmobts: Revert all sysmobts-mgr related changesHolger Hans Peter Freyther1-104/+0
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-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: Separate IPA and OML check into two methodsÁlvaro Neira Ayuso1-1/+10
I have split the function check_oml_msg, in two functions. One for checking if the ipa header is well-formed and in check_oml_msg, Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-19Revert "sysmobts: Add support for changing the transmit power in sbts2050"Harald Welte1-121/+1
This reverts commit c64d42573894d8295b58b268a64541c914b69bcd. There are unfrtunately still too many problems with this patch to be merged at this point.
2014-05-18sysmobts: Add support for changing the transmit power in sbts2050Álvaro Neira Ayuso1-1/+121
Make the sysmobts-mgr send a manufacturer O&M message with the power reduction we want the sysmobts to apply. The sysmobts will handle this message and set the new tx output power. An ACK/NACK will be send as a response to the power reduction. Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-18sysmobts: Add beginnings of an OML router and create Failure Messages in the ↵Álvaro Neira Ayuso1-0/+95
sysmobts-manager Make the sysmobts listen for OML messages on a Unix Domain Socket. Messages passing a sanity check will be forwarded to the BSC. In case the sysmobts-mgr detects a temperature above or below temperature threshold an OML failure message will be sent to the BTS. [moved confinfo into the #ifdef BUILD_SBTS2050] Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-15abis: Separate initialization from connect for AbisHolger Hans Peter Freyther1-0/+2
Initialize the libosmo-abis VTY nodes more early so we can parse the config file that was created by "write". Introduce abis_init to initialize the libosmo-abis and modify abis_open to re-use an existing line. Update the comments. This has only been tried with the sysmobts-remote on x86. A TCP connection is opened toward the configured BSC. Fixes: SYS#285
2014-03-21systemd: Do not restart with a broken config file or suchHolger Hans Peter Freyther1-1/+1
Only restart in case of a crash or the exit(42) when the OML/RSL link is going down.
2013-11-27sysmobts: Make the eeprom/nominal power reading backward compatibleHolger Hans Peter Freyther1-3/+3
There are existing deployments where the EEPROM either contains a wrong value and/or the kernel can not be updated to support the different EEPROM of revD. Revert to the old behavior that if no nominal can be derived from the model_nr we assume that it is 23.
2013-11-27bts: Fix typos in the log messagesHolger Hans Peter Freyther1-1/+1
2013-11-27bts: Fix a typo in the log messageHolger Hans Peter Freyther1-1/+1
2013-11-05sysmobts: Use status flags instead of direct LED accessJacob Erlbeck1-0/+25
Currently the LEDs are being accessed directly from within the l1_if.c file. So the handling of rf mute and activate/deactivate both access LED_RF_ACTIVE directly. This may lead to an inconsistent LED status. This patch replaces these calls to sysmobts_led_set() by an abstract equivalent bts_update_status(), that uses a set of independant status ids. The associated values can than be combined into a visible LED status. Currently LED_RF_ACTIVE is on iff BTS_STATUS_RF_ACTIVE is set and BTS_STATUS_RF_MUTE is not set. Sponsored-by: On-Waves ehf
2013-10-09sysmobts: don't call sysmobts_get_nominal_power() twiceHarald Welte1-1/+1
... no need for that
2013-10-09sysmobts: Set nominal transmit power depending on sysmoBTS modelHarald Welte1-1/+10
This enables the use of up to 5W for each TRX in a sysmoBTS 2050.
2013-10-06abis: delay l1if_reset() until OML link is establishedHarald Welte1-2/+9
2013-10-06migrate away from our own abis.c code to libosmoabisHarald Welte1-23/+4
libosmoabis has a BTS-side implementation of the IPA protocol for years, and osmo-bts should have used that all the time. Unfortunately it had its own local hack, this patch is migrating to the libosmocore implementation.
2013-07-16sysmobts: Set the clock calibration to the value read from the eepromNicolas J. Bouliane1-0/+28
By default read the clock calibration from the EEPROM. It is still possible to set it using the cli. Signed-off-by: Nicolas J. Bouliane <nicolas.bouliane@nutaq.com>
2013-05-11sysmobts: Allow to enable realtime priority for the BTS processHolger Hans Peter Freyther1-1/+21
The latency to respond to a PH-READY_TO_SEND.ind may not be higher than 18ms. Currently we are using nice to increase our priority but for a heavily loaded cell this is not enough. Add an option to enable realtime scheduling and use it in the screenrc. Linux offers two realtime scheduling classes these are SCHED_FIFO and SCHED_RR. For SCHED_FIFO the process is running as long as possible (potentially taking all the CPU and never yielding it), for SCHED_RR the process can still be pre-empted at the end of the timeslice. Using SCHED_RR appears to be the more safe option as a run-a-way sysmobts process will not be able to take all the CPU time. For a very loaded cell we also require to use readv/writev to allow writing multiple primitives in one syscall.
2012-12-26ciphering: Handle ciphering support for A5/3 correctlyHolger Hans Peter Freyther1-1/+1
This was found and debugged by Sylvain. The BTS will always support A5/0 so we do not keep track of that, the first bit of the flags is used for A5/1, second for A5/2... but for RSL there is an offset to go from RSL to A5(x). Add a testcase and change the code.
2012-07-26PCU: Removed -P option, so GPRS support is always enabledAndreas Eversberg1-11/+7
2012-07-21Enable direct access to PDTCH queue of DSP by PCUAndreas Eversberg1-2/+8
Use "-P -M" to enable PCU and direct access.
2012-07-08PCU: Add PCU socket interface to BTS.Andreas Eversberg1-1/+12
A special command line option "-P" is used to enable socket interface and signal available GPRS MO object to BSC.
2012-06-03Use git-generated PACKAGE_VERSION in IPA IDTAG_SWVERSIONHarald Welte1-2/+0
We previously used to send the bogus string "0815" which was a hack from early development time, but is obviously not a generally useful idea.
2012-05-31add /var/lock/bts_rf_lock and /var/run/osmo-bts.pid for rf controlHarald Welte1-1/+31
an external application can create /var/lock/bts_rf_lock and then kill the pid in /var/run/osmo-bts.pid in order to shut down the BTS. Any re-spawning scripts will trigger, but osmo-bts will refuse to start up until /var/lock/bts_rf_lock is removed again.
2012-04-28sysmo-bts: Use HW_SYSMOBTS_V1 to select the development hardwareHolger Hans Peter Freyther1-1/+1
2012-04-19sysmobts: Add an option to query the hardware version.Holger Hans Peter Freyther1-1/+16
2012-04-19common: Add the copyright text to the vty_app_infoHolger Hans Peter Freyther1-1/+0
This will make app -V print the copyright information like the other applications of our universe. An BTS integration that want to list additionaly copyright holders needs to access the vty_app_info and create a new copyright string.
2012-04-14sysmobts: Handle options before allocating the btsHolger Hans Peter Freyther1-2/+3
This way -h/--version will always work, even when the underlying hardware is not available.
2012-03-18set the default log mask for the L1 a bit more reasonableHarald Welte1-1/+1
2011-11-24RSL: Actually check if BSC-requested cipher is supportedHarald Welte1-0/+1
2011-10-12add VTY based way to set clock calibration of sysmobts L1Harald Welte1-1/+1
2011-09-19fix various compiler warnings across the codeHarald Welte1-1/+2
this deals with unused cocde, unused variables and undeclared symbols in various places.
2011-09-04add minimal configuration file supportHarald Welte1-21/+20
this config file allows configuration of unit id, oml ip, and local rtp bind IP.
2011-09-03Add new ORTP based libosmo-trau based voice supportHarald Welte1-0/+1
Using osmo-bts-sysmo and this code, it is now possible to do FR and AMR based voice calls on TCH/F. A lot of CPU is wasted in the conversion between the RTP formats and the L1 specific formats for the codec frames. All data needs to be shifted by four bits, and the order of bits needs to be reversed in every byte.
2011-07-21Use libosmotrau for RTP supportHarald Welte1-1/+1
This only implements creating, binding, connecting and free'ing RTP sockets, not yet anything regarding receiving or transmitting codec frames on them. You will need the rtp branch of libosmocore for libosmotrau
2011-07-05add some missing #include directivesHarald Welte1-0/+2
2011-07-05add command line option '-p' to specify DSP trace flags as hex maskHarald Welte1-1/+7
2011-07-05add VTY commands for setting and showing DSP trace flagsHarald Welte1-0/+2
2011-07-01fix BTS initialization orderHarald Welte1-1/+1
The sequence is as follows: 0) start osmo-bts 1) start connection attempts to BTS 2) issue L1-RESET.req 3) receive L1-RESET.conf 4) issue RF-ACTIVATE.req 5) receive RF-ACTIVATE.conf 6) receive attributes for TRX 7) receive opstart for TRX 8) issue MPH-INIT.req [...] The important point here is: We don't want the BSC to set TRX attributes or do TRX opstart before our RF related hardware is initialized.
2011-07-01sysmo-bts: properly initialize the nominal power, print it at startupHarald Welte1-0/+1