Commit Graph

48 Commits

Author SHA1 Message Date
Andreas.Eversberg 1025b2b5a0 [layer23] Send reset to layer 1 before starting power measurement. 2010-07-15 10:27:51 +00:00
Andreas.Eversberg 0a18f742d4 [layer23] WAIT for IDLE and layer 1 reset before power off after IMSI detach 2010-07-14 10:21:35 +00:00
Andreas.Eversberg 3837d899e1 [layer23] Fixed BA list dump 2010-07-13 17:08:00 +00:00
Andreas.Eversberg c36cca355d [layer23] Removed the osmocom/file.h 2010-07-13 14:54:55 +00:00
Andreas.Eversberg 6ba18aeb03 [layer23] Rework of channel request process and control of TA and TX-power
The radio ressource layer uses RSL messages to perform RACH requests now.

TX power and timing advance is controlled before RACH request, after IMM.ASS,
and during dedicated mode. (Note that TX power control is not yet supported
by layer 1.)
2010-07-13 14:21:52 +00:00
Andreas.Eversberg 65df98d930 [layer23] Correcting an attribute name in sysinfo.h. 2010-07-13 14:14:54 +00:00
Andreas.Eversberg f2b1e55c1e [layer23] Updated layer23 to current L1 support and forthcomming hopping. 2010-06-28 13:33:14 +00:00
Andreas.Eversberg d6b1a9b10e [layer23] Removed cloned VTY and replaced it by libosmovty. 2010-06-26 14:00:29 +00:00
Andreas.Eversberg 7b84cf805b [lapdm] Added flow control between L1 and L2, so DM mode does not crash.
In dedicated mode a frame is sent to layer 1. Subsequent frames are queued
inside lapdm.c until a confirm from layer 1 is received. Since not all
pending frames are sent rapidly at once, the layer 1 does not crash anymore.

Also included in this commit: handling of reset confirm (maybe required
in the future after dedicated mode)
2010-06-26 11:12:25 +00:00
Andreas.Eversberg 4e03d6f822 [layer23] Fixed DM est./release for current supported channel types.
Now layer23 supports selecting TS 0-4 with SDCCH/8 channels.
But some tests showed me that it doesn't work. Please help debugging.

Added DM release function to l1ctl.c and gsm48_rr.c.
2010-06-26 09:35:27 +00:00
Andreas.Eversberg d9ac6a51ad layer23: Now receiver of IMM.ASS checks for timeslot when matching request.
This implies that random access confirm now works and is used.
2010-06-24 18:42:33 +00:00
Sylvain Munaut 38c6b4b35a fw/layer1: Add support CCCH combined/non-combined
We introduce the concept of CCCH mode. It can be either
 - NONE: receive BCCCH only
 - COMBINED: CCCH on a BCCH/CCCH+SDDCH/4
 - NON_COMBINED: CCCH on a BCCH/CCCH

There is also a new command to change the mode without having
to do the resync.

Currently, we keep the previous default behavior of requesting
a combined CCCH by default

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-22 06:37:09 +02:00
Sylvain Munaut a3e0c559a4 layer23/gsm322: Make a wrapper for fbsb_req to avoid repeating params
The params are virtually always the same, so use a wrapper to
change them easily

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-22 06:36:18 +02:00
Andreas.Eversberg f84a8c4b7e layer23: Complete rework of MCC and MNC structure.
Instead of handling numerical MCC and MNC, they are now stored and handled
hexadecimal, like they are received by the network. This makes it possible
to correctly handle 2 and 3 digits MNC. Internally 2 digit MNCs are stored
as 0xXXf, and 3 digits MNC are stored as 0xXXX, where X is the digit 0..9.

The length of MNC in the IMSI (2 or 3 digits) depend on the MNC length
trying to match. Anyway that MNC name can be printed even without knowing the
actual length. This is done by matching the IMSI against list of networks.

PLEASE REMOVE "/etc/osmocom/*.ba", because the MCC and MNC stored there is
not valid anymore.
2010-06-20 11:19:06 +00:00
Andreas.Eversberg 4c5eb30929 layer23 manual network search: Fixed searching behavior.
First of all I cleaned up the VTY commands. Instead of something like
"barred-access (yes|no)", I use now "barred-access" and "no barred-access".
Your stored configuration file will not load, because config format has
changed. Just remove the lines that cannot be parsed by VTY from your
config. Then the default values are used on next startup. Modify these as
desired via VTY using the new commands.

Use "rplmn <mcc> <mnc>" or "no rplmn" to set the initial behaviour of
network search. If RPLMN is set, this network is selected. If it is not
found, it will be displayed, then it is time to do a search
"network search 1".

If you have set "no rplmn" the search is started automatically on power on.
After the search you can see available networks and show the cells using
"show cell 1" or the detailed information "show cell 1 <arfcn>".

