aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/oml.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-19sach_deact -> sacch_deact (follow spelling fix in openbsc)Harald Welte1-3/+3
2012-04-19Fix TCH/H channel activation after zecke's recent lchan fixesHarald Welte1-0/+1
2012-04-19add VTY command to manually alter transmit powerHarald Welte1-1/+16
this allows for quick manual tx power changes from the VTY, particularly useful in type approval or other measurements.
2012-04-19add a VTY command for activating PDCH channels (in EGPRS mode)Harald Welte1-1/+16
This allows us to do RF measurements (EDGE EVM and the like) even without having any PCU/RLC/MAC code as of now. To use it, configure PDCH type timeslots (e.g. TS 7) in the BSC and then use "trx 0 7 activate 0" to manually activate the PDTCH lchan on top of that timeslot. The BTS will now happily transmit EDGE/8PSK data.
2012-04-19ciphering: Make sure to initialize lchan to no ciphering when activatingHarald Welte1-6/+11
The ciphering parameters in L1 are persistent accross MPH deactivate/activate, so we need to make sure to always initialize them cleanly at RSL CHAN ACT time. This has the added benefit that we can also activate channels that have encryption enabled from the very beginning (required for encrypted handover).
2012-04-19Improve logging of L1 MPH request by printing the directionHarald Welte1-6/+15
where previously we would only see <0006> oml.c:931 (bts=0,trx=0,ts=1,ss=0) MPH-DEACTIVATE.req (FACCH/F) we now get <0006> oml.c:931 (bts=0,trx=0,ts=1,ss=0) MPH-DEACTIVATE.req (FACCH/F RxUL) to notice it is modifying the receive path in the uplink direction.
2012-04-19lchan: Send the ACT ACK/NACK after the Layer1 has handled act/deactHolger Hans Peter Freyther1-7/+15
Send the RSL ACT ACK/NACK after the Layer1 firmware has acked the activation/deactivation. In case the channel can not be activated we will send a NACK. In case the channel can not be deactivated we will send an ACK and the next time the channel is activated we will send a NACK. The release ack will be sent once the TxDownlink of the TCH/SDCCH is closed. Change the rsl_tx_chan_nack method to create a new msgb to be used by the hardware layer, change the return value to ask the caller to delete the msgb.
2012-04-19lchan: Separate the Uplink/Downlink in activate/deactivateHolger Hans Peter Freyther1-8/+16
2012-04-19lchan: Deactivate the SACCH only once, use the sach_deact flag for thatHolger Hans Peter Freyther1-2/+14
Use the deact_sach (renamed to deact_sacch in master) to remember if the SACCH has been disabled. This should fix the case of lchan errors due releasing the lchan twice.
2012-04-19lchan: Fix the state transition in the deactivate handlerHolger Hans Peter Freyther1-3/+3
If the deactivation is failing the channel needs to be moved into and error state, if the deactivation completed the channel needs to be set to the none state and set the state to release reqeust on the deactivation.
2012-04-19lchan: Similar to OpenBSC use a set method to change the stateHolger Hans Peter Freyther1-6/+6
By making all modifications through lchan_set_state we can easily add code to verify the state transition.
2012-04-19ciphering: Better state tracking and HACK around L1 race conditionHarald Welte1-1/+18
We now check if the received message is an LAPDm I frame in order to determine if we have received the first valid encrypted message on the radio link. This relates to the fact that we often see 'old' UI frames coming up from L1, even after it has confirmed decryption has been enabled.
2012-04-19Support for cipheringHarald Welte1-0/+41
When the RR CIPH MODE CMD is transmitted to the MS, we need to tell the L1 to enable decryption on RX. After the first received frame has been decrypted successfully, we will enable encryption also on transmit. This has been tested with A5/1 so far, but A5/2 and A5/3 should work exactly identical.
2012-04-19make HR channels work for voice, not only signallingHarald Welte1-1/+4
without this, we would set a FR_V1 codec on a TCH/H channel, which the L1 is obviously not happy with.
2012-04-18TCH: Add support for the L1 RTP modeHarald Welte1-1/+21
In L1 RTP mode, the L1 already does all the bit-shifting and re-ordering required for the RTP formats (which have different bit/nibble order than the ETSI/3GPP encodings, for some odd reason). We don't enable it by default yet, as only HR/FR/EFR work with it, but AMR has some yet to be debugged problem. Enabling USE_L1_RTP_MODE would save some CPU cycles on the ARM side.
2012-03-18correctly print SAPI in log file on MPH-ACTIVATE.reqHarald Welte1-1/+1
2012-03-18Fix debug print of MPH-CONFIG.reqHarald Welte1-1/+1
2012-03-18print human-readable SAPI name on MPH-[DE]ACT.{req,conf}Harald Welte1-4/+7
2012-03-18Ensure that ADM_STATE IE is presnent when sending NM_MT_CHG_ADM_STATE_ACKHarald Welte1-1/+1
2012-03-17Issue MPH-CLOSE.req during shutdownHarald Welte1-0/+18
If we don't do this on recent L1, the L1 will refuse the open after re-starting osmo-bts. There still is an issue in case osmo-bts crashes. We should have a respawn loop that re-loads the DSP firmware before re-starting osmo-bts, just to make sure...
2012-01-14oml: Mention the SAPI that is activated in the log messageHolger Hans Peter Freyther1-2/+2
I was wondering why the channel was activated twice but it needs to be activated for each SAPI.
2011-11-07sysmo-bts: Include bts.h for bts_shutdown, remove unused variableHolger Hans Peter Freyther1-2/+1
2011-09-19fix various compiler warnings across the codeHarald Welte1-3/+46
this deals with unused cocde, unused variables and undeclared symbols in various places.
2011-09-09sysmobts: fix initial codec mode computationHarald Welte1-5/+1
There is no off-by-one between osmocom and L1 definitions...
2011-09-09sysmobts: channel activation changes for v2.4 L1 DSP firmwareHarald Welte1-13/+32
We now have to explicitly indicate the tchPlType at channel activation type, so L1 knows which channel decoder to use (FR, EFR, AMR, ...) Also, we properly implement the initial codec mode selection as per TS 05.09
2011-09-09update osmo-bts to conform to L1 v2.4 API changesHarald Welte1-0/+7
2011-09-03Fix MODE MODIFY for multirate configuration on TCH/HHarald Welte1-1/+16
using this configuration we can have successful AMR/HR (5.9) calls
2011-09-03Add new ORTP based libosmo-trau based voice supportHarald Welte1-6/+183
Using osmo-bts-sysmo and this code, it is now possible to do FR and AMR based voice calls on TCH/F. A lot of CPU is wasted in the conversion between the RTP formats and the L1 specific formats for the codec frames. All data needs to be shifted by four bits, and the order of bits needs to be reversed in every byte.
2011-07-05sysmbts L1 if: implement 'dead DSP L1 detection'Harald Welte1-0/+24
when we activate the SCH in the DSP, we start a 5-second timer. If we ever do not receive any MPH-TIME.ind primitives from L1 within that time frame, we stop the process (and will be re-spawned)
2011-07-05L1/OML: De-activate L1 SAPIs in opposite order of activationHarald Welte1-2/+2
L1 wants TCH to be activated before FACCH, and it wants FACCH to be de-activated before TCH. By iterating the array in iverse order, we ensure this.
2011-07-02untested code to dynamically set L1 band based on ARFCN numberHarald Welte1-1/+26
2011-07-01logging sanitization (use proper log levels, etc.)Harald Welte1-6/+9
2011-07-01fix BTS initialization orderHarald Welte1-3/+12
The sequence is as follows: 0) start osmo-bts 1) start connection attempts to BTS 2) issue L1-RESET.req 3) receive L1-RESET.conf 4) issue RF-ACTIVATE.req 5) receive RF-ACTIVATE.conf 6) receive attributes for TRX 7) receive opstart for TRX 8) issue MPH-INIT.req [...] The important point here is: We don't want the BSC to set TRX attributes or do TRX opstart before our RF related hardware is initialized.
2011-07-01sysmo-bts: Ignore OPSTART on the TRX until we have seen SET ATTRHarald Welte1-2/+28
2011-07-01sysmo-bts: properly initialize the nominal power, print it at startupHarald Welte1-1/+3
2011-06-29Fix support of SDCCH4Harald Welte1-1/+4
In SDCCH4, we use lchan number 0...3 for the SDCCH/SACCH, and we statically use lchan[4] as the dummy for activating the CCCH L1 SAPIs. In order to make combined and non-combined CCCH orthogonal, we simply also use lchan[4] in that case. On a 'pure' CCCH, therefore lchan 0..3 are unused and 4 is the actual CCCH.
2011-06-29sysmo-bts: Fix TCH/F activationHarald Welte1-2/+9
2011-06-28implement RSL DEACTIVATE SACCHHarald Welte1-0/+19
2011-06-27re-work original osmo-bts with support for sysmocom femtobtsHarald Welte1-0/+545
This code re-works osmo-bts to add support for the upcoming sysmocom BTS. It also tries to add some level of abstraction between the generic part of a BTS (A-bis, RSL, OML, data structures, paging scheduling, BCCH/AGCH scheduling, etc.) and the actual hardware-specific bits. The hardware-specific bits are currently only implemented for the sysmocom femtobts, but should be (re-)added for osmocom-bb, as well as a virtual BTS for simulation purpose later. The sysmocom bts specific parts require hardware-specific header files which are (at least currently) not publicly distributed.