Commit Graph

182 Commits

Author SHA1 Message Date
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
Holger Hans Peter Freyther 813c098ebd misc: Fix the name of the header file for the hexdump... 2010-10-03 03:22:55 +08:00
Holger Hans Peter Freyther 50d47aeb72 msic: Include osmocom/util.h for the hexdump definition 2010-10-03 02:39:29 +08:00
Holger Hans Peter Freyther 87ef8ec74e sim.c: Fix NULL pointer dereference found by clang. 2010-10-03 02:39:06 +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 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 1e75e61001 layer23/lapdm: Fix typos SAMB -> SABM
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26 20:05:22 +02:00
Andreas.Eversberg 602dcf4d0d [layer23] Added support for changing TCH mode via L1CTL messages 2010-09-26 17:06:06 +00:00
Andreas.Eversberg 88a578f6c9 [layer23] Minor fixes in lapdm.c
For single burst messages, the length is set from layer2 header.
2010-09-26 17:02:36 +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 4c11da7790 [layer23] LAPDm handles UNIT DATA requests correctly
Optionally RSL_IE_ACCESS_DELAY and RSL_IE_MS_POWER can be given with a
message. They will be used to fill the first two bytes of the SACCH uplink
frame. The format equals to the UNIT DATA indication.
2010-09-26 10:28:03 +00:00
Andreas.Eversberg fae41cac5c [layer23] Disabled flow control between LAPDm and layer1. 2010-09-19 20:48:04 +00:00
Andreas.Eversberg 36bb74596b [layer23] Added Hungary to network list 2010-09-19 13:50:44 +00:00
Andreas.Eversberg 940a139db3 [layer23] Fixed "empty UA bug" in LAPDm and cleanups
The tx queue was not flused in case the SABM timer fired, so there were old
frames (SABM) still in the queue after next establish request.

Because the problem was solved, debugging code ist removed.
2010-09-19 11:59:48 +00:00
Andreas.Eversberg 5e1cf12d67 [layer23] Fixed and completed SIM's PIN handling
Use VTY to handle PIN:

enable
sim pin 1 xxxx
sim change-pin 1 xxxx yyyy
sim disable-pin 1 xxxx
sim enable-pin 1 xxxx
sim unlock-pin 1 uuuuuuuu yyyy

1 = mobile station "1"
xxxx = current PIN
yyyy = new PIN
uuuuuuuu = unlock key (PuK)
2010-09-19 10:52:42 +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
Andreas.Eversberg df05c6ca94 [layer23] Added BTSAP socket interface to layer23 2010-09-18 14:02:07 +00:00
Andreas.Eversberg 4b2db86031 [layer23] Added missing pointer reset during establishment of LAPDm connection
Dieter pointed out that the SABM message was resent incorrectly, because the
V(S) pointer was not reset to the location of the SAMB frame.
2010-09-16 08:39:43 +00:00
Andreas.Eversberg d33ffcc3f1 [layer23] Fix in LAPDm: reset send_buffer offset at resume
Without it, the offset of the last message in progess is used.
This caused undefined behaviour and crash.
This bug was found by Dieter.
2010-09-15 10:25:42 +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 4931b324e5 [layer23] Adding SIM client
The SIM client is not the SIM reader. It is used to process higher layer
requests. One request may be: "read the IMSI file" or "unlock SIM card, here
is the key". It then selects the right file of SIM card and processes the
request by exchanging APDUs with the SIM reader.

NOTE: Because the reader inside layer 1 is not yet finished, the SIM client
will not work and cannot be tested yet.
2010-08-28 09:36:07 +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
Andreas.Eversberg 49d6f1aca9 [layer23/lapdm] Added more headroom for data indication to prevent underrun 2010-08-12 07:13:16 +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