For testing all that be sure to set the "sim" to "test" and the
"network-search" to "manual". Do "show run" to see all commands to be set.
2010-06-16 18:21:59 +00:00
Andreas.Eversberg 9f77ea40b1 This commit belongs to the last one. 2010-06-16 17:19:40 +00:00
Andreas.Eversberg 7f79cb8e03 layer23: Added some more detailed debugging parameters. 2010-06-15 20:16:52 +00:00
Andreas.Eversberg f6299e657c layer23 cell selection: Fix in cell selection after leaving dedicated mode.
Only the known BA (band allocation) is used to check for the cell to camp
on. If there is no BA or if nothing is found, the process triggers normal
cell selection.

After location update (for example), the mobile switches to the strongest
cell in the current band allocation.
2010-06-14 19:38:06 +00:00
Andreas.Eversberg f479eff3d5 layer23: Added VTY messages to call application.
VTY now shows the process of call establishment, incomming call, and release.
2010-06-13 17:18:15 +00:00
Andreas.Eversberg c6e756aab6 layer23: Fixed issues about location update and it's result.
Now location update reject works. The rejected network/cell is stored in
an appropriate list. The lists can be dumped from the VTY.

A fake authentication response is generated until the SIM interface is
available. If the network rejects the test SIM, due to authentication
failure, it is removed and limited service state is entered. This currenlty
works on networks with SDCCH on the TS0 only.
2010-06-13 13:51:30 +00:00
Andreas.Eversberg 786054d117 cell selection: Added temporary hack to sync multiple times until the sync
failure is accepted.
2010-06-13 12:09:30 +00:00
Andreas.Eversberg 247ec7acf3 Radio ressources now has functions for release of radio link.
The "BA range" is used for cell re-selection.

Due to layer 1 issues, the process gets stuck very often or looses
synchronization.

After location update, I can now make a call via VTY on SDCCH:
Call control sends SETUP request after requesting an MM connection.
My phone on the network side rang!! Call control fails and requires
further debugging...
2010-06-12 16:16:54 +00:00
Andreas.Eversberg d8cc251cf1 Fixes and improvements of RR, MM, CC processes. 2010-06-06 18:19:46 +00:00
Andreas.Eversberg 4f03a851f0 Fixed of bugs while testing layer 2. 2010-06-05 19:46:10 +00:00
Andreas.Eversberg 5d10a35819 Fixes on cell selection process. 2010-05-24 23:15:15 +00:00
Andreas.Eversberg 1294f37687 Fixes during testing of location update with.
The location update is now performed after the channel is assigned.
In dedicated mode the network receives the LOCATION UPDATING REQUEST.
The reply (IDENTITY REQUEST and LOCATION UPDATING REJECT) is received.
But subsequent message like the IDENTITY RESPONSE is not transmitted
by lapdm.c.
2010-05-24 14:46:11 +00:00
root 6404e12a90 Moved some spreaded settings of layer23 into settings.h.
The IMEI can now be set or generated randomly.
2010-05-24 18:15:21 +02:00
root 0f1ef214b6 Fixes on cell selection.
I hope that it fixes the crash issues. If a sysinfo was received when no cell is
selected, it was written to a NULL-pointer.

Also after selecting a cell (dedicated mode), it was not good to "continue"
an already stopped search process, if the sync fails.
2010-05-24 05:38:24 +02:00
Andreas.Eversberg 6ca03ff7e6 Fixing cell selection, so it works with the current layer 1 API. 2010-05-22 09:27:33 +00:00
Andreas.Eversberg 0d1f453943 Summary list of scanned cells now contains LAC and cell ID, rather than (uninteresting) access classes. 2010-05-21 15:52:11 +00:00
Harald Welte cb71b972bd Make new L1CTL_FBSB_REQ work reliably
* port 'mobile' application to new l1ctl_tx_fbsb_req()
* make sure we have a proper downlinke header in front of l1ctl_fbsb_resp
* remove duplicate band_arfcn member of struct l1ctl_fbsb_resp
* reset the AFC to its default value when starting new FBSB task
* remove bogus l1s.sb.{synced.count} variables
* allocate msg and send l1ctl_fbsb_resp() only from process context, not FIQ
* properly report SNR and BSIC in fbsb_resp
* introduce arbitrary SNR thresholds for FB0->FB1 and FB1->SB switching
2010-05-20 23:26:42 +02:00
Harald Welte 8978ec571e layer1/l1ctl: Split L1CTL_NEW_CCCH_REQ in FBSB_REQ nad SYNC_REQ
We really want to have those two as distinct operations - and we
want proper state machines in L1 to quickly return if they've
managed to acquire a FB or SB or not.  Otherwise scanning will
take ages...

This code now introduces a new l1ctl_fbsb_req that is sent via
L1CTL to ask for a bitmask of FB0/FB1/SB operations.  The actual
FB0/FB1 detection now no longer runs for 500 TDMA interrupts
but completes as soon as we either know there is no FCCH,
or that our frequency error is smaller than a caller-specified
threshold.

