Commit Graph

42 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 013df51ca8 sysmobts: Add VTY support to the sysmobts-mgr
Add VTY support to the manager. This way we can interactively
inspect the state of the system and trigger events.
2014-08-21 15:49:06 +02:00
Holger Hans Peter Freyther 0e2b624418 sysmobts: Revert all sysmobts-mgr related changes
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 44980347f3.

Revert "utils: Used the enum manuf_type_id in the parameter of add_manufacturer_id_label"
This reverts commit 7d36e5ed46.

Revert "utils: Classify the OML message using the return type"
This reverts commit afee0b7929.

Revert "sysmobts: Do not access out of bound string"
This reverts commit f5f41e8051.

Revert "sysmobts: Separate IPA and OML check into two methods"
This reverts commit 13a224063d.

Revert "screenrc: osmobts-mgr now needs a config file"
This reverts commit 0a1699ff8a.

Revert "make sure osmobts-mgr.cfg file is included in tarballs"
This reverts commit 14c60b425f.

Revert "sysmobts-mgr: Add VTY support for configuring it"
This reverts commit c5fedd24c9.

Revert "sysmobts: Add beginnings of an OML router and create Failure Messages in the sysmobts-manager"
This reverts commit c6ab90b270.
2014-05-25 13:48:33 +02:00
Harald Welte 0a1699ff8a screenrc: osmobts-mgr now needs a config file 2014-05-19 13:01:20 +02:00
Holger Hans Peter Freyther 83dc54fb95 systemd: Provide the pcu direct mode 2014-03-21 19:28:13 +01:00
Holger Hans Peter Freyther ae2473c2ca systemd: Do not restart with a broken config file or such
Only restart in case of a crash or the exit(42) when the OML/RSL
link is going down.
2014-03-21 18:10:12 +01:00
Holger Hans Peter Freyther 1375a4b153 systemd: Disable colors in the stdout log
For journald we should not output escape sequences as it is
confusing the output.
2014-02-04 13:31:04 +01:00
Holger Hans Peter Freyther 15bc64c6cd sysmobts: Honor the LDFLAGS when building the sysmobts-calib utility
Address warning during system builds.

Addresses:
  WARNING: QA Issue: No GNU_HASH in the elf binary...
2014-01-21 18:07:28 +01:00
Holger Hans Peter Freyther 06c098e2cb sysmobts: Launch the sysmobts-mgr in the screen and add service file
Launch the sysmobts-mgr as well. It will monitor the temperature
but it will not update the eeprom or act on any of the data. On
top of that it will respond to ipaccess-find messages making it
more easy to find the device.
2014-01-21 17:08:35 +01:00
Holger Hans Peter Freyther cdc6e3028c contrib: Remove the stray "FIVE" print it doesn't make any sense 2013-12-20 11:28:13 +01:00
Holger Hans Peter Freyther f9dd260ee5 pcu: Exit the PCU in case of loss of the sysmobts connection
The PCU is not capable of cleaning up properly. For now simply
exit the PCU in case the sysmobts has exited. This requires
osmo-pcu a30f47613abb7c22a26d534d66e478265a8c2c09 or later.
2013-10-31 15:27:19 +01:00
Holger Hans Peter Freyther ac98b545a8 sysmobts-calib: For gps the sign/difference appears to be different
For the sysmoBTS 2050 this appears to have a different sign. We can't
test this with NWL right now so we will need to see if this is a case
of ping/pong.
2013-07-26 21:24:37 +02:00
Holger Hans Peter Freyther 0089ce4178 sysmobts.service: Use multi-user.target as target to fix ordering 2013-06-26 18:03:41 +02:00
Holger Hans Peter Freyther 43b4176f0e sysmobts.service: Reset the firmware after the service exited
These should have been ExecStopPost from the beginning. Currently
they reset the firmware while the software is starting. Reload
the DSP and FPGA firmware.
2013-06-24 08:17:12 +02:00
Holger Hans Peter Freyther c03fe5af31 sysmobts: Allow to enable realtime priority for the BTS process
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.
2013-05-11 08:34:36 +02:00
Holger Hans Peter Freyther 17dd79a3ae sysmobts.service: Install the sysmobts.service at the default target 2013-04-07 11:53:16 +02:00
Holger Hans Peter Freyther 4ad8d4d3c0 sysmobts: Name the screen and use '-X quit' to shut it down
Use "kill -2 0" for the PCU as SIGTERM is not handled yet. With
the current set of code the stop function will stop both the PCU
and the BTS.
2013-03-16 23:29:59 +01:00
Holger Hans Peter Freyther e45fc86359 respawn: Adjust the oom score for the supervisor and bts/pcu, increase sleep
Make the script mostly unkillable due to OOM and make sure that the
process has a score of zero. Wait 10 seconds before re-launching.

