Commit Graph

1766 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther d6ef5345e5 ta: Move timing advance related code into the ta.cpp file 2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther 63f29d6f73 encoding: Move the functions into the encoding class
Add some TODO to this class. E.g. they could all work on the
bitvec and the parameter handling could better.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther 6ca0a9076e encoding: Move encoding routines into a separate file 2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther 9446485e3d pdch: Only say we have paged when this has actually been done 2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther f0984897a5 bts/pdch: Move the adding of paging to the BTS/PDCH objects
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-30 21:24:10 +01:00
Holger Hans Peter Freyther 24e98d039d pdch: Move paging dequeue into the PDCH object
Rely on packet_paging_request returning NULL in case the queue
is empty. We should move the write_packet_paging_request into
a separate file/object as well.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther 17b0d83a1f pdch: Move enable/disable into the PDCH code
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-30 21:24:09 +01:00
Holger Hans Peter Freyther b78adcdd11 bts: Introduce a PollController that has the responsibility to poll
For each frame indication received by the BTS the poll controller
is asked to expire timedout entries.
2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther 9b30c7f46e bts: Move the frame_number into the BTS sructure
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-30 21:20:45 +01:00
Holger Hans Peter Freyther b6acfdaa24 bts: Introduce a singleton for the BTS and use it in the code
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-30 21:20:45 +01:00
Holger Hans Peter Freyther 67ed34eedb bts: Move struct gprs_rlcmac_bts and other structs into a bts.h
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-30 21:20:45 +01:00
Holger Hans Peter Freyther 1b33361bab bts: Remove the global state from the tbf 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther b19d7268c3 bts: Remove global state from gprs_rlcmac_rcv_rts_block 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther 1af73f6c81 bts: Remove global state from gprs_rlcmac_add_paging 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther ee7a535608 bts: Remove global state from write_immediate_assignment 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther 485860cc31 bts: Remove global state from write_packet_uplink_assignment 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther d507ce6b85 bts: Remove global state from gprs_rlcmac_send_packet_uplink_assignment
This was the last method of gprs_rlcmac_data.cpp to access the
gprs_rlcmac_bts variable.
2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther 8d7a632eef bts: Remove global state frm gprs_rlcmac_rcv_control_block 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther 4ffc260869 bts: Remove global state from gprs_rlcmac_send_data_block_acknowledged 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther 9f521cd4af bts: Remove global state from gprs_rlcmac_send_packet_downlink_assignment 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther b0250ebeac bts: Remove global state from gprs_rlcmac_rcv_rach 2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther 698b612188 bts: Remove global state from gprs_rlcmac_rcv_data_block_acknowledged 2013-10-30 21:20:44 +01:00
Holger Hans Peter Freyther ae947fcf67 bts: Remove the global state from write_packet_uplink_ack
Similiar to the previous patches
2013-10-30 21:20:44 +01:00
Holger Hans Peter Freyther 344ff48756 bts: Remove the global state gprs_rlcmac_trigger_downlink_assignment
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-30 21:20:44 +01:00
Holger Hans Peter Freyther 173a240a7e bts: Remove global state and the usage of the gprs_rlcmac_bts
Global state makes mocking/writing tests more difficult. Continue
by removing direct usage of the bts and adding it as pointer to
the function calls (showing the true dependencies of the functions)
2013-10-30 21:20:44 +01:00
Holger Hans Peter Freyther 45396a99d9 sched: Make sched_poll static and add a warning about fairness 2013-10-30 21:20:44 +01:00
Holger Hans Peter Freyther 948a3d62b1 alloc: Move usf into the scope it is actually used 2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther b0a0075845 alloc: Factor out the routine to find an enabled PDCH 2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 11a748935e alloc: Remove the unimplemented/unfinished time constraint code
The algorithm is already complex enough. No reason to further
introduce the complexity with the branches it has.
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 8481a0553d alloc: Remove code duplication for downlink assignment
There was no difference but there is no point in poking in the
internals of the tbf, pdch and trx from various places. Information
hiding has a real purpose, e.g. compare with reading "the mythical
man month".
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 743bafa50c alloc: Introduce a backpointer from the tbf to the trx and simplify code
Kill all the level of indirections where one needs to have the BTS
the TBF to find the TRX.
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 96efa70a9e alloc: Call it trx_no and not trx as it is not trx object 2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 02ab4a8803 alloc: Move the two timeslot alloc algorithms to a dedicated file 2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 96173aec93 alloc: Move the "assignment" of the slot into a common function
Vladimir Rolbin pointed out that in case of the alloc_algorithm_a
the usf has not been assigned. For now move all the assignment into
a method and call it from the A and B algorithm.
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther 1c344e2668 tbf: Prepare to make thing things private in the tbf, start with the state
There really shouldn't be too many callers of state. Instead the
tbf should dispatch depending on the internal state. For now
introduce state_is and state_is_not accessor functions so we can
start to see who is using the internal state.
2013-10-28 12:54:09 +04:00
Holger Hans Peter Freyther 7380babdba tbf: Move the tbf_timer_cb into the tbf class
Introduce the first instance method for printing out diagonistic
about itself and create a jump function for it.
2013-10-28 12:53:49 +04:00
Holger Hans Peter Freyther 0946f99b08 tbf: Remove dead code that called tbf_free 2013-10-28 12:53:29 +04:00
Holger Hans Peter Freyther 455613076a tbf: Move many routines related to the tbf from gprs_rlcmac to tbf.c 2013-10-28 12:52:59 +04:00
Holger Hans Peter Freyther 4f6a4e5d6d tbf: Add another variant of the free_all now by pdch 2013-10-28 12:52:33 +04:00
Holger Hans Peter Freyther 964ddb6aa0 tbf: Move the code to close all timeslots into the tbf class
Move the code out of the sysmocom_socket (as this is only required
to talk to our hardware) and into the TBF class that actually knows
what a TBF is.
2013-10-28 12:52:15 +04:00
Holger Hans Peter Freyther 9e21d84f1e tbf: Move header definition from gprs_rlcmac to the tbf 2013-10-28 12:52:00 +04:00
Holger Hans Peter Freyther 099535a1a7 tbf: Move the struct to the tbf.h header file
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-28 12:51:38 +04:00
Holger Hans Peter Freyther 8692128365 tbf: Move the alloc_ul_tbf into tbf.c and change signature
Add the bts parameter to the method list. This would be a static
method of the class (in case the TBF would be a class)
2013-10-18 15:17:43 +04:00
Holger Hans Peter Freyther bb20b2c64c tbf: Add more to do items for refactoring on the dl assignment 2013-10-18 15:17:27 +04:00
Holger Hans Peter Freyther bcafdf8d90 tbf: Warn about copy and paste between different tbf alloc routines
These need to be re-factored to use a common allocation routine.
2013-10-18 15:17:13 +04:00
Holger Hans Peter Freyther 443c822f77 tbf: Move the creation of a new tbf for the downlink to a new method
Move the code that is dedicated to handle the assignment of a new
TFI/TBF for the downlink into a new method.
2013-10-18 15:16:56 +04:00
Holger Hans Peter Freyther d868928888 tbf: Create an assign method for IMSI.
This will allow us to set flags (like IMSI) present and will
be of help when fixing the tbf lookup.
2013-10-18 15:16:42 +04:00
Holger Hans Peter Freyther d1d114f5b7 tbf: Move code that sets the tbf's ms_class to a central place 2013-10-18 15:16:27 +04:00
Holger Hans Peter Freyther 31d0df92ac tbf: Separate the easy path out of the receive path
* Create a look up routine for the TBF that will allow us to
  easily find a TBF by IMSI...
