Commit Graph

42 Commits

Author SHA1 Message Date
Harald Welte bc82f92a8d move gsm 05.02 related calculations into libosmocore 2011-06-26 14:41:58 +02:00
Harald Welte 457a081379 use new gsm48_number_of_paging_subchannels from libosmocore 2011-06-26 14:21:43 +02:00
Harald Welte f6093a4d0e move {ts,lchan}2chan_nr() functions to gsm_data_shared.c
... this way osmo-bts can use them
2011-06-25 10:02:33 +02:00
Holger Hans Peter Freyther c42ad8b686 misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Harald Welte 18b590de4a RSL: add code to generate SACCH INFO MODIFY command
SACCH INFO MODIFY is intended to modify the SACCH content for a single
logical channel (as opposed to the default SACCH FILLING)
2011-01-13 00:08:17 +01:00
Holger Hans Peter Freyther 54146271b6 misc: Forward declare the struct gsm_bts_trx_ts to avoid warning. 2011-01-06 14:52:50 +01:00
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Harald Welte 53cd7ac44c Dynamic PDCH: rsl_ipacc_pdch_activate() operates on a timeslot
... not on the lchan.
2010-12-23 14:41:40 +01:00
Holger Hans Peter Freyther 6003d6b928 rsl: Remove unimplemented/unused rsl_paging_cmd_subscr
RSL should not know the details of a GSM Subscriber anyway.
2010-12-22 18:26:36 +01:00
Sylvain Munaut 3f16da2032 include: Add proper predeclaration for struct in abis_rsl.h
We use them, so declare them. (avoid including all gsm_data.h)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:26 +01:00
Holger Hans Peter Freyther 4b85a32360 chan_alloc: Change Channel Release to release SAPIs, then the channel
Currently every SAPI release indication will trigger the channel. It
was possible that we had SAPI=3 and SAPI=0 allocated and we tried to
release the channel by sending a RF Channel Release, the BTS answered
with a RF Channel Release ACK but also sent the SAPI Release Indication
which triggered a channel release here. So it was possible that we
would have released a newly allocated channel because of the SAPI
release of the old connection.

