Commit Graph

2146 Commits

Author SHA1 Message Date
Andreas Eversberg 2b91464862 Added paging for RR connection on PACCH of active TBFs
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
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
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