The combination of ( && exec ) & appears to save one sub-process. The
script has been tested with bash and busybox's ash.
2013-03-16 14:15:50 +01:00
Holger Hans Peter Freyther 1897f03d4c calib: Attempt to follow the PCH as well and print the SAPI..
AGCH is reported as part of the PCH because we are not searching
for the BS-AG-BLKS-RES inside the SI3 and do not use MphConfigReq
to change this setting.
2013-02-13 17:17:59 +01:00
Holger Hans Peter Freyther 6ac2e68467 calib: Print the frame number decoded as t1/t2/t3 2013-02-13 10:34:40 +01:00
Holger Hans Peter Freyther 225cf82290 calib: Provide the fn and block number for each frame 2013-02-13 10:34:40 +01:00
Holger Hans Peter Freyther 0903001d9b calibration: The clock error is absolute for anything but the netlisten
We only need to run this once and we know the clock error. In case it
is 0/0 we know that we didn't receive one of the two clocks. This could
be because the GPS doesn't have a fix. I accidently pushed this code into
the master branch and it is too late to rebase.
2013-01-15 22:47:38 +01:00
Holger Hans Peter Freyther fad5b08625 WIP... use gps for calibration.. 2013-01-12 21:44:48 +01:00
Harald Welte 24b2128e29 add PCU respawning to contrib screenrc and respawn scripts 2013-01-11 17:36:56 +01:00
Holger Hans Peter Freyther dd4b8a2507 systemd: Use realtime scheduling for the BTS to read msg queues
We need to read the Layer1 message queues fast enough, switch on
realtime processing for that. Move the firmware init after the
process execution to have some time for the firmware to reload
before the application sysmobts is restarted.
2012-11-02 11:16:21 +01:00
Holger Hans Peter Freyther 4d197c96d8 systemd: Add a service for the sysmobts
Migrate the LED and firmware reloading into a systemd service. This
makes the respawn and screen obsolete as it will be done with systemd
and the journal script.
2012-09-20 15:24:50 +02:00
Holger Hans Peter Freyther d127ddbfcc sysmobts: Fix the init script for systemd.
The rcS file is not part of the lsb. There is little need to
include this file.
2012-09-13 19:46:18 +02:00
Holger Hans Peter Freyther d777a19bb8 contrib: Add a python script to start sysmobts-remote and dump docs
This starts sysmobts-remote and dumps the documentation about the
VTY to the doc/ directory.

$ ./contrib/dump_docs.py
this writes doc/vty_reference.xml
2012-07-25 14:14:05 +02:00
Harald Welte 678321d013 determine (and use) the API version as indicated in the header files
From our header files v2.4 onwards, we include some macros that allow us
to do compile-time checks for the API header version.  As older headers
don't have those macros, we have to fall back to assume it will be v2.2
2012-07-22 22:42:36 +02:00
Holger Hans Peter Freyther 27baa4c3de sysmobts-calib: Add support for pre-production revb hardware
The board version wasn't exposed in the revb DSP interface.
2012-07-20 15:30:06 +02:00
Holger Hans Peter Freyther 65d4d5108a calib: Create a new header file and move it. 2012-07-12 09:08:13 +02:00
Holger Hans Peter Freyther 0cfefa0e12 calib: Add code to change the BSIC/TSC before following the BCCH. 2012-07-12 09:08:13 +02:00
Holger Hans Peter Freyther 4253150bab calib: Use base 16 encoding for the dsp trace flags 2012-07-11 23:14:35 +02:00
Holger Hans Peter Freyther eda6c26360 calib: Add a mode to follow the BCCH of a given cell. 2012-07-05 00:17:02 +02:00
Holger Hans Peter Freyther 9fdefc6ffe respawn: The BTS should not be nice, make sure the BTS is the most favorable 2012-06-15 14:53:15 +02:00
Holger Hans Peter Freyther a540332df3 sysmobts-calib: Add a utility to calibrate the sysmobts v2 hardware
It has been tested with the OCXO and the network listen mode of the
firmware. For other sources we are not required to synchronize to
the network and the tool needs to be adjusted.
2012-06-12 18:17:11 +02:00
Harald Welte 799ea59c2f sysmobts: set the RF ACTIVE LED when we bring RF up
Once we get RF-ACTIVATE.conf from L1, we now enable the corresponding
LED.  We also switch it off on RF-DEACTIVATE.conf.  We do _not_ switch
it off when osmo-bts crashes or terminates before RF-DEACTIVATE.conf.

The latter is intentional, as RF may very well still be active at that
point.  The re-spawning script will re-set the DSP and therby turn off
the RF and then disable the LED.

A better solution might be to do all this in the kernel driver for the
DSP.
2012-06-01 00:06:58 +02:00
Holger Hans Peter Freyther b18f00f162 contrib: Re-load the firmware before restarting the main application
More recent firmware appears to have issues even after a clean shutdown,
make sure to fully reset the DSP before starting the BTS software.
2012-05-14 22:29:45 +02:00
Harald Welte a16bcc2cc6 update screenrc; we no longer have the '-B' command line option 2011-09-04 23:23:49 +02:00
Harald Welte db4455acfa add init script and screenrc for l1fwd 2011-07-02 15:57:37 +02:00
Harald Welte a5ea80e9b6 start screen in detached/background mode 2011-07-01 23:09:45 +02:00
Harald Welte cc6bf663e7 add init script for screen-based respawn 2011-07-01 19:54:16 +02:00
Harald Welte b10e9781d6 add respawn script and screenrc for respawning the process in screen 2011-07-01 19:51:32 +02:00