aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-21 23:51:13 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-21 23:55:27 +0200
commit1f8053e366c9d0f4ab7160595a3cb1ead915e0d6 (patch)
treee10f2099acc0f5204feff094df0fe75b4c9c3061 /src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
parente02d7796c3cb4eaeca679286bc6db12b9b2c070b (diff)
sysmobts: Enable the PA on start and disable it as first action
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.
Diffstat (limited to 'src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c')
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
index d3a46283..dac226f5 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
@@ -96,6 +96,26 @@ static void execute_warning_act(struct sysmobts_mgr_instance *manager)
static void execute_critical_act(struct sysmobts_mgr_instance *manager)
{
LOGP(DTEMP, LOGL_NOTICE, "System has reached critical warning.\n");
+
+ /* switch off the PA */
+ if (manager->action_crit & TEMP_ACT_PA_OFF) {
+ if (!is_sbts2050_master()) {
+ LOGP(DTEMP, LOGL_NOTICE,
+ "PA can only be switched-off on the master\n");
+ } else if (sbts2050_uc_set_pa_power(0) != 0) {
+ LOGP(DTEMP, LOGL_ERROR,
+ "Failed to switch off the PA. Stop BTS?\n");
+ } else {
+ LOGP(DTEMP, LOGL_NOTICE,
+ "Switched off the PA due temperature.\n");
+ }
+ /*
+ * TODO: remember we switched off things so we could switch
+ * it back on. But we would need to make sure that the BTS
+ * will not transmit with full power at that time. This
+ * requires the control protocol.
+ */
+ }
}
static void sysmobts_mgr_temp_handle(struct sysmobts_mgr_instance *manager,