aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-08-21sysmobts: Initialize fd with an invalid fdHolger Hans Peter Freyther1-1/+2
Initialize the ucinfo with an invalid fd to prevent writing on fd=0 by accident.
2014-08-21Merge commit 'sysmocom/features/sysmobts-mgr-vty'Holger Hans Peter Freyther11-345/+562
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.
2014-08-21sysmobts: Use another logp region as it is mostly related to rempHolger Hans Peter Freyther1-3/+3
2014-08-21sysmobts: There is only one uc make it a singletonHolger Hans Peter Freyther3-74/+76
Move the init and polling into the sysmoBTS related part. In the future we should have _one_ temperature control.
2014-08-21sysmobts: Clean-up the parsing routinesHolger Hans Peter Freyther2-40/+38
2014-08-21sysmobts: Move the sysmoBTS 2050 controller handlingHolger Hans Peter Freyther4-260/+286
Move the code to a separate file to keep things nicely apart of each other.
2014-08-21sysmobts: Add VTY support to the sysmobts-mgrHolger Hans Peter Freyther8-6/+197
Add VTY support to the manager. This way we can interactively inspect the state of the system and trigger events.
2014-08-20adopt to recent libosmocore ipa renameHarald Welte1-0/+1
2014-08-18TLVP_PRES_LEN is now in libosmocore, avoid redefining itHarald Welte1-0/+2
2014-08-18replace oml_{osmo,ipa}_magic[] with abis_nm_{osmo,ipa}_magicHarald Welte3-19/+13
the latter is now in libosmogsm.
2014-08-18Migrate to osmo_get_macaddr() in recent libosmocoreHarald Welte1-27/+2
get_mac_addr() is generally useful and shouldn't be hidden in the osmo-bts/abis.c file
2014-08-09sysmobts: Add a unit test that checks of the behaviorHolger Hans Peter Freyther4-3/+100
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.
2014-08-09sysmobts: Deal with ciphering when we have a transport clashHolger Hans Peter Freyther1-12/+31
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.
2014-07-31Merge branch 'sysmocom/features/oml-router'Holger Hans Peter Freyther13-10/+477
2014-07-31sysmobts: Make sure that the omlrouter is in a FHS pathHolger Hans Peter Freyther3-6/+7
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.
2014-07-31sysmobts: Add testcase for ETSI/12.21 messageHolger Hans Peter Freyther2-0/+18
2014-07-31sysmobts: Extend the testcase for a Osmo message as wellHolger Hans Peter Freyther1-16/+36
2014-07-31sysmobts: Verify the structure of IPA and OML messagesHolger Hans Peter Freyther10-10/+302
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.
2014-07-31sysmobts: Remove debug left over from enabling the RTP modeHolger Hans Peter Freyther1-1/+0
2014-07-31sysmobts: Begin with an OML router that will be used by the managerHolger Hans Peter Freyther4-2/+138
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.
2014-07-31tests: Move the "pcu_direct" symbol into the stubs to be sharedHolger Hans Peter Freyther4-3/+1
2014-07-31oml: Make it possible to include the file directlyHolger Hans Peter Freyther1-0/+4
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);
2014-07-31sysmobts: Enable the direct RTP mode for firmware >= 3.11Holger Hans Peter Freyther2-2/+18
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.
2014-07-30sysmobts: Make it possible to slowly ramp up the output powerHolger Hans Peter Freyther7-12/+155
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.
2014-07-25sysmobts: Provide VTY routines to do clock calibrationsHolger Hans Peter Freyther3-2/+150
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.
2014-07-25sysmobts: Free the message on older firmware releasesHolger Hans Peter Freyther1-0/+1
Seen while implementing a new functionality in the code.
2014-07-25sysmobts: Include the model and master/slave in the unitidHolger Hans Peter Freyther1-0/+31
Make it more easy to find the right BTS model and know what is the master/slave.
2014-07-25amr: Avoid toggling the CMR from none and a set oneHolger Hans Peter Freyther3-9/+14
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.
2014-06-22sysmobts: Fix typo in the commentHolger Hans Peter Freyther1-1/+1
2014-05-30sysmobts: Fix the initialization of the BTS manager codeHolger Hans Peter Freyther1-8/+8
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.
2014-05-25sysmobts: Revert all sysmobts-mgr related changesHolger Hans Peter Freyther12-936/+6
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.
2014-05-22common: Ignore "si.valid" outside of _MAX_SYSINFO_TYPEHolger Hans Peter Freyther8-2/+77
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
2014-05-22common: Remove unused gsm_time parameter from lchan_sacch_getHolger Hans Peter Freyther3-3/+3
2014-05-22sysmobts: Avoid memleak when multiple -c arguments are passedHolger Hans Peter Freyther1-1/+1
Rely on optarg pointing to an address that will be valid for the run of the entire application. Fixes: CID 1206578
2014-05-20sysmobts: Have a common prefix for the enumHolger Hans Peter Freyther3-5/+5
Make the manuf_type_id enum have a common prefix for the symbols.
2014-05-20utils: Used the enum manuf_type_id in the parameter of add_manufacturer_id_labelÁlvaro Neira Ayuso2-3/+3
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-20utils: Classify the OML message using the return typeÁlvaro Neira Ayuso2-5/+13
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>
2014-05-20sysmobts: Do not access out of bound stringÁlvaro Neira Ayuso1-3/+3
One can either use "strlen(str) + 1" but not add one to the result of the sizeof.
2014-05-20sysmobts: Separate IPA and OML check into two methodsÁlvaro Neira Ayuso3-24/+38
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>
2014-05-19screenrc: osmobts-mgr now needs a config fileHarald Welte1-1/+1
2014-05-19make sure osmobts-mgr.cfg file is included in tarballsHarald Welte1-1/+2
2014-05-19Revert "sysmobts: Add support for changing the transmit power in sbts2050"Harald Welte5-231/+11
This reverts commit c64d42573894d8295b58b268a64541c914b69bcd. There are unfrtunately still too many problems with this patch to be merged at this point.
2014-05-18sysmoBTS TCH: Set CMR in AMR RTP framesHarald Welte1-12/+7
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.
2014-05-18sysmobts: Add support for changing the transmit power in sbts2050Álvaro Neira Ayuso5-11/+231
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>
2014-05-18sysmobts-mgr: Add VTY support for configuring itÁlvaro Neira Ayuso5-3/+372
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>
2014-05-18sysmobts: Add beginnings of an OML router and create Failure Messages in the ↵Álvaro Neira Ayuso8-3/+541
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>
2014-05-17sysmobts: Support DSP API >= 3.8.1 (u8MaxCellSize)Harald Welte1-0/+4
2014-05-15abis: Separate initialization from connect for AbisHolger Hans Peter Freyther3-12/+14
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
2014-05-15sysmobts: Fix compiler warning about missing declarationÁlvaro Neira Ayuso1-0/+1
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>
2014-04-29osmo-bts-sysmo/utils.c: Added a function for calculate the power transmitterÁlvaro Neira Ayuso3-2/+14
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>