summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/gsm48_rr.c
AgeCommit message (Collapse)AuthorFilesLines
2017-12-13mobile/gsm48_rr.c: cosmetic: drop wrong commentVadim Yanitskiy1-1/+0
Nothing is actually being skipped in this function. Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4
2017-12-13mobile/gsm48_rr.c: fix ACCH System Information parsingVadim Yanitskiy1-15/+11
According to GSM 04.08, the System Information messages, such as SI5, SI5ter, SI5bis and SI6 (described in sections 9.1.37-40), have no the 'L2 Pseudo Length' (10.5.2.19) field, unlike others. So, previously the ACCH SI messages were ignored due to an implementation error - the gsm48_system_information_type_header struct isn't applicable here, because it assumes the 'l2_plen'. Since there is no (yet?) equivalent struct for the ACCH SI, this change replaces the wrong struct by the 'gsm48_hdr', which satisfies described requirements. Moreover, this change cleans up some gsm48_rr_rx_sysinfo* functions, getting rid of meaningless pionter shifting. Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5
2017-11-05mobile: get rid of unused variables / functionsVadim Yanitskiy1-19/+15
Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23
2017-05-25mobile/gsm48_rr.c: fix BA range exceed checkVadim Yanitskiy1-1/+3
Change-Id: Ic2ebe9faeeda7ce812527962d209e6049f2dfc75
2017-01-15Support Early Classmark SendingHarald Welte1-0/+6
If SI3 rest octets indicate early CM Sending is allowed, and the 'support' indicates we support it (which we now do by default), then send the classmark change message every time a LAPDm link layer is established.
2017-01-15Fix encoding of padding at end of CLASSMARK 3 IEHarald Welte1-2/+2
Contrary to e.g. SI rest octets, the padding at the end of a CLASSMARK 3 Information Element is padded with zeros, not with L. There is no 0x2b padding in this case.
2013-01-08mobile: Fixed ignoring of MDL-ERROR-INDAndreas Eversberg1-0/+1
Some MDL-ERROR causes must not lead to link failure. The missing "return 0" causes all errors to be ignored which are not listed inside switch/case statement.
2012-11-22Rename various "rxlev" variable to "rxlev_dbm" and correct their signessAndreas Eversberg1-5/+5
All levels in range of 0..63 are now uint8_t and use "rxlev" as variable name. All levels in range of -110..-47 are now int8_t and use "rxlev_dbm" as variable name.
2012-10-30Fix: Change T200 of LAPDm if SAPI 0 and SAPI 3 share bandwidth on SDCCHAndreas Eversberg1-0/+31
We use 1 second on FACCH and 2 seconds on SACCH when SMS is transfered during a call on TCH. There is no impact on bandwidth, because SAPIs use differen channels. In order to correctly transfer SMS during SDCCH, the T200 must be raised from 1 (SAPI 0) to 2 (SAPI 0 and 3), so T200 will not timeout before receiving acknowledge from BTS. This is because both SAPIs share the same ressource on SDCCH. After release of SAPI 3, T200 is lowered back to 1.
2012-10-30Fixed decoding of hexadecimal LAI componentsAndreas Eversberg1-11/+0
libosmocore has changed its LAI decoding from hex to decimal. This caused wrong decoding of MCC and MNC. In order to provide required hex transcoding, special hex encoding and decoding function are added to mobile/sysinfo.c.
2012-02-14mobile: Add vty option to force rekeying for every new channelTim Ehlers1-1/+1
Written-by: Tim Ehlers <osmocom@ehlers.info> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-01-02layer23/mobile: Minor fix of debugging outputAndreas Eversberg1-1/+1
2011-11-13host/mobile/sms: Adding SAPI 3 support to MM and RR layersAndreas Eversberg1-67/+431
RR now handles SAPI 3 datalink. MM connections now have and individual sapi, so MM can use right SAPI for communication with other layers, as well as releasing the right MM connections in case of link release. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13host/mobile: Whitespace fixes, no functional changesSylvain Munaut1-17/+17
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13host/mobile: Fixed paging response with correct identity typeAndreas Eversberg1-20/+34
In case we got paged with IMSI, but even if we have a valid TMSI, we need to respond with IMSI, because the network may not know our TMSI anymore. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-08-06Fix of wong Classmark 2 when doing CM Service Request.Andreas Eversberg1-5/+6
Same reason as the commit below... (3b2b3b09a) Thanx again to Dieter for pointing this out.
2011-07-28layer23: Add mobile support for sending / receiving voice frame through MNCCAndreas.Eversberg1-6/+54
Support GSM FR codec only so far. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-17[layer23/mobile] Improvement and fixes of idle mode processAndreas Eversberg1-10/+48
This patch introduces cell re-relection. When camping on a cell, it scanns neighbour cells. If a 'better' cell is found, the cell is selected. If the cell is in a different location area, a location upating is performed under certain conditions. The 'better' cell depends on various informations that are broadcasted on the BCCH of a neihbour cell and of course the RX level. Most operators don't set these informations, so the 'better' cell depend on a better RX level for the same location area, or a much better RX level (6 dBm) at a different location area. There were many issues at the idle mode process that has been fixed. Expecially when moving, the state machines got stuck, so no more cell search was possible, or no further calls / location updating was possible. In order to see the process of cell selection, enter the VTY interface and enable the network monitor: enable monitor network 1 (where '1' is the instance of the MS) In order to see the current state of the processes, enter: show ms
2011-07-17[layer23] Fixed handling of channel 0 in certain loopsAndreas Eversberg1-4/+5
The ARFC counts from 1 to 1023, and then to 0. The index of these loops count from 1 to 1024. The index 1024 stands for ARFCN 0. This also reverses commit eb77945e162ae1968242009372e448b7af51ea50.
2011-07-16gsm48_rr: Don't overflow array boundaryHarald Welte1-1/+1
Detected by Smatch: src/host/layer23/src/mobile/gsm48_rr.c +3021 gsm48_rr_render_ma(89) warn: buffer overflow 'cd->freq_seq_lv' 10 <= 10 src/host/layer23/src/mobile/gsm48_rr.c +3023 gsm48_rr_render_ma(91) error: buffer overflow 'cd->freq_seq_lv' 10 <= 10
2011-06-23lapdm: remove get_rsl_name() and use libosmogsm:gsm_rsl_name() insteadHarald Welte1-2/+2
2011-06-23further decouple lapdm code from osmocom_ms and l1ctlHarald Welte1-1/+1
we introduce a new primitive layer betwen PH and DL, enabling the use of the LAPDm code in applications that are not based on L1CTL
2011-06-22add l1ctl_proto.h #includes to lots of filesHarald Welte1-0/+2
this is apparently a result of no longer including it indirectly via lapdm.h
2011-06-21layer23: make LAPDm code mostly independent of 'struct osmocom_ms'Harald Welte1-6/+8
This is one step in the direction of re-using the lapdm code in osmo-bts.
2011-05-29[layer23] Adding Quadband support and GSM 4x0 supportAndreas.Eversberg1-49/+157
This makes it possible to use GSM 850 and PCS 1900 bands, as used in the US. The support relies on the phone hardware. Each band (900, DCS, 850, PCS, 480 and 450) can be enabled and disabled individually for each setting.
2011-05-15src: use namespace prefix osmo_timer*Pablo Neira Ayuso1-25/+25
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-04-26src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso1-5/+5
This patch changes include paths to get osmocom-bb working with the current libosmocore tree. Among all these renames, you can notice several tweaks that I added on purpose, and that require some explanation, they are: * hexdump() in osmocon.c and osmoload.c has been renamed to avoid clashing with hexdump() defined in libosmocore. * gsmmap now depends on libosmogsm. Actually I had to cleanup Makefile.am because I was experiencing weird linking problems, probably due to a bug in the autotools. With the change included in this patch, I got it compiled and linked here correctly. This patch has been tested with the phone Motorola C123 and the following images files: * firmware/board/compal_e88/hello_world.compalram.bin * firmware/board/compal_e88/layer1.compalram.bin Using the osmocon, bcch_scan and mobile tools. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2010-12-28[layer23] Timer 3126 must be stopped even if starting time is givenAndreas.Eversberg1-3/+3
2010-10-30layer23: Use the new rach_req format in l1ctl and update l23 apps to use itAndreas.Eversberg1-3/+4
This removes an old hack Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-24[layer23] Fixed conditions for complete set of SYSTEM INFORMATIONAndreas.Eversberg1-8/+3
2010-10-24[layer23] Old SYSTEM INFORMATION 5 and 6 must be removed when entering DMAndreas.Eversberg1-0/+3
2010-10-24[layer23] Moving decoding of SYSTEM INFORMATION to sysinfo.cAndreas.Eversberg1-414/+22
This way the decoding can be re-used by other applications.
2010-10-20[layer23] Don't request a channel, if SYSINFO 3 is not availableAndreas.Eversberg1-1/+6
SI3 is required in order to request a channel the correct way. If not yet received, the process crashes due to an arithmetic exception.
2010-10-20[layer23] Fix of channel request cause "OTHER or SDCCH"Andreas.Eversberg1-1/+1
2010-10-13[layer23] Fixed cell monitoring output (RR idle mode)Andreas.Eversberg1-1/+3
2010-10-13[layer23] Minor change in paging debuggingAndreas.Eversberg1-16/+16
2010-10-12[layer23] Fixed ASSIGNMENT / HANDOVER failure handlingAndreas.Eversberg1-53/+66
2010-10-12[layer23] Fixed resume of datalink (after assignment or handover)Andreas.Eversberg1-31/+30
In order to resume correctly, the first message (ASSIGNMENT COMPLETE or HANDOVER COMPLETE) must be sent after the link is resumed. Therefore it must be given with the resume command. Unacknowledged messages are transmitted afterwards, if any.
2010-10-12[layer23] Adding some debugging outputAndreas.Eversberg1-4/+7
2010-10-12[layer23] Implementation of signal loss criteria as defined in TS 05.08Andreas.Eversberg1-18/+25
There are two criterions for lossing a signal, idle mode and dedicated mode. A counter counts down when a frame is dropped, and counts up when a valid frame is received on certain channel. The loss criterion is reached, if the counter reaches 0. The values added to / removed from the counter and the limits depend on the process.
2010-10-03[layer23] Fixed ACCH reception of TCH channelsAndreas.Eversberg1-1/+2
Without it, the indicated TA and power never get received by layer23. This may cause a release duing TCH on certain networks. Also it is required to apply timing advance and transmit power during movement.
2010-10-03[layer23] Rework of "support"-features, features can be disabled nowAndreas.Eversberg1-50/+53
Supported features of hardware (support.c) can be disabled by config. This way the full featured mobile can be downgraded to indicate less features to the network, like disabling speech support or crypto support.
2010-10-03gsm48_rr.c: Move the access below the parsing (found by clangHolger Hans Peter Freyther1-2/+2
2010-09-28l1ctl: Add initial tch_mode value in DM_EST_REQSylvain Munaut1-4/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28[layer23] Fixed incorrect use of memcpy for frequency list IEsAndreas.Eversberg1-25/+25
2010-09-27[layer23] Fixed parsing of ASSIGNMENT / HANDOVER (type-value) IEsAndreas.Eversberg1-16/+26
2010-09-27[layer23] Fixed debug output in gsm48_rr.cAndreas.Eversberg1-1/+1
2010-09-27[layer23] Alter simulated-delay via VTY on the fly (active channel)Andreas.Eversberg1-0/+15
2010-09-26[layer23] Cleanup of various 'printf' debuggingAndreas.Eversberg1-4/+4
2010-09-26[layer23] Use correct IE for timing advanceAndreas.Eversberg1-1/+1
This patch has no effect, only the definition for timing advance IE is changed to RSL_IE_TIMING_ADVACE.