Commit Graph

24 Commits

Author SHA1 Message Date
Neels Hofmeyr 785450c4bf mobile: add audio config, with unused audio loopback setting
The aim is to add configurable audio loopback to mobile. An existing patch on a
branch from fixeria [1] adds the audio config section. Add a reduced version of
this audio config to be compatible with the future merge.

Add the audio loopback setting, so far without functionality.
Subsequent patch adds the actual loopback.

[1] osmocom-bb branch fixeria/audio,
    patch "mobile/vty_interface.c: add new 'audio' section"
    Change-id I62cd5ef22ca2290fcafe65c78537ddbcb39fb8c6

Change-Id: Ie03e4a6c6f81ea3925266dd22e87506d722a6e1a
2020-05-05 12:02:31 +07:00
Holger Hans Peter Freyther fcb420d50b mobile/sms: Make it optional to store the SMS on disk
Disable storing the SMS on disk. This is useful when scripting mobile.
Keep the default of attempting to store it to disk.

Change-Id: I6353447343d98ebaa5e12ab63f995750f81c8500
2018-06-04 06:50:25 +02:00
Holger Hans Peter Freyther 5a3dd6eb1a mobile: Make time spent in c7 configurable
When no cell was found during the PLMN search the camp on any cell
state will be entered. LUs are prevented in this state and it will be
left after the start_any_timer has timedout. Even if camping on the
home network the state will not be left before the expiry of the timer.

For systematic tests this is producing a too high upper bound. Make it
configurable so we can succeed with a UL more quickly.

Change-Id: I25bc985cd4360d5e37d05a7b16b39eefb75ce20f
2018-06-01 23:32:23 +08:00
Max d7b69212f8 mobile: Use osmocom auth API instead of direct calls
Submitted-by: Max <max.suraev@fairwaves.co>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-15 19:00:13 +02:00
Andreas Eversberg f6b52d74dd mobile: Allow test card to be maked as already attached
This way it is possible to use test card without making attachment
to the network, if the LAI matches. It can be used to do faster
testing.
2013-01-07 11:22:08 +01:00
Andreas Eversberg d72cb4401e Rename various "rxlev" variable to "rxlev_dbm" and correct their signess
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-11-22 16:00:33 +01:00
Tim Ehlers b4a8badc45 mobile: Add vty option to force rekeying for every new channel
Written-by: Tim Ehlers	<osmocom@ehlers.info>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-02-14 23:54:25 +01:00
Andreas Eversberg fe2e57bc80 host/mobile: Mobile will use SMS Service Center Address from SIM
In case the SMS Service Center Address is not set in the config, the
Address from the SIM card is used. The mobile checks if either one is
defined, otherwise it will refuse sending SMS.

Since records of SIM are read, this patch includes fixes to talk
correctly with the SIM client.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01:00
Andreas Eversberg fb7be589e6 host/mobile/sms: Adding SMS support for osmocomBB/mobile
Both MO and MT SMS are supported.

Transmission an reception can be controlled via VTY:

en
sms 1 <destination> <text>

All received SMS are stored in "~/.osmocom/bb/sms.txt".

SMS transmission is performed on SAPI 3 datalink, using DCCH or ACCH.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01: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
Harald Welte 48db968916 settings.h: IMSI is 15 bytes +1 \0 maximum
If we use a larger field to store the IMSI, we can create overflows when
copying the imsi to other structures that are only 16 bytes in size.

Detected by Smatch:
src/host/layer23/src/mobile/subscriber.c +195 gsm_subscr_testcard(39) error: strcpy() 'set->test_imsi' too large for 'subscr->imsi' (20 vs 16)
2011-07-16 17:41:02 +02:00
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
Andreas.Eversberg f72baf40d5 [layer23] Adding LAC and TMSI (both optional) to test card (rplmn) 2010-11-20 08:32:32 +00:00
Andreas.Eversberg 6f2b172780 [layer23] Added support for multiple MS instances
To create another instance: 'ms <name> create'

To remove an instance: 'no ms <name>'

If no instance exists, 'ms 1' is created automatically on startup.

Each instance can be enabled / disabled by using 'shutdown' or
'no shutdown'. Multiple instances may share the same layer2 socket (same
phone hardware), but in this case only one instance can be enabled at the
same time. This makes it much easier to select different settings without
modifying them.

A 'shutdown' initiates the IMSI detach procedure before shutdown is
completed. A 'shutdown force' will immidiately shutdown.

There is no need to restart the software anymore, if fundamental settings
are changed. In this case, a 'shutdown' followed by a 'no shutdown' will
do the job.

If you already have an old osmocom.cfg, you need to "no shutdown" it.
Everything else behaves as before.
2010-11-13 18:45:09 +00:00
Steve Markgraf 8f007baced layer23/mobile: Add configuration option for automatically answering calls
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-10-27 20:30:13 +02:00
Andreas.Eversberg adf65e29fd [layer23] DTMF support 2010-10-15 18:54:57 +00:00
Andreas.Eversberg 1dd14c0b26 [layer23] Adding abbreviated dialing to VTY
It is possible to store phone numbers with abbreviations now. Dialing these
abbreviation makes testing of mobile originated calls much easier too.
2010-10-14 07:37:52 +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 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
Andreas.Eversberg 66ff1cb347 [layer23] Minimum RX-level is now a configuratio option
The default (if config not yet created/updated), is still taken from
settings.c.
2010-10-01 19:24:34 +00:00
Andreas.Eversberg b0336cd484 [layer23] Speech codec selection and negotiation with network 2010-09-26 17:08:10 +00:00
Andreas.Eversberg 7b3e80f64b [layer23] Added XOR and COMP128 encryption to test SIM
To define/change a key for the test SIM, use the following sequence:

conf t
ms 1
test-sim
ki comp128 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
end
write

or use:
ki xor xx xx xx xx xx xx xx xx xx xx xx xx
2010-09-17 15:51:23 +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
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