Commit Graph

50 Commits

Author SHA1 Message Date
Andreas.Eversberg 58ac7e0e98 [layer23] Adding Quadband support and GSM 4x0 support
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-29 19:51:54 +02:00
Pablo Neira Ayuso d3ba2f6037 src: use namespace prefix osmo_timer*
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-05-15 14:39:30 +02:00
Pablo Neira Ayuso ade79a0083 src: use new libosmogsm and include/osmocom/[gsm|core] path to headers
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>
2011-04-26 02:55:30 +02:00
Andreas.Eversberg 93c64102e1 [layer23] Timer 3126 must be stopped even if starting time is given 2010-12-28 12:21:18 +00:00
Andreas.Eversberg a0246e07ff layer23: Use the new rach_req format in l1ctl and update l23 apps to use it
This removes an old hack

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-30 17:32:09 +02:00
Andreas.Eversberg fbbb3ac953 [layer23] Fixed conditions for complete set of SYSTEM INFORMATION 2010-10-24 12:55:31 +00:00
Andreas.Eversberg 5e819e682f [layer23] Old SYSTEM INFORMATION 5 and 6 must be removed when entering DM 2010-10-24 12:34:53 +00:00
Andreas.Eversberg 1ac1852ffc [layer23] Moving decoding of SYSTEM INFORMATION to sysinfo.c
This way the decoding can be re-used by other applications.
2010-10-24 12:30:37 +00:00
Andreas.Eversberg 18c621e9f7 [layer23] Don't request a channel, if SYSINFO 3 is not available
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 18:16:12 +00:00
Andreas.Eversberg 8be9f76bc4 [layer23] Fix of channel request cause "OTHER or SDCCH" 2010-10-20 18:12:44 +00:00
Andreas.Eversberg a5a60bcab8 [layer23] Fixed cell monitoring output (RR idle mode) 2010-10-13 18:27:15 +00:00
Andreas.Eversberg 2278ba6e78 [layer23] Minor change in paging debugging 2010-10-13 18:26:04 +00:00
Andreas.Eversberg ba3c45f1f3 [layer23] Fixed ASSIGNMENT / HANDOVER failure handling 2010-10-12 11:26:51 +00:00
Andreas.Eversberg 2a5e0f3cb7 [layer23] Fixed resume of datalink (after assignment or handover)
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 09:03:34 +00:00
Andreas.Eversberg 4e9656c819 [layer23] Adding some debugging output 2010-10-12 08:44:18 +00:00
Andreas.Eversberg 6d4915b91b [layer23] Implementation of signal loss criteria as defined in TS 05.08
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-12 08:26:48 +00:00
Andreas.Eversberg 6dafb958ba [layer23] Fixed ACCH reception of TCH channels
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 21:53:24 +00:00
Andreas.Eversberg f0c807a682 [layer23] Rework of "support"-features, features can be disabled now
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-03 10:51:31 +00:00
Holger Hans Peter Freyther ca5e51df44 gsm48_rr.c: Move the access below the parsing (found by clang 2010-10-03 02:45:28 +08:00
Sylvain Munaut 9257fe53bf l1ctl: Add initial tch_mode value in DM_EST_REQ
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-28 08:04:18 +02:00
Andreas.Eversberg 167648f2a5 [layer23] Fixed incorrect use of memcpy for frequency list IEs 2010-09-28 06:15:39 +00:00
Andreas.Eversberg bd9cc54ad6 [layer23] Fixed parsing of ASSIGNMENT / HANDOVER (type-value) IEs 2010-09-27 19:46:26 +00:00
Andreas.Eversberg 86c1392af9 [layer23] Fixed debug output in gsm48_rr.c 2010-09-27 18:55:57 +00:00
Andreas.Eversberg e97b7c418c [layer23] Alter simulated-delay via VTY on the fly (active channel) 2010-09-27 18:53:03 +00:00
Andreas.Eversberg 942bfeab18 [layer23] Cleanup of various 'printf' debugging 2010-09-26 22:02:32 +00:00
Andreas.Eversberg ed342e1673 [layer23] Use correct IE for timing advance
This patch has no effect, only the definition for timing advance IE is
changed to RSL_IE_TIMING_ADVACE.
2010-09-26 20:14:58 +00:00
Sylvain Munaut 6c6b073f54 Remove the various checks for high TS as those should now work
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26 20:05:23 +02:00
Andreas.Eversberg b0336cd484 [layer23] Speech codec selection and negotiation with network 2010-09-26 17:08:10 +00:00
Andreas.Eversberg 4ed601ae4e [layer23] Adding application generated measurement report
The cell provides SYSTEM INFORMATION 5* and 6. These are used to create a
list of neighbor cells to monitor. Because there is no neighbor cell
monitoring supported by layer1, the list has no valid results yet.

Currently the average RX level of received frames are used to generate a new
report every second. The report is transmitted to layer1 and used there
whenever a measurement report has to be transmitted.

The timing advance and the current transmit power (as requested by network),
is included with every report.
2010-09-26 10:35:46 +00:00
Sylvain Munaut 460a68c6b6 layer23/mobile/gsm48_rr: Fix typo in IMMEDIATE ASSIGNMENT EXTENDED
This prevented the assigment from working if you wer in the
1st channel description.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-19 19:04:03 +02:00
Andreas.Eversberg cea24eba21 [layer23] Re-setting encryption, if enabled after changing channel. 2010-09-19 17:20:28 +00:00
Sylvain Munaut 54b77bc07e fw & layer23: Remove limitation about the SDCCH subchannel 4..8
This is now supported :)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:41 +02:00
Sylvain Munaut 1e238a8c11 host/mobile: Enable frq_refef & hand over now that libosmocore is updated
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 14:46:39 +02:00
Andreas.Eversberg b349e38838 [layer23] CM service is now accepted when ciphering has started
Sylvain pointed out that CM SERVICE ACCEPT message is not requred, if
ciphering has been completed. In this case, an RR_SYNC_IND is sent
to mobility management, and treated there as CM SERVICE ACCEPT.
2010-09-17 09:07:29 +00:00
Andreas.Eversberg dece8977f4 [layer23] Fixed A5/1 support coding
Dieter pointed out that A5/1 is indicated as supported, if the A5/1 bit in
the classmark IE is 0.
2010-09-15 14:21:06 +00:00
Andreas.Eversberg cd41b6c541 [layer23] Undo second hunk of last commit 2010-09-14 08:57:29 +00:00
Andreas.Eversberg 5fd9e05909 [layer23] Fixed IMEISV type IE for CIPHERING COMPLETE message
Bug found by Dieter.
2010-09-14 08:52:22 +00:00
Andreas.Eversberg fa686fd4c9 [layer23 / layer1] Added interface for changing crypto mode of DSP
The layer23 will now set crypto mode and key when CIPHERING MODE COMMAND is
received. After crypto mode has been set, CIPHERING MODE COMPLETE is sent.