* Separate the code that works on an existing TBF.
2013-10-18 15:16:11 +04:00
Holger Hans Peter Freyther 17c31ce173 tbf: Begin to add some structure to the tbf code
The TBF should use the IMSI to identify a block flow but all
handling is spread across the entire code. Start to clean this
up by moving relevant code into the tbf file. Afterwards one
can clean up and add more internal structure.
2013-10-18 15:15:49 +04:00
Holger Hans Peter Freyther dcc9c39529 sba: Fix memory leak when all PDCHs are disabled 2013-10-17 11:36:11 +02:00
Holger Hans Peter Freyther 70862c9409 misc: Print the payload that is not known
Print the payload type that is not handled as this allows one to
look it up in the specification.
2013-10-16 16:37:22 +02:00
Holger Hans Peter Freyther 26da8361e9 rlc: Add missing break after GPRS_RLCMAC_CONTROL_BLOCK_OPT
Do not claim that the payload is not known. Add the missing break.

Do not print:
<0002> gprs_rlcmac.cpp:1174 GPRS_RLCMAC_CONTROL_BLOCK_OPT block payload is not supported.
<0002> gprs_rlcmac.cpp:1176 Unknown RLCMAC block payload.
2013-10-16 16:36:11 +02:00
Holger Hans Peter Freyther 483f77a275 misc: Fix some typos sed -i s,ressources,resources,g 2013-10-16 16:33:00 +02:00
Holger Hans Peter Freyther 985806030d misc: Fix format and typos in the code 2013-10-16 16:28:16 +02:00
Holger Hans Peter Freyther 52c911b3b4 tbf: constify the IMSI argument for the downlink assignment 2013-10-02 18:09:10 +04:00
Holger Hans Peter Freyther 2023bd18b6 tbf: Make multislot lookup tables static/const 2013-10-02 18:08:51 +04:00
Holger Hans Peter Freyther d6bd91e4e5 tfi: The tfi_alloc doesn't allocate anything, rename the function
Call things by what they do and this function doesn't allocate
anything but it is searching for the first unallocated tbf index.
2013-10-02 18:08:31 +04:00
Holger Hans Peter Freyther 416ce69550 bssgp: Add callback UNITDATA.DL messaes with the data 2013-09-04 21:28:53 +04:00
Holger Hans Peter Freyther c0f1644c88 bssgp: Add callbacks for certain BSSGP events
Add a callback called when Unblock Ack is received. This can be
used by a supervisor or the emulation test.
2013-09-04 21:28:53 +04:00
Holger Hans Peter Freyther e8d9a5fa54 bssgp: Return the gprs_bssgp_pcu instance from create/connect
This can be used to install handlers/testcases to register
callbacks and other data.
2013-09-04 21:28:53 +04:00
Holger Hans Peter Freyther b67a8a348a rlcmac: Reduce the depedency on the global gprs_rlcmac_bts variable
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-09-04 21:28:53 +04:00
Holger Hans Peter Freyther 90d5df4ae7 bssgp: These routines are not public API.. make them static for now 2013-09-04 21:28:53 +04:00
Holger Hans Peter Freyther a9744debd9 bssgp: Re-indent the switch/case statement 2013-09-04 21:28:53 +04:00
Holger Hans Peter Freyther e13298d093 tests: Move the RLCMACTest into the test directory and setup autotest 2013-08-02 13:40:20 +04:00
Holger Hans Peter Freyther 421fe79e39 bssgp: The method creates and the connects.. reflect that in the name
Call things by what they do. This method is creating and then connecting
a BSSGP..
2013-08-02 13:39:30 +04:00
Holger Hans Peter Freyther 939bfaefec bitvector: Address compiler warnings about unsigned/signed
Fixes:
bitvector.cpp: In function 'int bitvec_pack(bitvec*, uint8_t*)':
bitvector.cpp:53:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
bitvector.cpp: In function 'int bitvec_unpack(bitvec*, uint8_t*)':
bitvector.cpp:63:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
bitvector.cpp: In function 'uint64_t bitvec_read_field(bitvec*, unsigned int&, unsigned int)':
bitvector.cpp:91:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
bitvector.cpp: In function 'int bitvec_write_field(bitvec*, unsigned int&, uint64_t, unsigned int)':
bitvector.cpp:108:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2013-08-02 13:39:13 +04:00
Holger Hans Peter Freyther f14ddb7830 pcu_l1_if.cpp: Remove unused method and comment
pcu_l1_if.cpp:195:13: warning: 'void pcu_l1if_tx_bcch(uint8_t*, int)' defined but not used [-Wunused-function]
2013-08-02 13:38:48 +04:00
Holger Hans Peter Freyther 997d2ac3fe femtobts: Remove code that is causing warnings with GCC 4.8
femtobts.c:250:2: warning: excess elements in array initializer [enabled by default]
  { SuperFemto_ClkSrcId_NetList, "nwl" },
  ^