FB0/FB1 are already working, SB is not yet, sorry.
2010-05-19 21:41:24 +02:00
Andreas.Eversberg 21cc7eecc5 Work on VTY interface:
- Load and save of config now works.
- Network search is displayed on VTY and the result can be selected there.
- Manual/auto mode can be selected via VTY and saved.
2010-05-13 12:51:22 +00:00
Andreas.Eversberg bb08bbd1d7 Minor fixes and improvements to L3 and VTY. 2010-05-10 22:06:37 +00:00
Andreas.Eversberg b763a07c47 Added "show ba 1" to view BA lists via VTY interface. 2010-05-09 17:31:49 +00:00
Andreas.Eversberg 3928d757f0 Added vty interface (taken from OpenBSC project).
It is now possible to show informations about:
- mobile
- subscriber
- received cell informations

Later it can be used to do configurations (phone's menu)
and trigger events, like dialing a phone number.
2010-05-09 16:01:49 +00:00
Andreas.Eversberg acd570fff8 Added SI3 rest octets to RR layer. Now a cell can be qualified:
- Low prio
- High prio
- Barred
2010-05-09 09:40:41 +00:00
Andreas.Eversberg f76e2064a4 Added BCCH timeout timer for detecting loss of radio link (layer23). 2010-05-08 14:31:27 +00:00
Andreas.Eversberg 2b5c2337ed Fixes for layer 3 processes:
- CCCH connection state variable
- The complete BAND is now searched prio selecting PLMN
2010-05-07 21:41:54 +00:00
Andreas.Eversberg 2b7d2ed446 - Fixes on MM, RR, cell selection, plmn search processes.
-> Cell selection now requires only one frequency to be scanned, if BA list
   of that PLMN is known.
2010-05-06 08:48:24 +00:00
Andreas.Eversberg 7c5b9ea288 Work on layer 3 processes:
- Fixes on PLMN search and cell selection process.
- Fixes on radio ressource.
- ^C will cause IMSI detach when pressed the first time.
  Pressing ^C again will cause termination of process at any time.
2010-05-05 08:40:10 +00:00
Andreas.Eversberg 7f009e41f9 Work on layer 3 processes:
- Fixed reference to system informations. (did crash when re-selecting).
- Fix in cell selection state machine. (any re-selection).
- MCC, MNC, LAC change of cell now triggers re-selection.
- Fixed some paging issues. Empty pagings are not displayed anymore. Also paging is now possible when 'camping on any cell'.
2010-05-04 09:48:51 +00:00
Andreas.Eversberg fe1dc19c6e More fixes on layer3.
The current code will scan frequencies, select a cell and camps on it.
No SIM is inserted. Paging requests and Immediate assginments can be seen.

When inserting a SIM card (uncomment it in app_mobile.c), location update
is triggered after selecting a cell. The RACH request is sent, an
Immediate assignment is received, the dedicated mode is requested.
Nothing happens then, because no confirm / abort of layer 2 is received.
2010-05-02 17:40:52 +00:00
Andreas.Eversberg 14974d3dba Many fixes in layer 3:
- Sysinfo storage
- Cell/Network selection process
- Channel request / Paging
2010-05-02 17:13:47 +00:00
Andreas.Eversberg 8e5f33b4d3 Fixed many issues in MM IDLE mode process. 2010-05-01 18:21:03 +00:00
Andreas Eversberg 516917e836 Fixes and improvements of layer23. 2010-04-29 20:46:11 +02:00
Andreas Eversberg 9ef7ac8b11 Added some debugging. / Minor condition fix. 2010-04-26 11:21:18 +02:00
Andreas Eversberg f1278ad9da Added new application "mobile" to layer23.
This is the current status of the layer 3 protocols. Everything compiles,
radio ressource layer is partly complete. Everything is untested, so don't
expect that it runs and does something usefull. The next step for me is
running and debugging it.

Here is the list of files that are added / modified:

	new file:   ../include/osmocom/gsm322.h
	new file:   ../include/osmocom/gsm48_cc.h
	new file:   ../include/osmocom/gsm48_mm.h
	new file:   ../include/osmocom/gsm48_rr.h
	modified:   ../include/osmocom/l23_app.h
	modified:   ../include/osmocom/logging.h
	new file:   ../include/osmocom/mncc.h
	modified:   ../include/osmocom/osmocom_data.h
	new file:   ../include/osmocom/subscriber.h
	new file:   ../include/osmocom/support.h
	new file:   ../include/osmocom/sysinfo.h
	new file:   ../include/osmocom/transaction.h
	modified:   Makefile.am
	new file:   app_mobile.c
	new file:   gsm322.c
	new file:   gsm48_cc.c
	new file:   gsm48_mm.c
	new file:   gsm48_rr.c
	modified:   main.c
	new file:   mnccms.c
	new file:   subscriber.c
	new file:   support.c
	new file:   sysinfo.c
	new file:   transaction.c
2010-04-25 18:28:24 +02:00