Age | Commit message (Collapse) | Author | Files | Lines |
|
Initialize the ucinfo with an invalid fd to prevent writing
on fd=0 by accident.
|
|
Some re-factorings. Still a very long way to go. It should
work with haralds re-based but that wasn't verified due my
toolchain not having the most recent libosmocore. The service
file and screenrc change has not been verified either.
|
|
|
|
Move the init and polling into the sysmoBTS related part. In the
future we should have _one_ temperature control.
|
|
|
|
Move the code to a separate file to keep things nicely apart
of each other.
|
|
Add VTY support to the manager. This way we can interactively
inspect the state of the system and trigger events.
|
|
|
|
|
|
the latter is now in libosmogsm.
|
|
get_mac_addr() is generally useful and shouldn't be hidden in
the osmo-bts/abis.c file
|
|
We need to build a lot more code to be able to test these two
new routines. I didn't want to move the code to a utils file
as the check is called from a hot path. Add accessors to the
inlined variant to be used by the unit test.
While writing the unit tests I noticed that a re-transmission
of the ciphering command would lead to an attempt to enable
ciphering again. I am not sure that this MphConfig is idempotent.
|
|
The network is configured with early classmark sending. This means
that the phone might send a "classmark change" message at the same
time we send a ciphering mode command. When we received the CM
message we assumed we have just received the first ciphered message
and enabled ciphering for tx as well.
When we snoop the Ciphering Mode Command extract the N(S) variable
and when we receive an I frame from the MS see if it handled our
message by comparing the MS N(R) to BTS N(S) + 1.
|
|
|
|
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.
|
|
|
|
|
|
Extend the router to verify that the message received is
properly encoded. The code can deal with the basic structure
of ETSI OML and vendor specific messages for ip.access and
the osmocom project.
|
|
|
|
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.
|
|
|
|
Fixes:
../../include/osmo-bts/oml.h:8:42: warning: ‘struct gsm_bts’ declared inside parameter list [enabled by default]
int down_oml(struct gsm_bts *bts, struct msgb *msg);
^
../../include/osmo-bts/oml.h:8:42: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
../../include/osmo-bts/oml.h:12:52: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_mo_send_msg(struct gsm_abis_mo *mo, struct msgb *msg, uint8_t msg_type);
^
../../include/osmo-bts/oml.h:13:31: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_mo_opstart_ack(struct gsm_abis_mo *mo);
^
../../include/osmo-bts/oml.h:14:32: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_mo_opstart_nack(struct gsm_abis_mo *mo, uint8_t nack_cause);
^
../../include/osmo-bts/oml.h:15:32: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_mo_statechg_ack(struct gsm_abis_mo *mo);
^
../../include/osmo-bts/oml.h:16:33: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_mo_statechg_nack(struct gsm_abis_mo *mo, uint8_t nack_cause);
^
../../include/osmo-bts/oml.h:19:29: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_mo_state_chg(struct gsm_abis_mo *mo, int op_state, int avail_state);
^
../../include/osmo-bts/oml.h:22:31: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
void oml_mo_state_init(struct gsm_abis_mo *mo, int op_state, int avail_state);
^
../../include/osmo-bts/oml.h:26:10: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int success);
^
../../include/osmo-bts/oml.h:29:33: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_tx_state_changed(struct gsm_abis_mo *mo);
^
../../include/osmo-bts/oml.h:31:33: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
int oml_mo_tx_sw_act_rep(struct gsm_abis_mo *mo);
^
../../include/osmo-bts/oml.h:36:4: warning: ‘struct gsm_abis_mo’ declared inside parameter list [enabled by default]
uint8_t cause);
|
|
We need to patch the CMR due wanting to support systems that still
have Audiocodes hardware in their chain. I have manually tested
and could listen to my own voice on:
TCH/H & AMR 5.9 & PTSN & BSC
TCH/F & FR1 & Other subscriber & NITB
TCH/F & EFR & Other subscriber & NITB
TCH/H & HR1 & Other subscriber & NITB
TCH/H & AMR 5.9 & Other subscriber & NITB
The tests were done using the Nokia E71, a Blackberry curve and
for the PTSN a HTC 8S were used.
|
|
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.
|
|
The sysmoBTS2050 does not have a OCXO and we should not rely
on the GPS module to always have a fix. Instead use the TCXO
by default and from time to time (and we know we have a fix
calibrate the TCXO). This can be done by:
trx 0 rf-clock-info reset
wait...
trx 0 rf-clock-info correct
write
The output is currently only written to the log as the VTY
connection might go away during the operation. The reset will
set the approriate reference clock and the correct will attempt
to determine and apply the correction. The write terminal will
make sure that next on start a known good value will be used.
|
|
Seen while implementing a new functionality in the code.
|
|
Make it more easy to find the right BTS model and know what is
the master/slave.
|
|
For LCR and other systems without out-of-band information we need
to indicate the CMR. Not every air message will include the mode
and we sent a stream that had the CMR set and not-set. This lead
to the AudioCodes MGW only playing every second frame.
Remember the last used mode and initialize it to _NONE when we
receive the multirate config. In case of a real error we will
still use AMR_CMR_NONE.
The initial patch is from Harald. I have added the initialization
and moving of the defines to amr.h.
Manually verified by enabling AMR5.9 and looking at two RTP
packages in sequence. In both cases the CMR was 2. I have looked
at "amr.nb.cmr != 2" in wireshark and only found the MGCP dummy
packet.
|
|
|
|
The code should only run for the sysmoBTS 2050 and TRX 0.
If the device is not marked as 2050 the code would attempt
to open /dev/ttyS0 and block forever.
|
|
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.
|
|
Limit the range from 0 to (_MAX_SYSINFO_TYPE - 1) instead of
0 to 31. This way we will never access the lchan->si.buf[] out
of bounds. This is only a theoretical issue though as the code
filling the lchan->si.buf for the SACCH will not have valid
>= _MAX_SYSINFO_TYPE. Add a small regression test to check we
still schedule all SIs.
Fixes: CID 1040765
|
|
|
|
Rely on optarg pointing to an address that will be valid for
the run of the entire application.
Fixes: CID 1206578
|
|
Make the manuf_type_id enum have a common prefix for the
symbols.
|
|
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
|
|
Classify the OML message and return the manufacturer type
or an error. Currently ETSI, ip.access and Osmocom are known.
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
|
|
One can either use "strlen(str) + 1" but not add one to the
result of the sizeof.
|
|
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>
|
|
|
|
|
|
This reverts commit c64d42573894d8295b58b268a64541c914b69bcd.
There are unfrtunately still too many problems with this patch to be
merged at this point.
|
|
Enable the previously commented-out logic to set the CMR (Codec Mode
Request) in AMR RTP frames based on the CMI (CMR Index) of the AMR
speech frame on the Um interface.
This is of course anyway the right thing to do, but also required for an
AMR receiver which doesn't have out-of-band information on the codec
mode, and which also doesn't determine the AMR codec mode based on the
size of the AMR frame (such as lcr as of current master).
We also move the entire CMR generation into the #ifdef section
which is only compiled-in if we do _not_ use the RTP mode of L1.
|
|
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>
|
|
This patch allows to configure the warning temperature threshold,
the severe temperature threshold of the board and the PA and the
actions like the relative value power that we want to reduce the
transmit power to and the part that we want to switch off or not.
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
|
|
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>
|
|
|
|
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
|
|
Include utils.h to have a declaration of sysmobts_get_nominal_power,
l1_if.c: In function 'l1if_activate_rf':
l1_if.c:1144:6: warning: implicit declaration of function
'sysmobts_get_nominal_power' [-Wimplicit-function-declaration]
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
|
|
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
|