Commit Graph

1067 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 827ed55c3b misc: Use the $enableval in the macro and not "yes"
--enable-sysmocom-bts=no does not work because the enableval variable
is not used.
2013-01-23 21:54:19 +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 9aaf2ae24d add missing examples/Makefile.am 2013-01-11 18:03:25 +01:00
Harald Welte e4050114f5 install osmo-pcu.cfg to /etc/osmocom/ 2013-01-11 17:49:22 +01:00
Harald Welte 850d80b898 add example configuration file as per Andreas' suggestion 2013-01-11 17:26:53 +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