femtobts.c:250:2: warning: (near initialization for ‘femtobts_clksrc_names’) [enabled by default]
femtobts.c:251:2: warning: excess elements in array initializer [enabled by default]
  { 0, NULL }
  ^
femtobts.c:251:2: warning: (near initialization for ‘femtobts_clksrc_names’) [enabled by default]
2013-08-02 13:36:52 +04:00
Holger Hans Peter Freyther cf0265a112 csn1: Fix various printf/format issues pointed out by gcc
This might clash with C++11 and literal values but we will
see that once the compilers enable that by default.

Fixes:
csn1.cpp: In function 'gint16 csnStreamDecoder(csnStream_t*, const CSN_DESCR*, bitvec*, unsigned int&, void*)':
csn1.cpp:864:17: warning: format '%d' expects argument of type 'int', but argument 8 has type 'guint64 {aka long unsigned int}' [-Wformat]
csn1.cpp:1144:15: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'uint64_t {aka long long unsigned int}' [-Wformat]
csn1.cpp:1150:15: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'uint64_t {aka long long unsigned int}' [-Wformat]
csn1.cpp: In function 'gint16 csnStreamEncoder(csnStream_t*, const CSN_DESCR*, bitvec*, unsigned int&, void*)':
csn1.cpp:2119:17: warning: format '%d' expects argument of type 'int', but argument 8 has type 'guint64 {aka long unsigned int}' [-Wformat]
2013-08-02 13:36:20 +04:00
Holger Hans Peter Freyther 148fb9a3bc csn1: Remove unused code from the file
Fixes:
csn1.cpp:124:20: warning: 'CSN_DESCR_type' defined but not used [-Wunused-variable]
2013-08-02 13:31:20 +04:00
Holger Hans Peter Freyther 98fe945a0d misc: Move the parsing of the ms_class from RA Capabilities to a method
Decrease the number of lines of a single method by splitting things up.
The fewer lines of code, branches and side-effects in a method, the easier
it will be to understand. The other benefit is that one can start creating
unit tests for the some parts of the code.
2013-07-30 12:23:25 +04:00
Holger Hans Peter Freyther 249c7e9431 bssgp: Remove commented out code that is currently not used. 2013-07-30 12:22:51 +04:00
Holger Hans Peter Freyther 40bd0c4b57 bssgp: Reset the BVC and NSVC state in the destroy routine
This might explain the issue of the BVCI > 1 not being unblocked
as the internal state has not been re-set when destroying the bssgp.
2013-07-30 12:22:12 +04:00
Holger Hans Peter Freyther 4b984b14a3 misc: Move the nsvc_unblocked into the struct osmo_pcu 2013-07-30 12:21:16 +04:00
Holger Hans Peter Freyther ed70cb733c misc: Move the bvc_timer into the struct osmo_pcu
This continues with the previous changes to reduce the global state.
2013-07-30 12:20:41 +04:00
Holger Hans Peter Freyther d8157c07df misc: Remove the unused sgsn pointer from the compilation unit 2013-07-30 12:20:15 +04:00
Holger Hans Peter Freyther 90692f93cf misc: Move the struct bssgp_bvc_ctx into the struct osmo_pcu 2013-07-30 12:19:40 +04:00
Holger Hans Peter Freyther 90f08efe58 misc: Introduce a struct osmo_pcu and move things into it.
One of the issues with not properly re-setting everything is that
due the global state it is not clear which variables belong together
and how long it exists. Begin with creating a osmo_pcu and moving
things into this class.

Think of an organic cell, this commit is introducing the cell wall
around it... and defines what is inside and what is outside of it.
2013-07-30 12:18:45 +04:00
Holger Hans Peter Freyther a30f47613a misc: Add an option exit/quit when the BSSGP is supposed to be destroyed
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-07-27 22:15:04 +02:00
Holger Hans Peter Freyther 51c57045e5 misc: Remove if (timer_pending) stop_timer idiom from the code
osmo_timer_del is an idempotent operation. There is no requirement
to check if it is running. If you don't want a timer to run, delete
it. Maybe one should have called the method _unschedule, _cancel to
make this more clear.
2013-07-27 22:14:45 +02:00
Andreas Eversberg a004e6a823 Added timing advance support for up and downlink TBFs
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-13 16:45:21 +02:00
Andreas Eversberg 783aa4bcb8 Allow to enable realtime priority for the BTS process
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-05-09 08:58:09 +02:00
Holger Hans Peter Freyther 72075f0e00 Make the code handle SIGTERM.
This way the pcu can be easily stopped with a sysvinit script.
2013-03-19 18:33:06 +04:00
Andreas Eversberg 81a12be317 Fix: Correctly display SGSN remote IP at debugging 2013-03-17 17:16:44 +01:00
Andreas Eversberg 050ace2fb4 Introduce new file for various measurements
The measurements include:
- DL bandwidth usage
- DL packet loss rate
- DL measurements by mobile
- UL measurements by BTS