This code now works by releasing all SAPIs from highest to lowest,
then sending a SACH Deactivate and finally releasing the channel. This
approach is in use on the on-waves/bsc-master.
2010-07-31 04:09:38 +08:00
Holger Hans Peter Freyther 8cb4a0f35d rsl: Add method to send a SMSCB inside a SMS BROADCAST COMMAND
* Untested code for sending the SMS BROADCAST COMMAND.
2010-07-23 17:16:48 +08:00
Holger Hans Peter Freyther 4f5848dc91 abis_rsl: Allow to specify the release mode for a given channel.
This can be used by handover, early assignment to indicate the
close of the old channel...
2010-06-08 12:16:17 +08:00
Holger Hans Peter Freyther 74419497fc [rsl] Introduce a method to set the state of the lchan
Setting the state through a dedicated method allows us to
track the state transitions and check if they are done in
a proper way.
2010-04-10 00:13:53 +02:00
Holger Hans Peter Freyther ccfd572647 [rsl] Remove method that is not called by anything. 2010-04-10 00:11:17 +02:00
Harald Welte 4563eab30e RSL: keep track of ip.access dynamic TCH/PDCH activation
We use the (currently unusued) flags member of the bts_trx_ts structure
to track if a dynamic TCH/PDCH is currently on PDCH mode or not.
2010-03-28 14:42:09 +08:00
Harald Welte 13f52974e6 move GSM protocol definitions to include/osmocore/protocol/* 2010-02-20 18:56:00 +01:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Harald Welte a72273e176 rename ipacc_connect_proxy_bind() to rsl_ipacc_mdcx_to_rtpsock()
Our RTP sockets are no longer just for the proxy mode, so having
"proxy" in the function name is really misleading.
2009-12-20 16:53:53 +01:00
Harald Welte 5e3d91bff7 ip.access: Keep a full copy of local and remote IP/PORT in lchan
Keeping all parameters for each RTP connection in the abis_ip member of
lchan will help us with actual TCH handover later on.
2009-12-19 18:35:56 +01:00
Harald Welte 8d77b9540a [handover] first functional handover implementation
With this commit, we can successfully hand over a channel from one cell to
another cell.  We implement asynchronous intra-BSC (but inter-BTS) handover.

Changes:
* introduce new DHO log category
* extend rsl_chan_activate_lchan() with argument for HO reference
* introduce actual minimal handover decision making in handover_decision.c
* various fixes to bsc_handover_start() in  handover_logic.c
2009-12-17 00:31:10 +01:00
Harald Welte 24766091d8 mark lchan2chan_nr() using a 'const' parameter
which fixes some compile warnings at some callers.
2009-12-09 19:18:32 +01:00
Holger Hans Peter Freyther 231163d365 [ipa] Change names of RTP methods to follow MGCP naming
IPA is naming these functions CRCX, MDCX, DLCX to follow
the naming of the MediaGatewayControlProtocol. Change the
code to go from BIND to CRCX (create connection) and from
CONNECT to MDCX (modify connection).

Connect indicates that it is only possible to call it once
while it is possible to call it more than once to modify
the audio parmaters and such. So the IPA terminology is
making a bit more sense here (now that we know it).
2009-11-19 09:40:03 +01:00
Harald Welte 9c880c9a9b [GPRS] Add RSL function for ip.access PDCH activation
If we have a dynamic TCH/F / PDCH channel configuration, then
we can either ACTIVATE CHANNEL it for a TCH/F, or we need to send
this vendor-specific PDCH ACTIVATE command to use it as a PDCH.

As opposed to a fixed configuration, this allows an intelligent
BSC channel allocator to use otherwise idle channels as PDCH
as long as no more TCH's are needed.
2009-10-24 10:29:22 +02:00
Harald Welte 08d91a5b26 A5 support for RSL and 04.08 (not used yet)
This just adds the 04.08 and RSL bits for A5, but not the logic
for performing authentication.

The caller would first set lchan->encr and then call
gsm48_send_rr_ciph_mode(lchan), which encapsulates the 04.08
CIPHERING MODE COMMAND into a RSL ENCRYPTION COMMAND and sends it
to the BTS for execution + forwarding.
2009-08-30 15:37:11 +09:00
Harald Welte 4321feeb20 siemens vendor specific message type and IE definitions 2009-08-10 17:40:43 +02:00
Harald Welte 31c489390c make rsl_siemens_mrpci() use struct rsl_mrpci 2009-08-10 10:07:33 +02:00
Harald Welte 67fa91bf42 Add function to generate siemens-specific MRPCI RSL message
MRPCI (MS RF Power Indicator) informs the BTS about the power
capabilities of the MS.
2009-08-10 09:51:40 +02:00
Holger Hans Peter Freyther 34e97495a6 misc: Add prototypes to header files, include more header files
Fix various warnings about implicit declarations of functions.
2009-08-10 07:54:02 +02:00
Harald Welte edcc527371 Add new BSC RLL layer of code
A caller can call rll_establish(lchan, link_id) and a callback to the GSM RLL
code.  He will get called back if the RLL link is established or receives some
error message, or the establishment times out.

We need this for proper SMS implementation, where we need to restablish a SAPI3
RLL link before transmitting the actual CP-DATA messages.
2009-08-09 13:47:35 +02:00
Harald Welte d2dc1de9d9 start using the RLL RELEASE procedures
So far, we immediately disable the RF channel without following a proper
RLL RELEASE procedure.  This patch changes this.

If we locally terminate the connection, the channel allocator now triggers a
RLL RELEASE REQuest, which is responsed by the MS with a RLL RELEASE CONFirm,
based on which we send the RF CHANnel RELease to the BTS.

If the MS terminates the connection, we receive a RLL RELEASE INDication,
based on which we trigger RF CHANnel RELease to the BTS.
2009-08-08 13:15:07 +02:00
Harald Welte 2da8629b7c parse and decode Siemens specific T_MSRFPCI message 2009-08-04 02:31:05 +02:00
Harald Welte 9943c5bbac generalize channel activation / channel mode modify
* we only need one piece of code to calculate rsl_ie_chan_mode from
  our run-time data structures (gsm_lchan)
* add some more channel modes for TCH/H and data
* use enum's to make the compiler warn us about unhandled enum values
* make sure the caller determines the (signalling,speech,data) mode
2009-07-29 15:41:29 +02:00
Harald Welte 8830e07efb implement human-readable RSL cause printing 2009-07-28 18:27:59 +02:00
Harald Welte ae0f2362bb send DEACTIVATE SACCH when sending RR CHANEL RELEASE
As per specification, we first send the RR CHANNEL RELEASE to the MS,
and then tell the BTS to disable the SACCH on that channel.
2009-07-19 18:36:49 +02:00
Harald Welte a1f0ac7eb3 yet again some more ip.access RSL definitions + parsing 2009-07-12 21:59:04 +02:00
Harald Welte 0427a9f31a add some more ip.access RTP related definitions 2009-07-12 11:17:16 +02:00
Harald Welte 20855547bf rename ip.access structure field members and variables
to reflect that we now know their true names/meanings
2009-07-12 09:50:35 +02:00
Harald Welte 86c162dce8 give ip.access RSL IE's their proper names 2009-07-12 09:45:05 +02:00
Harald Welte fcd2445d05 Introduce BS and MS power control related functions
* add bts->band field plus corresponding VTY and commandline argument
* add trx->nominal_power and trx->max_power_red fields
* add rsl_chan_bs_power_ctrl() to control TRX RF power for a given TS
* add rsl_chan_ms_power_ctrl() to control MS RF power for a given lchan.
2009-06-20 19:22:18 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00