NOTE: Layer1 implements only the interface, there is no functionality to it
yet.
2010-09-11 12:10:31 +00:00
Andreas.Eversberg 3b8338b9c0 [layer23] Reset scheduler after leaving dedicated mode
This is required if a pending DATA_REQ is scheduled. It becomes obsolete,
because LAPDm will keep the last unacknowledged message, if any, and resend
it in case of re-establishing on a new channel.
2010-08-29 10:05:54 +00:00
Andreas.Eversberg 8c6f34515a [layer23] Disable FREQUENCY REDEFINITION and HANDOVER COMPLETE / FAILURE due to uncommitted definitions in libosmocore
See http://home.eversberg.eu/osmocore.patch
2010-08-28 09:52:05 +00:00
Andreas.Eversberg f20a1c3de8 [layer23] Layer 3 now uses SIM client to request and update SIM data
The SIM reader can be selected via VTY, but because it is not yet
implemented in layer1, nothing happens when selecting it.
2010-08-28 09:46:36 +00:00
Andreas.Eversberg c6a423392e [layer23] Radio ressource protocol completed except for handover, meas.
Assignment command is now complete as well as frequency redifinition.
The handover process is partly complete. Further functionality depends
on layer1 capabilites. The measurement report is also incomplete.
2010-08-21 15:10:30 +00:00
Andreas.Eversberg 4337d3bb2e [layer23] Added (incomplete) ASSIGNMENT COMMAND handling
This commit features handling of ASSIGNMENT COMMAND. Currently only channel
descriptions "after time" are processed, which is mostly the case.
The ASSIGNMENT COMMAND is essential, because public networks assign an
SDCCH4/8 before actually assigning a TCH.
2010-08-14 17:10:26 +00:00
Andreas.Eversberg c27bbfa7d9 [layer23] Removed hack: Allocate SDCCH when requesting a TCH
Includes removal of compiler warnings when selecting the right channel
request type for TCH.
2010-08-12 07:11:04 +00:00
Andreas.Eversberg a5b023cd98 [layer23] Paging response depends on the supported channels: SDCCH, TCH/F, and TCH/H 2010-08-11 16:11:28 +00:00
Andreas.Eversberg 6439e4f279 Added sequence number to L3 messages (see GSM 04.08 Clause 3.1.4.3)
This is required to detect duplicated messages during assignment or
handover. Each PDISC uses its own sequence number, but MM+CC+SS share the
same. The sequence number is only required in uplink direction.

Dieter: Please check, if your tester eats it now. Also try to trace if the
sequence number is set correctly.
2010-08-10 19:31:07 +00:00
Harald Welte 72523a02a6 [layer23] use gsm48_decode_freq_list() which has been moved into libosmocore 2010-08-04 12:53:52 +02:00
Sylvain Munaut 0cbd5d0139 layer23: Unify the prefix of l1ctl TX functions
Some had tx_ph_XX, others l1ctl_tx_XXX and some l1ctl_tx_ph_XXX

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:52 +02:00
Sylvain Munaut 9e9f99c0a0 layer23: Split [2/2] -> The header files
This split the headers and adapt the source.

We use osmocom/bb as a prefix because libosomore also
uses osmocom and generic names such as misc & common could
conflict in the future.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:49:27 +02:00
Sylvain Munaut de21ca4aaf layer23: Split [1/2] -> The source code
We split into :
 - common: Everything that can be shared
 - mobile: The real spec compliant mobile phones
 - misc:   Different test stuff

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:49:04 +02:00