In order to receive DL measurements from mobile, it must be enabled via
system information message at BSC.
2013-03-17 17:16:44 +01:00
Andreas Eversberg 570b44b29b Add RSSI of data blocks to PCU interface
This bumps the PCU API version to 5 and requires osmo-bts >= 0.2.0.
2013-03-17 17:16:18 +01:00
Andreas Eversberg 0b874b64ef Use default 'alpha' value of 0
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-03-16 15:56:01 +01:00
Harald Welte 30a73d8544 PCU: respect the PCU-side "local port" as configured via L1 IF
This makes sure that the UDP local port of the Gb link is actually
set to what is configured via OML from OpenBSC.
2013-03-10 08:57:03 +00:00
Ivan Kluchnikov 4440845614 Fixed decoding and encoding of CSN_RECURSIVE_TARRAY, CSN_RECURSIVE_TARRAY_1, CSN_RECURSIVE_TARRAY_2.
We should offset pointer to data after each iteration.
2013-03-01 02:46:10 +04:00
Ivan Kluchnikov 5dc29a51ef Fixed memory leaks caused by not freeing msgb in udp_read_cb() function. 2013-02-04 12:57:00 +04:00
Andreas Eversberg 3afe56d7d8 Fixed closing of PDCH when enabling sysmo-bts' direct DSP access
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.
2013-01-25 07:22:59 +01:00
Harald Welte e5a093986b pcu_main: Add '-V' to obtain the (compile) version of osmo-pcu 2013-01-17 12:28:16 +01:00
Harald Welte d1e340f0be VTY: complete the copyright message 2013-01-17 12:27:59 +01:00
Andreas Eversberg 71cce91a76 Use PCU's talloc context to allocate libosmogb instances
This is usefull to identifiy memory leaks while using libosmogb.
2013-01-16 13:50:42 +01:00
Andreas Eversberg 0f4541b691 Free each fl1h (sysmo-bts' layer 1 handler) when closing BTS<->PCU socket 2013-01-16 09:19:34 +01:00
Andreas Eversberg 273a222d7f Fixed memory leaks caused by not freeing bitvector
Especially each data message from SGSN caused two memory leaks, which
resulted in increasing memory usage while receiving date from SGSN.
2013-01-16 09:19:22 +01:00
Andreas Eversberg 7a5a67ab7b Use global PCU's talloc context for all talloc calls
This allows to track memory leaks of all memory that is allocated by
talloc. Especially bitvector allocations is tracked now.
2013-01-16 09:19:11 +01:00
Andreas Eversberg 97644ed7f8 Various fixes for multi slot allocation algotihm 2013-01-15 13:20:22 +01:00
Andreas Eversberg 02d7cd2ac2 Get rid of allocating first timeslot at tfi_alloc
This simpliefies the allocation process.

tfi_alloc is responsible to allocate a TFI, not a time slot.

The first time slot available depends on multislot class and on other
ongoing TBF (concurrent TBFs), so it is part of the allocation
algorithm to select it.
2013-01-15 08:59:34 +01:00
Andreas Eversberg 138f4e62d2 Adding missing initialization of logging to RLCMACTest.cpp 2013-01-14 12:31:11 +01:00
Harald Welte de5253a20f make sure to register NS protocol to the VTY
Without calling gprs_ns_vty_init(), the NS specific VTY commands are not
activated.
2013-01-11 09:45:17 +01:00
Andreas Eversberg a23c7eee15 Adding direct access to DSP of sysmoBTS for PDTCH traffice
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-18 10:47:28 +01:00
Andreas Eversberg 106ea79337 Fix: Align TLLI to 32 bit margin, before converting it 2012-12-18 10:04:24 +01:00
Andreas Eversberg d87b4685b8 Fix of debug names and initial log levels 2012-12-18 10:04:10 +01:00
Andreas Eversberg 5b8a528251 Doc: Update on README and tbf.txt 2012-12-18 10:04:03 +01:00
Andreas Eversberg f01929bcb6 Rework on multislot allocation algorithm
The slots are choosen in a way that later selection of slots for
concurrent TBFs will have the same downlink/uplink control channel
(PACCH).
This is required for polling acknowledge of new TBF assignment on PACCH.
The MS will always have the same PACCH uplink slot while beeing in packet
transfer mode.
2012-12-18 10:03:50 +01:00
Andreas Eversberg 8c3680dcc9 Added paging PS support by Ivan Kluchnikov
Original code: c7e7f6868b
(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-12-18 10:03:34 +01:00
Andreas Eversberg 00950743d7 Use seperate function to parse IMSI from BSSGP message 2012-12-18 10:03:24 +01:00
Andreas Eversberg afdd9e1be5 Fix: Don't use TIMING_ADVANCE_INDEX in assignment messages, if not used
Some MS will leave packet transfer mode, if TAI is given, but no timing
advance control messages are sent on PTCCH. This could results in
permanent loss of larger packets.
2012-12-18 10:03:14 +01:00
Andreas Eversberg 3a7eb6b80f Fix: Drop ongoing UL TBF, if another UL TBF is established for same TLLI
This happens, if the mobile looses coverage and establishes a subsequent
uplink TBF.
2012-12-18 10:03:05 +01:00
Andreas Eversberg 0c9b50c498 Fix: Handling of final acknowledge on downlink TBFs
It is essential to initialize the first_fin_ack variable.

Also it is essential not to free TBF, in case the final ack is not
received, but all frames have been acked. In this special case, we resend
the final block again and again (and poll), until we receive the final
ack.
2012-12-18 10:02:58 +01:00
Andreas Eversberg aafcd703f3 Fix: Be sure to check if the PACKET DOWNLINK ACK belongs to the polled MS 2012-12-18 10:02:44 +01:00
Andreas Eversberg b83e2a7d5c Adding flow chart diagram of ongoing TBFs and their events
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-12-18 10:02:20 +01:00
Andreas Eversberg 5cae087ae9 Fix: Free CS paging messages 2012-12-18 10:02:01 +01:00
Andreas Eversberg f7adfdebe9 Fix: Removed potential double free bug when receiving NS messages 2012-12-18 10:01:27 +01:00
Ivan Kluchnikov 701d9f83f8 Ported fixes and improvements from Wireshark for RLC/MAC control block decoding. Part 1.
Generic improvements to the csn.1 dissector include:
• Added a flag to the type descriptor structure so that any type can (potentially) flagged as xxx_OR_NULL.  This was specifically needed for UINT_OR_NULL for the ms capabilities struct.
• Changed the CSN_SERIALIZE so that the length of the length field can be specified.
• For CSN_NEXT_EXIST removed the requirement that the next type be CSN_END, to allow truncation of multiple IEs.
• For CSN_LEFT_ALIGNED_VAR_BITMAP corrected the handling of bit_offset.
• Added a new type CSN_PADDING_BITS to make inspection of padding bits more convenient.
• Improved the CSN_RECURSIVE_TARRAY_1 to show the array index.

Improvements to the gsm_rlcmac dissector include:
• Rework the definition of EGPRS Ack/Nack Description so that the length IE (and absence thereof) is handled correctly.
• Added Padding Bits definitions to all PDUs
• Change the Multislot_capability_t and Content_t definitions to allow truncation at any IE
2012-10-10 19:43:37 +04:00
Ivan Kluchnikov 9eb552b239 Merge branch 'jolly'
Conflicts:
	src/gprs_bssgp_pcu.cpp
	src/gprs_rlcmac.cpp
	src/gprs_rlcmac_data.cpp
	src/gprs_rlcmac_sched.cpp
2012-10-05 18:17:57 +04:00
Andreas Eversberg 499ff415a9 Allow setting of seperate coding schemes for uplink and downlink 2012-10-03 14:21:36 +02:00
Andreas Eversberg 3b1332cdb4 Replace switch/case construct by a structure, to define coding schemes
A new attribute at TBF instance indicates the current scheme used.
2012-10-03 14:20:53 +02:00
Andreas Eversberg 5f14bd9410 Fix: Poll correctly for downlink acknowlege, to prevent window stalling 2012-10-03 14:20:26 +02:00
Andreas Eversberg a3c12fb6c5 Fix: Cleanly open and close NS instance 2012-09-28 22:46:33 +02:00
Andreas Eversberg a9be1547b1 Use PCH confirm from BTS to start downlink packet flow
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-27 09:23:24 +02:00
Andreas Eversberg 99a107dbee Free existing UL/DL TBF, if RACH has been received from MS
In this case the mobile has lost existing flows, so it make sense to free
them. The TFI(s) can be re-used immidiately, because they are not
associated by MS anymore.
2012-09-27 09:21:52 +02:00
Andreas Eversberg 80be275710 Fix: Dump correct NSVCI value at debug line 2012-09-27 09:21:17 +02:00
Andreas Eversberg aafcbbb252 Set Alpha and Gamma at assingment messages for power control
The initial power control value Alpha must be set in SI13.
2012-09-27 09:20:45 +02:00
Andreas Eversberg df4d20e95b Fix: T3193 is now started with the correct value 2012-09-24 13:49:38 +02:00
Andreas Eversberg 9a91346fa1 Fix: Send correct QOS profile and DL-UNITDATA IE to SGSN
Be sure to use always two bytes of length information for DL-UNITDATA,
even if the length of LLC data is less than 128 bytes. This way the data
has always the same offset from a 32 bit boundary.
2012-09-23 06:42:38 +02:00
Andreas Eversberg 514491d726 Fix: Correctly interpret MCC, MNC, CELL ID from BTS 2012-09-23 06:42:07 +02:00
Andreas Eversberg cd8a83a42c Statefull reset and unblock BVCs and sending flow control messages
The flow control interval can be set via VTY.
2012-09-23 06:41:21 +02:00
Andreas Eversberg 4b39dd1c00 Replace local definitions by header gprs_bssgp_bss.h 2012-09-23 06:38:20 +02:00
Andreas Eversberg adb2f18538 Assign TFI to complete TRX, not just one TS
This is required, since we may change slot allocation. In case of a
change, we do not want to be unable to change, if the same TFI on one of
the other slots is already in use by a different TBF (having same TFI, but
on different slot).
2012-08-07 17:06:08 +02:00
Andreas Eversberg 07e97cf8a5 Adding single block allocation
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-08-07 16:00:56 +02:00
Andreas Eversberg cbcd124588 Fix: Add timer for downlink TBF in assignment state
This is required, since the UL TBF which is used to assign downlink TBF
may be freed due to timeouts.
2012-08-07 15:48:21 +02:00
Andreas Eversberg 309ce74376 Fix: tfi_alloc() has some signed attributes 2012-08-07 15:31:16 +02:00
Andreas Eversberg 14db19ed11 Adding flags for debugging assignment and polling timeout 2012-08-06 15:03:03 +02:00
Andreas Eversberg 802bb6eac8 Adding polling for packet control ack at packet downlink/uplink assignment 2012-08-06 11:15:05 +02:00
Andreas Eversberg 08e93cdc3f Use final_ack_sent and contention_resolution_done to define ongoing UL TBF
Both flags can be used to determine wether assignment must be sent on PCH
or on AGCH. Before contention resolution is done, mobile will ignore
downlink assinment. When final uplink acknowledge was sent, the mobile
will go back to PCH after reception of akcnowledge.
2012-07-26 08:13:06 +02:00
Andreas Eversberg 4b55962e55 Minor changes on comments of scheduler 2012-07-26 07:58:33 +02:00
Andreas Eversberg ef42540f0d Be sure to priorize uplink assignment (PACCH)
This is required because uplink assignment (PACCH) is done on a request
by mobile, so the mobile expects that it get this assignment in return.
After that we may assign downlink.
2012-07-25 15:47:03 +02:00
Holger Freyther 0b0f2c0695 misc: Add the libosmocore CFLAGS to the CPPFLAGS
libosmocore might not be in the standard include path,
add the CFLAGS to the preprocessor flags. This is fixing
the build on the Osmocom Jenkins.
2012-07-25 11:17:59 +02:00
Andreas Eversberg ba1cd9bbc2 Fixed two issues found by clang, pointed out by Holger 2012-07-25 09:14:09 +02:00
Andreas Eversberg 6681bb8d0c Replaced malloc() by talloc_zero() to be able to track memeory leaks 2012-07-25 08:48:44 +02:00
Andreas Eversberg d6a8db65a5 Cleanup by splitting gprs_rlcmac_rcv_rts_block() into seperate methods 2012-07-25 08:38:21 +02:00
Holger Freyther a95348c03e misc: Add the libosmocore CFLAGS to the CPPFLAGS
libosmocore might not be in the standard include path,
add the CFLAGS to the preprocessor flags. This is fixing
the build on the Osmocom Jenkins.
2012-07-24 11:20:32 +02:00
Holger Freyther 1115f5972c misc: Fix typos in the comments
ressource -> resorce
2012-07-24 11:20:02 +02:00
Andreas Eversberg b3ded4cf98 Added debugging of downlink bandwidth 2012-07-24 10:47:24 +02:00
Andreas Eversberg 7f5352c17b Fix: gprs_rlcmac_trigger_downlink_assignment() selects correct channel
In order to select correct channel (PCH or PACCH), a tbf pointer is set
in case of PACCH. The tbf pointer points to TBF whose PACCH is used.
2012-07-23 18:25:43 +02:00
Andreas Eversberg bc65586917 Fix: Kill pending downlink TBF, if mobile requests uplink TBF on RACH
If the mobile misses assignment, it changes back to idle mode. In this
case we must kill the pending downlink TBF, because it is not used by
mobile and we can assign a new downlink TBF for new downlink data.
(We may not have two downlink TBF with same TLLI!)
2012-07-23 18:25:43 +02:00
Andreas Eversberg 7438df7d70 Fix: Send downlink assignment on PCH twice to make reception more safe
If the mobile is not fast enough switching back to CCCH, the second
assignment, which is sent later is usefull in this case.
2012-07-23 18:25:43 +02:00
Andreas Eversberg 642c7d3f5b Fix: We don't use timer to define when assignment is complete on PACCH
Instead we use the event of sending assignment message. Then we set the
TBF state to 'FLOW'.
2012-07-23 18:25:43 +02:00
Andreas Eversberg a1503fa356 VTY: Select timeslot allocation algorithm via VTY
The selections are: single slot or multislot
2012-07-23 18:25:43 +02:00
Harald Welte da62859231 Makefile.am: Actually install the pcu during 'make install' 2012-07-22 22:59:08 +02:00
Harald Welte 3022a70eb1 Makefile.am: rename executable name from pcu to osmo-pcu
This makes more sense since the entire repository is called this way
2012-07-22 22:58:22 +02:00
Andreas Eversberg 24131bf55b Add check of lifetime of LLC frame
If lifetime expires of queued LLC frames, they are discarded. The number
of discarded frames and the sum of their octets are reported to SGSN
via LLC-DISCARDED message.

The lifetime can be overridden via VTY. The value can be centi-seconds
or "infinite".
2012-07-21 11:09:58 +02:00
Andreas Eversberg 8b761a3419 VTY: Added option to force given CS and ignore the scheme given by BTS 2012-07-20 21:50:31 +02:00
Andreas Eversberg 3b7461c1b3 Fixed Paging RR on PACCH
Addition to 2b91464862
2012-07-20 11:19:59 +02:00
Andreas Eversberg 2b91464862 Added paging for RR connection on PACCH of active TBFs
Untested
2012-07-19 13:06:26 +02:00
Andreas Eversberg 8389fd0513 Update to version 3 of PCU socket interface (includes version check) 2012-07-18 10:06:48 +02:00
Andreas Eversberg 4b470ffe07 Changed log levels, to indicate abnormal events 2012-07-16 12:02:40 +02:00
Andreas Eversberg 0f13c40147 Check for downlink sequence is out of range
This may happen, if Packer Downlink Assignment was not received by MS, so
old TBF with old sequence number is still alive. In this case we free TBF.
2012-07-16 11:59:23 +02:00
Andreas Eversberg f54a89e881 Change polling interval for Packet Downlink Ack/Nack
This lowers the risk for stalling of transmit window.
2012-07-16 11:56:11 +02:00
Andreas Eversberg 67e4f2f1fd If we already sent final Packet Uplink Ack/Nack, request DL TBF on PCH
If network does not respond fast enough, the MS might already received
final Packet Uplink Ack/Nack, so we need to assign new DL TBF on PCH.
2012-07-15 19:36:49 +02:00
Andreas Eversberg 67a1976974 No content resolution is required when UL TBF is requested during DL TBF 2012-07-15 19:35:46 +02:00
Andreas Eversberg c8466f42c5 Ignore Packet Resource Request 2012-07-15 19:34:53 +02:00
Andreas Eversberg a9b9407493 Only select TLLI, if it is valid (and not unset) 2012-07-15 19:30:41 +02:00
Andreas Eversberg ab18bab577 Set coding scheme on Packet Uplink Ack/Nack message
This way the uplink speeds up too.
2012-07-15 16:34:07 +02:00
Andreas Eversberg 52c748ce8f Minor fixes of debug output of channel allocation 2012-07-15 16:33:02 +02:00
Andreas Eversberg ee31b78cfd Fixed contention resolution issue
In order to do downlink assignment during uplink TBF, the content
resolution must be completed. It is completed when the first Packet
Uplink Ack/Nack message is transmitted to the mobile.
2012-07-15 16:27:01 +02:00
Andreas Eversberg 06f96cd5a7 Added missing TA value assignment 2012-07-15 07:12:36 +02:00
Andreas Eversberg 53f4725d10 Adding multislot allocation algorithm 2012-07-15 07:10:10 +02:00
Andreas Eversberg 6664a90365 Downlink transfer is finished if all packets are acknowleged
It turned out that the final ack flag may not be set, but all packets
have been acknowledged. This patch will finish transfer in case all
blocks are acknowledged.
2012-07-15 06:52:19 +02:00
Andreas Eversberg 5e043dac8c Polling for downlink ack/nack is performed only on suitable slot
The slot must be the control channel TS, which is selected by the
allocation algorithm. The MS must be able to respond at this TS.

The counter to trigger polling is incremented until polling has to be
performed. Then the counter stops. When the transmission of data block is
requested on control channel TS, the counter is reset. The counter-value
is also used to poll immediately when the transmission has finished.
2012-07-15 06:51:30 +02:00
Andreas Eversberg 592e04ab6d multislot: Rework of handling control channel / polling
In order to send control blocks to MS and receive control blocks from MS
(polling), it is required to select one timeslot that the MS must be
able to send and receive. The allocation algorithm must take care of
selecting that slot.
2012-07-15 06:25:37 +02:00
Andreas Eversberg 51ab134fa8 Added parsing of multislot class inside BSSGP PDU 2012-07-13 14:52:50 +02:00
Andreas Eversberg f298fa87b9 multislot: Extracted "slot allocation algorithm" from tbf allocator
The current available algorithm only supports selecting a single slot
for downlink/uplink. (In the future, a multislot algorithm will follow.)
2012-07-13 14:50:57 +02:00
Andreas Eversberg b0c7ea72c8 Changed data structures for TBF and PDCH instances, to allow multislot
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-13 14:46:03 +02:00
Andreas Eversberg e266bd48ac Adding signal handler to allow clean exit of PCU
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-13 14:00:21 +02:00
Ivan Kluchnikov df72c89e4b Removed unnecessary test for tbf. 2012-07-13 16:00:02 +04:00
Andreas Eversberg b8695f290a Removed obsolete if-condition 2012-07-13 13:48:45 +02:00
Andreas Eversberg ebde64f258 logging: Add vty to allow definition/storage of debug levels
Note: This requires new libosomocore that allows to compile VTY headers
with C++.
2012-07-13 13:46:25 +02:00
Andreas Eversberg 1294256d65 VTY implementation 2012-07-13 12:30:03 +02:00
Ivan Kluchnikov ef7f28cc7f Merge branch 'jolly_new'
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-12 14:49:15 +04:00
Andreas Eversberg e13fa2d569 Send downlink IMMEDIATE ASSIGNMENT on PCH and not on AGCH
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-09 17:10:44 +02:00
Andreas Eversberg 88a214cc45 Fixed return value of pcu_l1if_open() when connection to BTS fails
If connection fails, a retry timer is used to try again. This is not an
error.
2012-07-07 08:21:01 +02:00
Andreas Eversberg 0e4030982f Restructured debugging levels to get better overview of TBFs/processes
Only when using LOGL_DEBUG, every detailled information is displayed.

When using LOGL_INFO, a summary of the process is displayed.

When using LOGL_NOTICE, only errors and warnings like timeouts
or invalid received informations are displayed.

When using LOGL_ERROR, only local error like software errorss are
displayed.
2012-07-06 11:04:57 +02:00
Andreas Eversberg 7b0450133c Fixed pseudo length of IMMEDIATE ASSIGNMENT message.
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-06 09:40:47 +02:00
Andreas Eversberg 1944bd5872 Minor fix of MCC, MNC options 2012-07-06 09:32:39 +02:00
Andreas Eversberg 3e372d57ed Cleanup of BSSGP code.
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-06 09:28:15 +02:00
Andreas Eversberg bf5a0f6e2c Move BSSGP/NS instances creation and desctruction to gprs_bssgp_pcu.cpp 2012-07-06 08:58:22 +02:00
Andreas Eversberg 81e895b619 Adding MCC/MNC spoof options to pcu_main.cpp
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-06 08:24:53 +02:00
Andreas Eversberg dfa563cd3b RLC/MAC process makes use from attributes, received from PCU socket
For OpenBTS interface and BSSGP, fixed values are still used.
2012-07-06 08:13:59 +02:00
Andreas Eversberg b3c6f6c716 Receive cell informations via PCU socket interface
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-06 07:40:08 +02:00
Harald Welte d679009a2d remove dependencies to openbsc/osmoggsn internals
...and link against libosmogb (part of libosmocore.git)
2012-07-06 07:24:41 +02:00
Andreas Eversberg e6228b34a7 TBF acknowledged mode finished for both link directions 2012-07-03 13:36:03 +02:00
Ivan Kluchnikov c7e7f6868b Implemented Paging procedure on CCCH.
Added functions:
- gprs_bssgp_pcu_rx_paging_ps() for handling paging message from BSSGP;
- write_paging_request() for writing paging request message;
- gprs_rlcmac_paging_request() and pcu_l1if_tx_pch() for sending paging request message to BTS.
2012-06-29 22:53:15 +04:00
Ivan Kluchnikov bbbd79d6f1 Fixed DL TBF establishment on CCCH.
We shouldn't use paging procedure for DL TBF establishment, if we didn't receive paging message from BSSGP.
2012-06-29 20:30:10 +04:00
Andreas Eversberg 83ced4978a Adding .gitignore to source directory 2012-06-27 17:45:15 +02:00
Ivan Kluchnikov 34460b8407 Modified encoding of Packet Downlink Assignment and Packet Uplink Ack/Nack messages.
Removed hand-coding of RLC/MAC Control messages, now we use structures and encode_gsm_rlcmac_downlink() function for encode control blocks.
2012-06-27 18:41:04 +04:00
Andreas Eversberg 5dac2f09e1 Work on RLCMAC layer. Integration of scheduler and new packet transfer 2012-06-27 15:52:04 +02:00
Andreas Eversberg 66690dd3c6 Rewrite of RLC/MAC uplink acknowledged TBF.
It uses history buffer and sends ack/nack control messages about received
blocks. It defragments the blocks and forwards them to upper layer. It
does content resolution and ignores other MS. It sends final ACK after
all blocks have been sucessfully received. Timers are used to detect
loss of uplink, and repeat lost final ACK.
2012-06-27 15:44:31 +02:00
Andreas Eversberg 39621c41f3 Introducing scheduler to process transmission of blocks
The scheduler is triggered at ready-to-send-requesst. It schedules
control blocks, data block and dummy blocks, depending on priority.

It provides upstream ressource by setting USF. The ressources are
assigned, if required. The ressources are dispatched round-robin.

In case of polling, the upstream ressource is given to MS at the
time it will respond to polling request.
2012-06-27 15:36:27 +02:00
Ivan Kluchnikov d78ee73623 Fixed Downlink TBF Establishment on CCCH.
UL TBF should be released before DL TBF establishment on CCCH.
Added delay after transmitting Immediate Assignment.
2012-06-26 19:33:44 +04:00
Ivan Kluchnikov cf7b3a529f Merge branch 'jolly'
Merged jolly branch with master, fixed conflicts.
2012-06-26 16:54:22 +04:00
Andreas Eversberg 7d7cf54f39 Packet Downlink Assigment now uses ARFCN/TN of current BTS layout
Now the MS receives dowlink LLC frames.
2012-06-25 09:26:15 +02:00
Andreas Eversberg 055340801b Fixed IMM.ASS message
Now packets are reassembled correctly.
2012-06-24 11:46:49 +02:00
Andreas Eversberg fe411b3cfd Hack to slow down uplink transfer 2012-06-23 19:35:56 +02:00
Andreas Eversberg 0aed654ac7 Split of L1 interface to be used with OpenBTS or sysmo-BTS
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-23 10:33:16 +02:00
Andreas Eversberg f6b7ca5dd4 Adding more OpenBSC object files to Makefile.am
This is required, so it works in my environment. Might be revised soon.
2012-06-23 10:17:07 +02:00
Harald Welte 477e79e67e remove dependencies to openbsc/osmoggsn internals
...and link against libosmogb (part of libosmocore.git)
2012-06-18 12:22:18 +08:00
Ivan Kluchnikov a9e6dc5084 Improvement of TBF management.
Added functions for TBF allocation, establishment, data transfer and release management.
Modified TBF structure, added list for several LLC PDUs in one TBF.
Added function gprs_rlcmac_tx_llc_pdus() providing transmission of several LLC PDUs in one TBF to MS.
2012-06-17 08:30:06 +04:00
Ivan Kluchnikov 9b06ff0c4c Removed all size_t variables. Fixed type of readIndex and writeIndex variables.
We use unsigned int type for readIndex and writeIndex parameters in bitvec_read_field() and bitvec_write_field() functions.
2012-06-15 10:13:30 +04:00
Ivan Kluchnikov 856221fd3d Removed all OpenBTS dependencies. We don't use OpenBTS cout and gsmtap anymore. 2012-06-15 09:31:29 +04:00
Harald Welte 40383dcb46 Makefile.am: Don't link lots of openbsc / sgsn / ggsn internal .o files
this is probably a historic relict.  None of them should be used, and I
cannot see any actual use of them either.

The only non-library code that we link now is libosmo-gb (ns/bssgp),
which soon will be turned into a real library.
2012-06-14 21:15:59 +08:00
Harald Welte 57f6b0220f Add auto-foo (partial cleanup, master makefile/configure.ac 2012-06-14 21:05:44 +08:00
Harald Welte c5187a1824 move everything to src/ subdirectory
The code corresponds to commit a9aa4777cc1144897a77dfb6c5c3d7325705251e
in openbts-p2.8.git (Tue Jun 12 18:14:49 2012 +0400)
2012-06-14 20:48:42 +08:00