Age | Commit message (Collapse) | Author | Files | Lines |
|
Spotted by Ciaby while debugging an audio issue. Do not
send anything to port==0 to the BSC/NITB. Look at the
upper bits of the speech_mode to determine if sending is
allowed. 0x1 means recv_only and all other modes allow us
to send.
Manually verified with a single phone call with LCR bridge
mode to send a CRCX early but a MDCX sendrecv later. The
audio starts to flow after the MDCX message. Virtual Addr
space didn't increase over 10 calls. The l1p_msg is freed
by the caller.
The code might not re-set speech_mode from one call to
another but if it is ever != 0 it can be expected that
the BSC will always set it. This is because we do not
(and don't want to) allocate the lchan dynamically on
every usage.
Fixes: SYS#2111
|
|
Use the new libosmo-abis API to query the session for the
statistics and then send it as a TLV element to the BSC.
This can be used to do post processing about the call. E.g
to figure out if no audio arrived at all.
|
|
I have traces that include the connection identifier in the
DLCX indication.
|
|
|
|
The RSL_IE_MEAS_RES_NR is mandatory element with a minimum
of 5 octets (two for TL and three for the value). When we
establish a new channel we might not have had enough time
in a TDMA frame to calculate the average. The issue is not
easy to reproduce. At the point we receive the measurement
report we have two uplink measurements queued. As it is not
easy to reproduce and only occurs when a channel is new
I have decided to drop the message instead of sending made
up uplink measurement reports.
As of now lchan_build_rsl_ul_meas will always return 3 and
the condition will never be false.
Avoids: SYS#1781
|
|
The write_queue is designed to have a maximum amount of pending
messages and will refuse to take new messages when it has been
reached. The caller can decide if it wants to flush the queue
and add the message again, create a log. But in all cases the
ownership of the msgb has not been transferred. Fix the potential
memory leak in the failure situation.
|
|
Instead of handling primitives directly at layer 1 specific code,
osmo-bts handles primitives at common code.
When all primitive are moved, the l1sap interface will:
- receive PH-DATA indications and forward them to layer 2.
- check for RF link loss and notify BSC.
- receive TCH indications and forward them via RTP.
- receive PH-RTS indications and send PH-DATA requests with content
according to its logical channel.
- receive TCH-RTS indications and send TCH requests with content
received via RTP or loopback from TCH indications.
- send MPH-INFO requests to activate, deactivate and modify logical
channels and handle their confirms.
- receive MPH-INFO indications with measurements from tranceiver.
- forward received and transmitted PH-DATA to GSMTAP.
|
|
In case of a headroom in a message, the 'head' pointer will not point to
the actual data.
|
|
Use the standard RSL commands to order a logical channel
to use a fixed power level.
The code is not fully verified and there was a last minute
change to invoke bts_model_adjst_ms_pwr.
|
|
Currently the DSP is instructed to achieve a given uplink
power target but there are circumstances (e.g. EMV testing)
where we need more control over it. The "manual/software/osmo"
power control can only be implemented per TRX and not per
lchan. Add a very very basic control that checks the MS Power
used by the phone, the actual receive level and then adjust
the power.
The code doesn't take the history into account, if the phone
can not reach the requested power level the code will be stuck
(e.g. no timeout based on multiframes). It has a mode for a
fixed power control but no way to set it yet.
The change of the mode requires a restart of the software.
|
|
Check the right variable for NULL.
Fixes: CID 1262214
|
|
In 5a03e129a633637d0a6b57b3b5aa6d6596b938fe we generalized the
structural parser so we need to update the expected behavior of
that routine.
|
|
* Print the GPS FD that was opened (e.g. to see if it was
closed again)
* Print the state changes/expectations
* Print the correct to be applied. I wondered if I shouldo do
a cor = cor * -1.. cor = -cor.. or add CLOCK_CORR(err) macro
to use it inside the printf and correction and decided the
gain is not worth the risk.
|
|
Continously run the calibration process. Everytime we call the
reset function classify the outcome. In case of a failure schedule
the next command soon and otherwise wait several hours.
Remember if the process was started through the VTY or the run
loop. In case it can't be started immediately reset and schedule
a new run.
|
|
After a reboot the system might have been off for a long time
and the currently used value might be wrong. Remember that we
never ran the calibration and execute it on start.
|
|
We should only calibrate the clock if there is a GPS fix. Start
gpsd to determine if there is a fix or not. Work around trimble
decoding issues (sent an email upstream). We need to gain some
more experience to see if there memory leaks. We also need to
re-schedule the calibration depending on the outcome.
|
|
Change the sign before passing it as correction value. The error
is the difference between the TCXO and GPS. We need to correct by
the reverse of the error. This seems to be different depending on
the clock source we have.
This is a last minute untested change.
|
|
This runs the entire procedure for calibration with reasonable
error and success checking. It can be triggered from the VTY
of the sysmobts-mgr right now.
What is missing is to hook up with GPSD to check if the system
has a fix and provide a mode that will continously run the
calibration command.
|
|
The CTRL code should have used/extended the l1_if calibration
code. The sysmobts-mgr code first needs to determine if the
clock adjustment is necessary at all. This is done by first
resetting the counters, then waiting, then asking for the diff
and then applying the correction value. But the reference clock
is only set by the application comand.
Copy more code of l1if_rf_clock_info_reset to set the reference
clock as value. This is leaving some todos inside the code that
will be resolved as part of SYS#835.
Related: SYS#835
|
|
In the long run we will connect to GPSD and wait for a fix and
then run the calibration. The first step is to open (and re-open)
the control connection to the BTS.
As the connection is on localhost there should not be a computation
overhead to always have the connection open. When connecting assume
that the ASYNC connect worked directly as otherwise we get no
notification of the failure.
This looks like a "bug" of libosmo-abis that should check if the
socket has been connected or not.
|
|
This was taken out of LaF0rge's OML router branch and is now
used by the extended calibration feature.
|
|
Use the rel_act_kind to not send RSL channel acks for the
CBCH to the BSC. This is similar to what we do for the BCCH
a couple of lines above.
|
|
|
|
|
|
.. and not our own local re-definition of the structure.
|
|
|
|
* CBCH load indications are not yet sent
* The queue length is not yet limited!
|
|
This should handle OML channel combinations with CBCH and activate the
CBCH SAPI towards the DSP correspondingly. What is still missing is
sending any actual information over the CBCH in respons to the
PH-RTS.ind coming up from L1.
|
|
Read the serial number once and format it as a string. In
case no serial number is present -1 will be returned.
Manually tested with a slightly modified version. serial_nr
was the expected one.
|
|
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.
|
|
|
|
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
|
|
We do not need to have these variables anymore. Just remove them.
|
|
Read the clock calibration from the place that will be read by
the BTS process. Use the standard eeprom code for doing that.
The code assumes that this and the other eeprom code don't
write/invlidate the others reason. If that assumption would not
be true calls to eeprom_free_resources should be added.
|
|
The command can only read integer parameters. Don't offer
buffers as this will lead to error 22.
|
|
91d204e2db8f53a6ae4827ecc4b0ccb0137375d0 while adding checks
to resolve coverity issues. We simply had no one writing to
the eeprom so this was unnoticed for a long time.
|
|
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.
|
|
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.
|
|
With "show bts 0" all objects were still listed as dependency.
Once the BTS has been started.. move all the other objects into
the enabled state. Our OpenBSC OML code doesn't care but people
using the VTY to inspect state will be more happy.
One day... we will create proper statemachines inside the BTS
and the BSC instead of changing the state in the BTS impl.
Fixes: ONW#1330
|
|
We would never transition the sitemanager to anything. Our SW
does not support SW activation's so we are always ready.
Related: ONW#1330
|
|
OsmoBSC> show bts 0
...
GPRS NSVC1: Oper 'Disabled', Admin 'unknown 0x0', Avail 'Off line'
|
|
|
|
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
|
|
bts_ctrl_lookup.c: In function 'bts_controlif_setup':
bts_ctrl_lookup.c:97:2: warning: implicit declaration of function 'bts_ctrl_cmds_install' [-Wimplicit-function-declaration]
rc = bts_ctrl_cmds_install(bts);
^
|
|
libosmo-abis doesn't make it easy to have these parameters
as const.. just declare it non-const in the api. We pass
a static string but we know it will not be modified.
|
|
tch.c: In function 'l1_to_rtppayload_amr':
tch.c:247:29: warning: unused variable 'amr_mrc' [-Wunused-variable]
struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr;
^
tch.c: In function 'rtppayload_to_l1_amr':
tch.c:335:10: warning: unused variable 'amr_if2_core_len' [-Wunused-variable]
uint8_t amr_if2_core_len = payload_len - 2;
|
|
|
|
SI 5*/6 require L2 header of 0x03,0x03. All SI might be less than 23
octets, so they need to be filled with 0x2b.
|
|
We use the completion call-back from L1 to compare the instructed
TRX board output power with the actual value as reported back from
L1.
Right now we only print an error message in case the values disagree.
In the future we might want to either use that value as part of our
calculation or send an OML alarm report to the BSC.
|
|
This reverts commit d0866fe4773918381c80c7362ef2d043845ebf54, as it
was a bit premature. We need to address this more properly.
|