aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_08.c
AgeCommit message (Collapse)AuthorFilesLines
2009-12-22keep some internal statistics inside OpenBSCHarald Welte1-0/+19
the statistics will give us some idea about the network load and performance.
2009-12-21[handover] Real handover algorithmHarald Welte1-0/+1
This implements the handover algorithm (and associated parameters) as described in Chapter 8 of the book "Performance Enhancements in a Frequency |Hopping GSM Network" by Thomas Toftegard Nielsen and Jeroen Wigard. The parameters such as averaging windows are configured in struct gsm_network. We keep some state to trakc up to 10 neighbors as they are being reported from the MS. This has so far only been tested in a network with two BTS that have each other as neighbor. Networks with morge neighbors might encounter bugs.
2009-12-20rename ipacc_connect_proxy_bind() to rsl_ipacc_mdcx_to_rtpsock()Harald Welte1-17/+3
Our RTP sockets are no longer just for the proxy mode, so having "proxy" in the function name is really misleading.
2009-12-20Move RTP socket handling out of signal handlers into abis_rslHarald Welte1-26/+0
This is not really nice, but we will soon have multiple users of the CRCX / MDCX / DLCX signals, and we cannot guarantee the ordering of them. So as a workaround, we move the RTP socket creation and deletion into the core abis_rsl codebase.
2009-12-20remove hand full of 'extern ipacc_rtp_direct' definitionsHarald Welte1-2/+0
and instead declare it in gsm_data.h
2009-12-20add FIXME to IMSI DETACH INDICATION: we need to release all transactionsHarald Welte1-0/+3
2009-12-19RTP-enable MNCC API for LCR + ip.accessHarald Welte1-34/+83
Instead of passing TRAU frames down the MNCC API to the call control application like MNCC, we now decode the TRAU frame into the actual codec frame. We do the same with the RTP packets in case of ip.access and thus have a unified format of passing codec data from the BTS to an application, independent of the BTS type. This is only implemented for V1 full-rate at the moment, and needs to be fixed.
2009-12-19measurement report parsing: NO-NCELL-M of 7 tells us no neighborsHarald Welte1-1/+1
2009-12-19ip.access: Keep a full copy of local and remote IP/PORT in lchanHarald Welte1-3/+0
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-19Fix subscr ref leak for multi CM SERV REQSylvain Munaut1-1/+3
Multiple CM SERVICE REQUEST can happen on a single RR connection, in this case, since the subscr reference is tracked through lchan->subscr and will only be put'd once on lchan_free, we need to make sure we don't get several reference .... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-16measurement report: correctly parse BSIC of first neighbor cellHarald Welte1-1/+1
2009-12-1604.08: fix off-by-one error while parsing measurement resultsHarald Welte1-19/+19
2009-12-15introduce cache of 6 last recently received measurement reports for each lchanHarald Welte1-2/+2
2009-12-1404.08 MEAS REP: Convert relative cell number to ARFCNHarald Welte1-6/+11
Since we are keeping a bitvec of the neighbor cells, we can now use bitvec_get_nth_set_bit() to determine the ARFCN for each reported cell in the 04.08 MEASUREMENT REPORT.
2009-12-14fix compiler warnings in gsm_04_08.cHarald Welte1-2/+2
2009-12-14Add VTY setting for whether or not to sending MM INFOHarald Welte1-2/+4
2009-12-13introduce new signal every time we get a mobile identityHarald Welte1-0/+6
2009-12-12Gracefully reject non-speech callsHarald Welte1-20/+34
As we currently really only deal with voice/speech calls and don't support FAX and DATA (CSD) calls, we now gracefully reject them.
2009-12-12[04.08] use lchan_auto_release to quickly close channelHarald Welte1-7/+11
In some cases, we can try to close the lchan a bit faster than our lchan release timeout: * After we've sent LOC UPD ACCEPT and MM INFO * After a phone has confirmed the RELEASE of a call
2009-12-06location updating reject cause now specified on VTY rather than command line ↵Harald Welte1-7/+2
argument
2009-12-02move RTP socket information from timeslot to lchanHarald Welte1-31/+24
With ip.access, in case of TCH/H, we have one RTP stream for each half-slot (lchan), not just one per on-air timeslot. This is quite different from a classic BTS where the TRAU frames of the two TCH/H channels would be part of the same 16k sub-slot in a E1 timeslot.
2009-11-29[handover] Introduce new handover related LCHAN signalsHarald Welte1-4/+29
This introduces the signals S_LCHAN_ACTIVATE_{ACK,NACK} and S_LCAN_HANDOVER_{FAIL,COMPL,DETECT} as well as code that actually issues those signals. The signals are relevant for a yet-to-be-written handover control logic.
2009-11-29print debug statement in case of HANDOVER COMPLETE or HANDOVER FAILEDHarald Welte1-0/+8
2009-11-29New complete measurement result/report handlingHarald Welte1-33/+27
This patch extends struct gsm_meas_rep into a complete structure containing all information from both uplink and downlink measurement results/reports. This is a first step to provide this complete measurement data as a C structure into a to-be-implemented handover decision algorithm.
2009-11-19[lchan] RSL and RR need the multirate config, place it in the lchanHolger Hans Peter Freyther1-1/+1
Both GSM 04.08 RR and GSM 08.58 RSL need the multirate config in the channel modify. Place the config in the lchan, change the gsm48 methods to not take the argument, change the RSL implementation to make use of it with the right IE. The other code should use the t(l)v_put routines as well but were left untouched for now.
2009-11-19[ipa] Change names of RTP methods to follow MGCP namingHolger Hans Peter Freyther1-5/+5
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-17[gsm48] When picking AMR we need to supply the multirate configHolger Hans Peter Freyther1-1/+1
On channel mode modify and assignment command when using the a multirate code the multirate configuration must be present in the packet. Add a parameter and add a warning when using it in a broken way.
2009-11-06[mncc] Fix possible transaction/subscriber and real life subscriber leakHolger Hans Peter Freyther1-1/+6
In the case a transaction has been already scheduled return 0 was called but the subscriber and transaction would leak. Fix it by calling subscr_put and trans_free. After claiming the channel also remove the reference on the subscr.
2009-10-27[gsm48] Handle the RR CHAN MODIFY ACK in the gsm04_08_utilsHolger Hans Peter Freyther1-5/+1
Move the handling code to the gsm_04_08_utils.c and add a note that the method value needs to be checked.
2009-10-27[gsm48] Move RR CHANNEL MODIFY to gsm_04_08_utils.cHolger Hans Peter Freyther1-42/+3
Be able to send RR CHANNEL MODIFY from the BSC/MSC code as well. Move the method that knows about the IPAccess RTP and issues the "bind" to the utils tool
2009-10-26Add USDD code from Mike HabenHarald Welte1-1/+4
This is the initial checkin of the USSD code from Mike Haben. I didn't put it in the main branch as I think it still needs some cleanup.
2009-10-23[gsm48] Make method name consistent...Holger Hans Peter Freyther1-2/+2
We use rx_rr to indicate that we have received a radio resource message but one method was using rr_rx. Fix that.
2009-10-22[rrlp] Fix compiler warningsHolger Hans Peter Freyther1-1/+1
The apdu is static const u_int8_t. Change the signature to have a const in there to make the compiler happy, include chan_alloc.h for lchan methods.
2009-10-22Fix warnings by removing unused variablesHolger Hans Peter Freyther1-2/+0
2009-10-06[gsm0408] Move encryption message creation to gsm_04_08_utils.cHolger Hans Peter Freyther1-24/+0
Be able to use the cipher mode command message from the MSC code.
2009-10-05[ipaccess] Add nanoBTS 1900 supportMike Haben1-2/+1
Add support for 1900 nanoBTS by using unified bts_type GSM_BTS_TYPE_NANOBTS for 900, 1800 and 1900 versions. Reduce the nanoBTS enum values to one and derive the version from the user supplied band. In the future we might want to do auto band detection. The configuration file needs to be changed to refer to nanobts instead of nanobts900/nanobts1800. Signed-off-by: Mike Haben <michael.haben@btinternet.com> Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-09-28[gsm0408] Move paging handling to gsm_04_08_utils.cHolger Hans Peter Freyther1-31/+3
Add one method to extract the MI which will allow to load the gsm_subscriber depending on the MSC/BSC setup and then use gsm48_handle_paging_resp to finish the paging response handling.
2009-09-28[gsm0408] Move send_siemens_mrpci to gsm_04_08_utils.cHolger Hans Peter Freyther1-16/+0
2009-09-28[tmsi] Make the tmsi a 4 octet numberHolger Hans Peter Freyther1-8/+9
tmsi is four octets long, there is no need to make it a string and then jump through hoops to convert it to a number. Keep the database using it as a string to benefit from the NULL handling of the db. Introduce the reserved tmsi which has all bits set to 1 according to GSM 03.03 §2.4 and start checking for it and make sure the db code will never allocate such a tmsi.
2009-09-27Merge branch 'master' into encryptionHarald Welte1-5/+8
2009-09-27[gsm_04_08] Fix gsm48_send_rr_ciph_mode algorithm IDSylvain Munaut1-1/+1
The algorithm ID used in the GSM 04.08 RR message is (x-1) for A5/x. In RSL it's (x+1) for A5/x so there is a difference of 2. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27[gsm_04_08] Fix gsm48_tx_mm_auth_req implementationSylvain Munaut1-3/+5
It was mainly missing the key_seq field, causing the command to just be rejected by the ME. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-26non-call related SS (USSD) is not unknown, but unimplementedMike Haben1-2/+3
also, if we write 0x in front of a number, it should be hex.
2009-08-30A5 support for RSL and 04.08 (not used yet)Harald Welte1-0/+27
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-20[gsm48] Introduce a gsm48_generate_mid_from_imsi methodHolger Hans Peter Freyther1-1/+1
Prefix generate_mid_from_tmsi with a gsm48_, create a new method to binary encode the imsi. Add a unit test for parsing and decoding. The implementation can parse the data it generated and the last octet seems to be filled with the end mark.
2009-08-20[gsm48] Move parsing of the MI from to gsm_04_08_utils.cHolger Hans Peter Freyther1-63/+10
The parsing of the IMSI is needed for the MSC part as well. Move it to the gsm_04_08_utils.c so it can be used.
2009-08-17[bsc] Move the GSM 04.08 helper functions to gsm_04_08_utils.cHolger Hans Peter Freyther1-278/+4
The existing gsm_04_08.c implementation is mixing BSC and MSC behavior. Move some simple parsing and generation functions over to gsm_04_08_utils.c to allow a different MSC to define the policy.
2009-08-17actual code running at end of har2009Harald Welte (local)1-1/+8
2009-08-16store all APDU's received from the MS in the databaseHarald Welte (local)1-1/+1
This helps us to analyze data such as RRLP location information for later analysis.
2009-08-15add support for APPLICATION INFO RR messagesHarald Welte (local)1-0/+42