aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_main.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-04-09pcu: Call bssgp_set_log_ss(DBSSGP) in main()Jacob Erlbeck1-0/+1
Currently the BSSGP functions in libosmocore do not log correctly to DBSSGP since the DBSSGP variable in common_vty.c is left uninitialized. This commit adds the call to bssgp_set_log_ss() to inform libosmocore which sub system id it shall use for BSSGP. Sponsored-by: On-Waves ehf
2014-06-15Always exit and don't try to recoverDaniel Willmann1-2/+1
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-11-26debug_diagram: Remove the special debug_diagram compilation modeHolger Hans Peter Freyther1-7/+0
This approach is somehow flawed. We need/want to debug problems on systems with real traffic and re-compiling it with debug_diagram is not an option. All internal logging needs to be expressive enough so we can understand what is going on (e.g. create a script to post-process the output).
2013-11-11misc: Fix a potential leak on config parsingHolger Hans Peter Freyther1-1/+2
Fixes: Coverity CID 1040949
2013-10-30ta: Create TimingAdvance class and make it belong to the BTSHolger Hans Peter Freyther1-1/+1
This allows us to easily flush the state in case a PCU/BTS connection is lost.
2013-10-30bts: Introduce a singleton for the BTS and use it in the codeHolger Hans Peter Freyther1-7/+1
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-07-27misc: Add an option exit/quit when the BSSGP is supposed to be destroyedHolger Hans Peter Freyther1-1/+6
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-0/+2
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-05-09Allow to enable realtime priority for the BTS processAndreas Eversberg1-1/+22
I ported the Holger's scheduling patch from sysmobts to osmo-pcu. This is usefull, if PCU uses direct access to the DSP of sysmobts. The latency to respond to a PH-READY_TO_SEND.ind may not be higher than 18ms. Currently we are using nice to increase our priority but for a heavily loaded cell this is not enough. Add an option to enable realtime scheduling and use it in the screenrc. Linux offers two realtime scheduling classes these are SCHED_FIFO and SCHED_RR. For SCHED_FIFO the process is running as long as possible (potentially taking all the CPU and never yielding it), for SCHED_RR the process can still be pre-empted at the end of the timeslice. Using SCHED_RR appears to be the more safe option as a run-a-way sysmobts process will not be able to take all the CPU time.
2013-03-19Make the code handle SIGTERM.Holger Hans Peter Freyther1-0/+1
This way the pcu can be easily stopped with a sysvinit script.
2013-03-16Use default 'alpha' value of 0Andreas Eversberg1-1/+1
Since we don't know the RX and TX parameters of the BTS that might be used with PCU, the MS should not adapt the TX power from the RX level. So the MS should always transmits with same power. Finding an 'alpha' and 'gamma' value that will result in a constant RX level at the BTS is a task of deployment.
2013-01-17pcu_main: Add '-V' to obtain the (compile) version of osmo-pcu0.1.00.1Harald Welte1-1/+6
2013-01-16Use global PCU's talloc context for all talloc callsAndreas Eversberg1-0/+2
This allows to track memory leaks of all memory that is allocated by talloc. Especially bitvector allocations is tracked now.
2012-12-18Adding flow chart diagram of ongoing TBFs and their eventsAndreas Eversberg1-0/+7
It is quite essential. It shows how TBFs are related and helps to estimate states and timers (timeouts) of the MS. In order to use it, it must be defined by a switch at gprs_rlcmac.h.
2012-10-03Allow setting of seperate coding schemes for uplink and downlinkAndreas Eversberg1-2/+1
2012-09-27Set Alpha and Gamma at assingment messages for power controlAndreas Eversberg1-0/+1
The initial power control value Alpha must be set in SI13.
2012-09-23Statefull reset and unblock BVCs and sending flow control messagesAndreas Eversberg1-0/+1
The flow control interval can be set via VTY.
2012-07-15Adding multislot allocation algorithmAndreas Eversberg1-1/+1
2012-07-13multislot: Extracted "slot allocation algorithm" from tbf allocatorAndreas Eversberg1-0/+3
The current available algorithm only supports selecting a single slot for downlink/uplink. (In the future, a multislot algorithm will follow.)
2012-07-13Adding signal handler to allow clean exit of PCUAndreas Eversberg1-2/+51
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-13logging: Add vty to allow definition/storage of debug levelsAndreas Eversberg1-2/+44
Note: This requires new libosomocore that allows to compile VTY headers with C++.
2012-07-12Merge branch 'jolly_new'Ivan Kluchnikov1-51/+80
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-06Minor fix of MCC, MNC optionsAndreas Eversberg1-2/+2
2012-07-06Cleanup of BSSGP code.Andreas Eversberg1-58/+8
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-06Adding MCC/MNC spoof options to pcu_main.cppAndreas Eversberg1-2/+60
The option added is required to change PLMN that is announced to SGSN. This allows BTS to have a different PLMN. (Usefull for roaming in conjunction with simlock.)
2012-07-06RLC/MAC process makes use from attributes, received from PCU socketAndreas Eversberg1-1/+12
For OpenBTS interface and BSSGP, fixed values are still used.
2012-07-06Receive cell informations via PCU socket interfaceAndreas Eversberg1-1/+1
These informations provide RAI, timers, counters and other attributes to the BSSGP and RLC/MAC processes. The attributes are stored in gprs_rlcmac_bts global structure.
2012-07-06remove dependencies to openbsc/osmoggsn internalsHarald Welte1-2/+2
...and link against libosmogb (part of libosmocore.git)
2012-07-03TBF acknowledged mode finished for both link directionsAndreas Eversberg1-0/+1
2012-06-27Work on RLCMAC layer. Integration of scheduler and new packet transferAndreas Eversberg1-0/+10
2012-06-26Merge branch 'jolly'Ivan Kluchnikov1-94/+0
Merged jolly branch with master, fixed conflicts.
2012-06-23Split of L1 interface to be used with OpenBTS or sysmo-BTSAndreas Eversberg1-94/+0
The OpenBTS socket functions are moved from main to pcu_l1_if.cpp. New sysmo_l1_if.cpp is introduced. It used special unix socket interface to connect to sysmo-BTS. This is required to access CCCH/RACH and info about cell layout. Traffic is also forwarded via this interface, but it direct access of L1 baseband DSP will be added soon. In order to handle ready-to-send requests above l1_if, the transmit queue (for downlink blocks) is moved to gprs_rlcmac.cpp. The TBF instance additionally holds TRX and TS info, but this is only a hack currently. TBF instance requires more details about allocated ressources in the future.
2012-06-18remove dependencies to openbsc/osmoggsn internalsHarald Welte1-2/+2
...and link against libosmogb (part of libosmocore.git)
2012-06-14move everything to src/ subdirectoryHarald Welte1-0/+191
The code corresponds to commit a9aa4777cc1144897a77dfb6c5c3d7325705251e in openbts-p2.8.git (Tue Jun 12 18:14:49 2012 +0400)