Commit Graph

36 Commits

Author SHA1 Message Date
Harald Welte 73a809e57b Tell L1CTL_FBSB_REQ the expected received signal level
As Dieter points out, this drastically improves the resiliance to high
receive levels on the C155.  We cannot blindly assume a received signal
level of -85 dBm if the BTS is 2m away and we actually receive -40 dBm.

This patch extends the L1CTL_FBSB_REQ data structure in layer 1 with the
respective field, as well as the l1ctl_tx_fbsb_req() API function called
from the various layer23 apps.

"mobile" and "bcch_scan" already did a PM request and thus know the
expected signal power.  "ccch_scan" and "cbch_sniff" apparently don't
do, so the -85 dBm constant is now hardcoded into the host-side source
code there, and should probably be fixed in a follow-up patch.
2012-11-20 10:13:44 +01:00
Sylvain Munaut ce60deff7b host/l1ctl: Make sure to initialize tn in neigh_pm_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-03-29 09:21:57 +02:00
Andreas Eversberg 8f77cbecb4 host/layer23: Removed local copy of LAPDm, using libosmocore instad
Since libosmocore already has LAPDm implementation, we don't need the
local copy of LAPDm code anymore.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Andreas.Eversberg 1a5461fb2b layer23: Add mobile support for sending / receiving voice frame through MNCC
Support GSM FR codec only so far.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28 21:30:51 +02:00
Sylvain Munaut 98a1051475 l23/l1ctl: Add default values for audio_mode
Theses value should simulate the old behavior

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28 21:30:50 +02:00
Andreas Eversberg 9548ac0a41 [layer23/mobile] Improvement and fixes of idle mode process
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 11:12:15 +02:00
Andreas Eversberg 87c597abf6 [layer23] Adding neighbour cell measurement to L1CTL interface. 2011-07-17 09:36:49 +02:00
Harald Welte a9da9b730d L1CTL is sending PH-DATA.ind, not PH-DATA.req up to LAPDm 2011-06-24 15:26:59 +02:00
Harald Welte 3538c38835 further decouple lapdm code from osmocom_ms and l1ctl
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-23 23:55:20 +02:00
Harald Welte f36e4fe86c remove l1ctl data structure form l2_ph_chan_conf()
This brings us one step closer to de-couple LAPDm from L1CTL
2011-06-22 23:04:20 +02:00
Harald Welte 4d5f74375a remove l1ctl data structure from l2_ph_data_ind() 2011-06-22 23:01:18 +02:00
Harald Welte 7ad100b94e layer23: make LAPDm code mostly independent of 'struct osmocom_ms'
This is one step in the direction of re-using the lapdm code in osmo-bts.
2011-06-21 19:51:01 +02:00
Harald Welte 308f9e506e layer23: update to new GSMTAP API in libosmocore >= 0.3.1 2011-05-22 12:36:55 +02:00
Pablo Neira Ayuso a1d1680245 src: use namespace prefix osmo_* for utils
Summary of changes:

s/bcd2char/osmo_bcd2char/g
s/char2bcd/osmo_char2bcd/g
s/hexparse/osmo_hexparse/g
s/hexdump/osmo_hexdump/g
s/hexdump_nospc/osmo_hexdump_nospc/g
s/ubit_dump/osmo_ubit_dump/g
s/static_assert/osmo_static_assert/g
2011-05-15 17:33:26 +02:00
Pablo Neira Ayuso 404f634406 src: use namespace prefix osmo_signal*
Summary of changes:

s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g
2011-05-15 14:39:39 +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 837710c285 [l1ctl] Adding missing msgb_free()
When a corrupt frame cannot be delivered, it is dropped. Also it must be freed.
2011-01-27 16:33:04 +00:00
Andreas.Eversberg 4df881932c [layer23] msgb_free() must in l1ctl.c must called after reading its header 2010-11-13 18:23:57 +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 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 86f4d80b7f [layer23] Increase sync tollerance by increasing freq_err_thresh1
This is a quick workarround to make synchronizing to a cell more reliable.
Without it, just a few cells will sync. When network search is restarted, no
more sync happens.  By increasing the freq_err_thresh1 to 10000, many cells
sync, even after the first network search.
2010-10-05 15:42:29 +00: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 942bfeab18 [layer23] Cleanup of various 'printf' debugging 2010-09-26 22:02:32 +00:00
Andreas.Eversberg 602dcf4d0d [layer23] Added support for changing TCH mode via L1CTL messages 2010-09-26 17:06:06 +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
Andreas.Eversberg 0856c8a6a5 [layer23] SIM client completion
The SIM client is now complete. Because it usefull for multiple
applications, i moved it to the layer23/src/common directory.

The SIM reader works together with mobile process. Fixes were made.
Thanx to all for testing, finding bugs, and making it work as it is
supposed to do.

The current version uses special L1CTL messages to send and receive APDUs.
This will change in the future, when BTSAP interface is completed.

Please note that this client will not work until the layer1 SIM reader
fixes and extensions are committed.
2010-09-18 19:15:15 +00:00
Sylvain Munaut e746ca06ca layer23/l1ctl: Add the RX power to the DATA_IND debug print
Useful to know if bad data is due to ciphering/bad sync or to
no/marginal signal.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-14 21:21:42 +02:00
Sylvain Munaut 54ff7c5f60 layer23/l1ctl: Remove useless printf debug
There is a proper LOGP statement, no need for a printf

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-14 21:21:42 +02: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 00b9d1e73f [layer23] L1CTL frequency change implementation in l1ctl.c 2010-08-21 15:06:46 +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
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 c382fbf943 include: Rename l1a_l23_interface.h to l1ctl_proto.h
The interface between l1 and upper layer is called by several
name. IMHO l1ctl is shorted and sounds good so try to unify
using that.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:29 +02:00
Sylvain Munaut 50f1eb1114 layer23: Use libosmocore rsl_chan_nr_str instead of local func
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27 20:51:21 +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