aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_l1_if.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-06-22l1: Pass all L1 measurements upwardsJacob Erlbeck1-3/+5
Currently only the RSSI value is passed to the upper layers. Other values like TA and BER which are needed for TA update respectively CS selection are not propagated. This commit introduces and passes a struct that contains a set of measurement values. Sponsored-by: On-Waves ehf
2014-06-15Always exit and don't try to recoverDaniel Willmann1-2/+2
The current code tries to recover from dropped connections and resets the pcu state so it can keep running. However, this never worked correctly which is why the -e option is used. This option exits the pcu as soon as the internal state needs to be reset. This patch removes this option and makes this behaviour default. Ticket: SYS#390 Sponsored-by: On-Waves ehf
2013-10-30bts: Move gprs_rlcmac_rcv_rach into the BTS classHolger Hans Peter Freyther1-1/+1
2013-10-30bts: Move rcv_imm_ass_cnf into the bts codeHolger Hans Peter Freyther1-2/+1
2013-10-30pdch: Instead of passing bts, trx, ts use the pdchHolger Hans Peter Freyther1-3/+5
All dispatching will go through the PDCH. This will clean a lot of the look-ups inside the gprs_rlcmac_data.c and continue with adding structure to the pcu code.
2013-10-30pdch: Simplify the reset code, rename variables to XYZ_noHolger Hans Peter Freyther1-2/+2
Simplify the reset code now that the PDCH can know where it is located. Rename the variables in the sba to trx_no and ts_no as it stores the number and not the actual thing.
2013-10-30bts/tbf: Move the lists into the BTS and do the look-up from the BTSHolger Hans Peter Freyther1-2/+2
The list belongs to the BTS. This makes cleaning this up more easy and establishes a hierachy of resources that start from the BTS. The debug_diagram code is now broken.
2013-10-30sba: Create a SBAController that will manage the sbas for a BTSHolger Hans Peter Freyther1-2/+2
The PollController is a friend of the SBAController and is allowed to access the internal list. The list is hidden from everyone else. This is done because the calculation of timeout should belong into the PollController and not into the SBAController.
2013-10-30bts/pdch: Move the adding of paging to the BTS/PDCH objectsHolger Hans Peter Freyther1-1/+1
Only the gprs_rlcmac_pdch will manipulate the paging list now. There can be various more refactorings of the code but they can be done later. E.g. on memory allocation failure we can continue instead of leaving the code, we should also set any_tbf only after things have been paged.
2013-10-30pdch: Move enable/disable into the PDCH codeHolger Hans Peter Freyther1-33/+7
When a PDCH is disabled all resources should be freed. This is currently not possible as the PDCH does not know where it belongs to. On top of that the list (and other resources) should be properly initialized on construction so that disable() is idempotent and does not check if it was disabled. During the re-factoring I noticed that during a sysmobts re-start some resources are not freed. I left a warning in the code to resolve this issue later.
2013-10-30bts: Introduce a PollController that has the responsibility to pollHolger Hans Peter Freyther1-31/+0
For each frame indication received by the BTS the poll controller is asked to expire timedout entries.
2013-10-30bts: Move the frame_number into the BTS sructureHolger Hans Peter Freyther1-14/+2
The current_frame is an attribute of the BTS. Move it from the pcu_l1_if.cpp into the BTS. As the next step we can trigger actions depending on the change of the frame.
2013-10-30bts: Introduce a singleton for the BTS and use it in the codeHolger Hans Peter Freyther1-9/+12
Compared to the previous code there will be a branch to get the global pointer so the code will be slightly slower than the previous version but it allows us to start creating objects but still use the code from C. It is best approach I have found so far. One downside of C++ is that by default talloc will not be used (unless we override the new operator to use talloc. Right now we need to memset the C data structure by hand. The benefit of enforcing a better structure should is more important though.
2013-10-30bts: Move struct gprs_rlcmac_bts and other structs into a bts.hHolger Hans Peter Freyther1-0/+1
Begin to make the BTS a real C++ object with real responsibilities. The biggest issue will be the pcu_vty.c that might not like C++ at all.
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_rts_blockHolger Hans Peter Freyther1-1/+1
2013-10-30bts: Remove global state from gprs_rlcmac_add_pagingHolger Hans Peter Freyther1-1/+1
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_rachHolger Hans Peter Freyther1-1/+2
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_data_block_acknowledgedHolger Hans Peter Freyther1-1/+1
2013-10-30bts: Remove the global state gprs_rlcmac_trigger_downlink_assignmentHolger Hans Peter Freyther1-2/+2
Remove the global state from gprs_rlcmac_trigger_downlink_assignment and walk up to the pcu_l1_if.cpp where I find the timeout handling that should be part of the SBA and TBF functionality. In terms of hierachies things start to be more clear. There should be the BTS object. That holds the SBA and TBF Controllers that can allocate TBFs and SBAs and will handle the timeout polling for a BTS.
2013-10-28tbf: Add another variant of the free_all now by pdchHolger Hans Peter Freyther1-10/+2
2013-10-28tbf: Move the struct to the tbf.h header fileHolger Hans Peter Freyther1-0/+1
This is the begin of a long march of turning tbf into a C++ class and properly hiding the secrets inside this implementation instead of having it spread across various different files.
2013-10-02tbf: constify the IMSI argument for the downlink assignmentHolger Hans Peter Freyther1-1/+1
2013-09-04bssgp: Return the gprs_bssgp_pcu instance from create/connectHolger Hans Peter Freyther1-2/+3
This can be used to install handlers/testcases to register callbacks and other data.
2013-09-04rlcmac: Reduce the depedency on the global gprs_rlcmac_bts variableHolger Hans Peter Freyther1-1/+1
For mocking/unit-testing/emulation (and a dual trx-systems) having global state is quite bad. Cut back on the usage of the global struct gprs_rlcmac_bts. It also makes the complexity of certain routines more clear.
2013-08-02bssgp: The method creates and the connects.. reflect that in the nameHolger Hans Peter Freyther1-1/+1
Call things by what they do. This method is creating and then connecting a BSSGP..
2013-08-02pcu_l1_if.cpp: Remove unused method and commentHolger Hans Peter Freyther1-6/+0
pcu_l1_if.cpp:195:13: warning: 'void pcu_l1if_tx_bcch(uint8_t*, int)' defined but not used [-Wunused-function]
2013-07-27misc: Add an option exit/quit when the BSSGP is supposed to be destroyedHolger Hans Peter Freyther1-1/+1
The PCU does not properly re-set the state when the connection to the BTS is lost (and the SGSN potentially is re-started during that). This results in the BSSGP BVCI > 1 remaining blocked and no data will be accepted by the SGSN. Add the '-e' option and exit the PCU when the BSSGP/NS are getting destroyed.
2013-05-13Added timing advance support for up and downlink TBFsAndreas Eversberg1-4/+14
The timing advance of any TBF is stored when it ends. Whenever a new TBF with the same TLLI is created (downlink TBF), the stored TA is recalled. This algorithm assumes that the mobile does not move too fast during transfer. Also the mobile must start a connection in order to get correct initial timing advance. This algorithm does not implement the timing advance procedure as defined in TS 04.60. To implement the standard timing advance procedure, the BTS must decode RACH on certain bursts, the mobile is expected to send them. This requires much more complexity to a transceiver like USRP/UmTRX or Calypso BTS. The algorithm was tested at TA >= 8 and works quite well.
2013-03-17Fix: Correctly display SGSN remote IP at debuggingAndreas Eversberg1-1/+4
2013-03-17Add RSSI of data blocks to PCU interface0.2.00.2Andreas Eversberg1-3/+4
This bumps the PCU API version to 5 and requires osmo-bts >= 0.2.0.
2013-03-10PCU: respect the PCU-side "local port" as configured via L1 IFHarald Welte1-1/+2
This makes sure that the UDP local port of the Gb link is actually set to what is configured via OML from OpenBSC.
2013-01-25Fixed closing of PDCH when enabling sysmo-bts' direct DSP accessAndreas Eversberg1-2/+0
If not compiled with this support, the closing function does not exists, so it must not be called. Removed a "#warning", because closing is already supported.
2012-12-18Adding direct access to DSP of sysmoBTS for PDTCH trafficeAndreas Eversberg1-9/+79
In order to use this feature, sysmoBTS requires option "-M", otherwise the traffic is forwarded through socket interface. This is essential, if PCU runs on processor of sysmoBTS. The reaction time and delay of PDTCH frames could heavily degrade proper packet flow.
2012-12-18Added paging PS support by Ivan KluchnikovAndreas Eversberg1-1/+3
Original code: c7e7f6868b6f24346424dee904f4e76d3f216ff4 (The code was committed earlier, but got lost somehow.) I added IMSI, so the paging request is sent in correct paging group. Also I excluded rest octets from pseudo length. It is tested and it work.
2012-10-03Allow setting of seperate coding schemes for uplink and downlinkAndreas Eversberg1-2/+3
2012-09-27Use PCH confirm from BTS to start downlink packet flowAndreas Eversberg1-0/+23
Since we don't know when the IMM.ASS message is sent on it's paging group on PCH, we will wait for confirm from BTS and start packet flow then.
2012-09-23Fix: Correctly interpret MCC, MNC, CELL ID from BTSAndreas Eversberg1-3/+3
2012-08-07Adding single block allocationAndreas Eversberg1-3/+12
It is mandatory to support it because MS may request a single block. In this case the network must assign a single block. It is possible to force single block allocation for all uplink requests on RACH. (VTY option)
2012-07-20VTY: Added option to force given CS and ignore the scheme given by BTSAndreas Eversberg1-4/+6
2012-07-20Fixed Paging RR on PACCHAndreas Eversberg1-8/+12
Addition to 2b91464862270d72800b6dcc5a521f933fbbd489
2012-07-19Added paging for RR connection on PACCH of active TBFsAndreas Eversberg1-27/+46
Untested
2012-07-18Update to version 3 of PCU socket interface (includes version check)Andreas Eversberg1-0/+7
2012-07-13Changed data structures for TBF and PDCH instances, to allow multislotAndreas Eversberg1-20/+23
The new data structure is required to define slot/TFI assigment for MS with multislot capability. Now there are two lists for TBFs: uplink and downlink. It is possible to have different TBFs with same TFI in the same direction, as long as they are assigned on different timeslots. See tbf.txt for description. Note: This does not implement any multislot support. It defines the new data structure. Currently only the first slot is assigned.
2012-07-13Adding signal handler to allow clean exit of PCUAndreas Eversberg1-0/+2
The signal handler will end the main loop, so clean exit is performed. The allocated memory is dumped in order to detect memory leaks. All talloc functions use tall_pcu_ctx context instead of NULL, to track memory leaks.
2012-07-12Merge branch 'jolly_new'Ivan Kluchnikov1-226/+342
Merge is based on jolly_new branch with two modifications. 1. Modified PCU L1 interface. pcu_l1_if.cpp - common functions for tx and rx messages on L1 interface. sysmo_sock.cpp - SYSMO-PCU socket functions. openbts_sock.cpp - OpenBTS-PCU socket functions. pcuif_proto.h - L1 interface's primitives. 2. Modified encoding of RLC/MAC Control messages, now we use structures and encode_gsm_rlcmac_downlink() function for encode control blocks (without hand-coding).
2012-07-09Send downlink IMMEDIATE ASSIGNMENT on PCH and not on AGCHAndreas Eversberg1-1/+12
The IMSI is used to define paging group on which it is sent. This is tested with MS that requires correct paging group.
2012-07-06Fixed pseudo length of IMMEDIATE ASSIGNMENT message.Andreas Eversberg1-2/+3
The pseudo length may not include the rest-octets, so it stays compatible to non-GPRS phones. At pcu_l1_if.c (OpenBTS) no pseudo length is given, so the frame is only 22 bytes long. I could not test if it works.
2012-07-06Cleanup of BSSGP code.Andreas Eversberg1-5/+0
The hack for resetting BSSGP instance is removed and now performed whenever the NS state changes to UNBLOCKED. The BSSGP instance is now created only once, as it should be. Received STATUS messages are ignored as they should be. The creation and destruction of BSSGP/NS instances is now handled by layer 1 interface alone.
2012-07-06Move BSSGP/NS instances creation and desctruction to gprs_bssgp_pcu.cppAndreas Eversberg1-1/+37
2012-07-03TBF acknowledged mode finished for both link directionsAndreas Eversberg1-0/+4