Commit Graph

14 Commits

Author SHA1 Message Date
Harald Welte 3af73977dd sysmobts_mgr_temp: Migrate to ctrl_cmd_send2()
ctrl_cmd_send() is now a deprecated API function.

Change-Id: I663669a1bcf7b58d6a6175cbb51c333f5cfaedd7
Depends: libosmocore.git Change-Id Ic81af56e7ea6921ba39168727ef64c308e9c6754
2024-03-02 19:05:07 +01:00
Harald Welte a7263b6474 Fix license headers.
We have licensed the code under GNU Afffero Public License,
and state that in the first paragraph as well as in the link
to the license.  However, a paragraph in the middle stated
"see the GNU General Public License", which is somewhat misleading.

Let's fix that.

Change-Id: I37e503b195fe43e1da42c080900504ca8e682e76
2024-02-17 10:21:30 +01:00
Max 114293a414 Copy sysmobts.service to osmo-bts-sysmo
This way the name of systemd service file will match the name of the
binary similar to lc15. Add aliases so the user can use both old and new
names regardless of which file is installed. Once the corresponding
changes to OE recipes are applied old file can be removed.

Based on work by Pau Espin Pedrol <pespin@sysmocom.de>

Change-Id: I08615eb625d488603aeb5962ad9f30869c0e77c5
2017-06-22 10:50:00 +00:00
Max 6f5e398ccb Handle ctrl cmd allocation failures
Check that ctrl command was successfully allocated before using it.

Fixes: CID163884
Change-Id: Id19e1ce5fae6f936c9ed93f9a6317b57d28d7311
2017-03-14 08:59:19 +00:00
Max 4acc98e68a Use oml-alert CTRL command for temp report
Send temperature reports via OML alert facility exposed by CTRL
protocol.

Change-Id: If29fbd0ab01fefc76e87b90cf1fbc81b2089ba76
Related: OS#1615
2017-02-24 15:03:37 +01:00
Holger Hans Peter Freyther c265bef48c sysmobts: Add slave on/off action for the sysmoBTS2050
Add new power actions for the sysmoBTS2050. This allows to
switch off the secondary/slave when the system temperature
is too high and back on when the normal level is reached.

Do not allow to switch off the master (so remove the enum
value), do not check if the slave is switching itself off.
2014-12-16 20:22:28 +01:00
Holger Hans Peter Freyther ffc193443c sysmobts: Add "normal" actions to execute
Instead of keeping state to remember what was done and needs
to be undone this patch introduces actions that will be executed
when the system is back to normal.

By design the system is considered to be in the normal state
and these actions will be only executed after the system is
coming back to the normal state.

One advantage of this scheme is that an operator can decide
that an overheated systems hould be off duty and requires manual
interaction to be allowed back in service.

The change has only been smoke tested

Fixes: SYS#833
2014-12-16 20:22:28 +01:00
Holger Hans Peter Freyther 42cc96e2c1 sysmobts: Add an option to stop the systemd sysmobts.service
For systems without direct access to the PA the best option
is to simply switch off the bts service. This will stop the
transmission which will take load from the DSP/FPGA/RF circuit
and indirectly from the PA as well.

We should introduce "pa-on and bts-on" that can be executed
as "normal" action.
2014-12-12 14:53:23 +01:00
Holger Hans Peter Freyther 8381a6a483 sysmobts: Actions can be executed in all levels
Somebody could decide to switch off the PA in the warning level
already. Support this mode of operation. This means we could have
a config that:

* Enables the PA in the normal level
* Disables it in the critical level

With kdbus or better IPC we could even have the PA and other
parts be represented as service that talk to a bts manager and
then simply execute start/stop requests. This would make the
entire TODO entry irrelevant as state would be managed by
systemd and one can see the time the service was executed.
2014-12-12 14:40:25 +01:00
Holger Hans Peter Freyther 15f899f89e sysmobts: Use the uc connection on both slave and master
We can use this on both slave and master. But only have the
master switch on the PA.
2014-08-22 00:06:01 +02:00
Holger Hans Peter Freyther 1f8053e366 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.
2014-08-21 23:55:27 +02:00
Holger Hans Peter Freyther e02d7796c3 sysmobts: Show the current temperature controls state int he VTY 2014-08-21 23:55:27 +02:00
Holger Hans Peter Freyther 714ccb9992 sysmobts: Provide information about the state transitions 2014-08-21 23:55:27 +02:00
Holger Hans Peter Freyther b0674e9636 sysmobts: Implement a small state machine for temp control
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-21 23:55:27 +02:00