osmocom-bb.git
13 years agol1ctl: Add initial tch_mode value in DM_EST_REQ
Sylvain Munaut [Sun, 26 Sep 2010 20:55:02 +0000 (22:55 +0200)]
l1ctl: Add initial tch_mode value in DM_EST_REQ

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Add support for proper meas. report (and use in prim_tx_nb)
Sylvain Munaut [Sun, 26 Sep 2010 20:00:16 +0000 (22:00 +0200)]
fw/layer1: Add support for proper meas. report (and use in prim_tx_nb)

Rewritten based on an original patch by Andreas.Eversberg.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Add support for measurement messages from layer2/3
Andreas.Eversberg [Sun, 26 Sep 2010 09:50:56 +0000 (11:50 +0200)]
fw/layer1: Add support for measurement messages from layer2/3

Written-by: Andreas.Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Introduce prim_utils.c for shared helper betwee primitives
Sylvain Munaut [Sun, 26 Sep 2010 19:50:00 +0000 (21:50 +0200)]
fw/layer1: Introduce prim_utils.c for shared helper betwee primitives

Currently only share the idle frame pattern.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Introduce prim.h for all primitive related things
Sylvain Munaut [Sun, 26 Sep 2010 19:29:23 +0000 (21:29 +0200)]
fw/layer1: Introduce prim.h for all primitive related things

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Fix type of p3 in tdma window setup/cleanup sched items
Sylvain Munaut [Sun, 26 Sep 2010 20:30:30 +0000 (22:30 +0200)]
fw/layer1: Fix type of p3 in tdma window setup/cleanup sched items

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years ago[layer23] Fixed incorrect use of memcpy for frequency list IEs
Andreas.Eversberg [Tue, 28 Sep 2010 06:15:39 +0000 (06:15 +0000)]
[layer23] Fixed incorrect use of memcpy for frequency list IEs

13 years ago[layer23] Fixed parsing of ASSIGNMENT / HANDOVER (type-value) IEs
Andreas.Eversberg [Mon, 27 Sep 2010 19:46:26 +0000 (19:46 +0000)]
[layer23] Fixed parsing of ASSIGNMENT / HANDOVER (type-value) IEs

13 years ago[layer23] Fixed debug output in gsm48_rr.c
Andreas.Eversberg [Mon, 27 Sep 2010 18:55:57 +0000 (18:55 +0000)]
[layer23] Fixed debug output in gsm48_rr.c

13 years ago[layer23] Alter simulated-delay via VTY on the fly (active channel)
Andreas.Eversberg [Mon, 27 Sep 2010 18:53:03 +0000 (18:53 +0000)]
[layer23] Alter simulated-delay via VTY on the fly (active channel)

13 years ago[layer23] Handle invalidation of TMSI correctly
Andreas.Eversberg [Sun, 26 Sep 2010 22:30:15 +0000 (22:30 +0000)]
[layer23] Handle invalidation of TMSI correctly

13 years ago[layer23] Cleanup of various 'printf' debugging
Andreas.Eversberg [Sun, 26 Sep 2010 22:02:32 +0000 (22:02 +0000)]
[layer23] Cleanup of various 'printf' debugging

13 years ago[layer23] VTY command for changing LAI on SIM card
Andreas.Eversberg [Sun, 26 Sep 2010 21:08:53 +0000 (21:08 +0000)]
[layer23] VTY command for changing LAI on SIM card

This speed up network selection process, because no manual network search
is required to change a network.

13 years ago[layer23] Use correct IE for timing advance
Andreas.Eversberg [Sun, 26 Sep 2010 20:04:54 +0000 (20:04 +0000)]
[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.

13 years agoRemove the various checks for high TS as those should now work
Sylvain Munaut [Mon, 20 Sep 2010 18:56:06 +0000 (20:56 +0200)]
Remove the various checks for high TS as those should now work

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: New TPU window sync method
Sylvain Munaut [Mon, 20 Sep 2010 18:55:09 +0000 (20:55 +0200)]
fw/layer1: New TPU window sync method

This is Dieter's sync method adapted to the new TPU stuff.
Not perfect, but should work for TS[0:7] as long as you
leave a free frame between each TS changes ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Fix RX TPU window - no TA dependency
Sylvain Munaut [Mon, 20 Sep 2010 18:53:25 +0000 (20:53 +0200)]
fw/layer1: Fix RX TPU window - no TA dependency

Cut & paste errror ... the TA has nothing to do in RX

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agotarget/layer1: Implement host-driven Tx power control
Sylvain Munaut [Wed, 22 Sep 2010 20:22:18 +0000 (22:22 +0200)]
target/layer1: Implement host-driven Tx power control

It's up to L23 to change the parameters using the appropriate
L1CTL call.

This is a mix between Harald's version and Dieter's version of
the TX control code.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Display diff in hwtimer value when lost interrupt is detected
Sylvain Munaut [Thu, 23 Sep 2010 19:01:39 +0000 (21:01 +0200)]
fw/layer1: Display diff in hwtimer value when lost interrupt is detected

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agolayer23/lapdm: Fix typos SAMB -> SABM
Sylvain Munaut [Wed, 22 Sep 2010 18:57:16 +0000 (20:57 +0200)]
layer23/lapdm: Fix typos SAMB -> SABM

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years ago[layer23] Do not reject mobile terminated calls with no codec given
Andreas.Eversberg [Sun, 26 Sep 2010 18:39:01 +0000 (18:39 +0000)]
[layer23] Do not reject mobile terminated calls with no codec given

Send the list of supported codecs instead.

13 years ago[layer23] Speech codec selection and negotiation with network
Andreas.Eversberg [Sun, 26 Sep 2010 17:08:10 +0000 (17:08 +0000)]
[layer23] Speech codec selection and negotiation with network

13 years ago[layer23] Added support for changing TCH mode via L1CTL messages
Andreas.Eversberg [Sun, 26 Sep 2010 17:06:06 +0000 (17:06 +0000)]
[layer23] Added support for changing TCH mode via L1CTL messages

13 years ago[layer23] Minor fixes in lapdm.c
Andreas.Eversberg [Sun, 26 Sep 2010 17:02:36 +0000 (17:02 +0000)]
[layer23] Minor fixes in lapdm.c

For single burst messages, the length is set from layer2 header.

13 years ago[layer23] Adding application generated measurement report
Andreas.Eversberg [Sun, 26 Sep 2010 10:35:46 +0000 (10:35 +0000)]
[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.

13 years ago[layer23] LAPDm handles UNIT DATA requests correctly
Andreas.Eversberg [Sun, 26 Sep 2010 10:28:03 +0000 (10:28 +0000)]
[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.

13 years ago[layer23] VTY now checks dialed number for valid digits
Andreas.Eversberg [Mon, 20 Sep 2010 21:49:37 +0000 (21:49 +0000)]
[layer23] VTY now checks dialed number for valid digits

Also international calls can be dialed by adding '+' in front. If not the
number will be dialed using 'unknown' type, prefixes must be added.

13 years agohost/mobile: Properly set called party dialling plan & type
Sylvain Munaut [Mon, 20 Sep 2010 19:03:52 +0000 (21:03 +0200)]
host/mobile: Properly set called party dialling plan & type

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agoMerge commit '47ee693170d589f760c4a9c7a5c4ad0b289aa65d'
Sylvain Munaut [Mon, 20 Sep 2010 19:02:28 +0000 (21:02 +0200)]
Merge commit '47ee693170d589f760c4a9c7a5c4ad0b289aa65d'

13 years agogsm48: Fix gsm48_encode_called - Set no extension bit
Sylvain Munaut [Mon, 20 Sep 2010 18:59:23 +0000 (20:59 +0200)]
gsm48: Fix gsm48_encode_called - Set no extension bit

The highest bit must be set as "No extension byte" marker,
so that the next byte is considered to be the BCD number
and not some more control stuff

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years ago[layer23] Disabled flow control between LAPDm and layer1.
Andreas.Eversberg [Sun, 19 Sep 2010 20:48:04 +0000 (20:48 +0000)]
[layer23] Disabled flow control between LAPDm and layer1.

13 years ago[layer23] Fixed typo in Call Control
Andreas.Eversberg [Sun, 19 Sep 2010 20:46:36 +0000 (20:46 +0000)]
[layer23] Fixed typo in Call Control

13 years agogsm0808: Fix the TLV definition of CIC and Service Handover
Holger Hans Peter Freyther [Sun, 19 Sep 2010 17:23:15 +0000 (01:23 +0800)]
gsm0808: Fix the TLV definition of CIC and Service Handover

The nat code stumbled over the CIC bug as it was detecting
timeslot 0x1 as a new CIC and we were patching the data outside
the actual packet... The TLV parser needs some better size
checking too.

13 years agolayer23/mobile/gsm48_rr: Fix typo in IMMEDIATE ASSIGNMENT EXTENDED
Sylvain Munaut [Sun, 19 Sep 2010 17:04:03 +0000 (19:04 +0200)]
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>
13 years ago[layer23] Re-setting encryption, if enabled after changing channel.
Andreas.Eversberg [Sun, 19 Sep 2010 17:20:28 +0000 (17:20 +0000)]
[layer23] Re-setting encryption, if enabled after changing channel.

13 years ago[layer23] Fixed and improved subscriber (SIM) dump of VTY
Andreas.Eversberg [Sun, 19 Sep 2010 13:51:15 +0000 (13:51 +0000)]
[layer23] Fixed and improved subscriber (SIM) dump of VTY

For a detailed SIM infos:
enable
show subscriber

13 years ago[layer23] Added Hungary to network list
Andreas.Eversberg [Sun, 19 Sep 2010 13:50:44 +0000 (13:50 +0000)]
[layer23] Added Hungary to network list

13 years ago[layer23] Added debug about identity (TMSI/IMSI) at LOC.UPD / IMSI DETACH
Andreas.Eversberg [Sun, 19 Sep 2010 12:52:24 +0000 (12:52 +0000)]
[layer23] Added debug about identity (TMSI/IMSI) at LOC.UPD / IMSI DETACH

13 years ago[layer23] Fixed "empty UA bug" in LAPDm and cleanups
Andreas.Eversberg [Sun, 19 Sep 2010 11:59:48 +0000 (11:59 +0000)]
[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.

13 years ago[layer23] Fixed and completed SIM's PIN handling
Andreas.Eversberg [Sun, 19 Sep 2010 10:52:42 +0000 (10:52 +0000)]
[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)

13 years ago[layer23] SIM client completion
Andreas.Eversberg [Sat, 18 Sep 2010 19:15:15 +0000 (19:15 +0000)]
[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.

13 years ago[layer23] Added BTSAP socket interface to layer23
Andreas.Eversberg [Sat, 11 Sep 2010 10:42:29 +0000 (10:42 +0000)]
[layer23] Added BTSAP socket interface to layer23

13 years ago[layer23] Added BTSAP socket interface to layer23
Andreas.Eversberg [Sat, 11 Sep 2010 10:42:29 +0000 (10:42 +0000)]
[layer23] Added BTSAP socket interface to layer23

13 years ago[layer23] Added missing TMSI REALLOCATION COMPLETE reply
Andreas.Eversberg [Sat, 18 Sep 2010 13:30:28 +0000 (13:30 +0000)]
[layer23] Added missing TMSI REALLOCATION COMPLETE reply

Fix by Dieter.

13 years agolayer23/mobile: Fix space/tab indenting in subscriber.c
Sylvain Munaut [Fri, 17 Sep 2010 18:55:20 +0000 (20:55 +0200)]
layer23/mobile: Fix space/tab indenting in subscriber.c

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/l23_api: Fix cut&paste typo in comment
Sylvain Munaut [Thu, 16 Sep 2010 21:00:11 +0000 (23:00 +0200)]
fw/l23_api: Fix cut&paste typo in comment

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agohost/layer23: Enable a5/[1,2] support
Sylvain Munaut [Thu, 16 Sep 2010 10:56:42 +0000 (12:56 +0200)]
host/layer23: Enable a5/[1,2] support

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Properly set/reset ciphering parameters when needed
Sylvain Munaut [Wed, 15 Sep 2010 07:40:25 +0000 (09:40 +0200)]
fw/layer1: Properly set/reset ciphering parameters when needed

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/dsp: Add function to load dsp ciphering parameters
Sylvain Munaut [Wed, 15 Sep 2010 07:39:22 +0000 (09:39 +0200)]
fw/dsp: Add function to load dsp ciphering parameters

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Properly load the tch dsp param (including various fn) in RX
Sylvain Munaut [Wed, 15 Sep 2010 07:38:57 +0000 (09:38 +0200)]
fw/layer1: Properly load the tch dsp param (including various fn) in RX

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw: Update dsl_load_tch_params to set the fn_sid, fn_report and fn_a5
Sylvain Munaut [Wed, 15 Sep 2010 07:37:30 +0000 (09:37 +0200)]
fw: Update dsl_load_tch_params to set the fn_sid, fn_report and fn_a5

Mix between Dieter's version in tch branch and how the TSM30 does it.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw: Move channel type/mode definitions in common header
Sylvain Munaut [Wed, 15 Sep 2010 07:34:43 +0000 (09:34 +0200)]
fw: Move channel type/mode definitions in common header

We'll need them later elsewhere than the tx prim

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw & layer23: Remove limitation about the SDCCH subchannel 4..8
Sylvain Munaut [Tue, 14 Sep 2010 19:19:38 +0000 (21:19 +0200)]
fw & layer23: Remove limitation about the SDCCH subchannel 4..8

This is now supported :)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Increase tdma_sched bucket size
Sylvain Munaut [Wed, 15 Sep 2010 07:38:09 +0000 (09:38 +0200)]
fw/layer1: Increase tdma_sched bucket size

We can now have a bunch more stuff scheduled !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Add common TPU win setup/cleanup code
Sylvain Munaut [Tue, 14 Sep 2010 19:16:58 +0000 (21:16 +0200)]
fw/layer1: Add common TPU win setup/cleanup code

Instead of each primitive doing it independently, if there is a TPU
scenario in one of the item, we do a common setup with the base tn
returned by rfch_get_params.

Then each rx / tx window setup is relative to that 'base tn'. For
TX window, you have to explicitely request an offset of 3. (this
would allow for some test code to TX on ts=0 for eg.)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Convert primitives to use common DSP/TPU scenario ending
Sylvain Munaut [Tue, 14 Sep 2010 19:12:18 +0000 (21:12 +0200)]
fw/layer1: Convert primitives to use common DSP/TPU scenario ending

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Add some sched items flags to signal DSP & TPU scenarios
Sylvain Munaut [Tue, 14 Sep 2010 19:10:21 +0000 (21:10 +0200)]
fw/layer1: Add some sched items flags to signal DSP & TPU scenarios

If those flags are set in one of the item of the current frame,
we end the tpu & dsp scenario in common code.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Add a 'flags' field to sched_items and the infra to use it
Sylvain Munaut [Tue, 14 Sep 2010 19:08:19 +0000 (21:08 +0200)]
fw/layer1: Add a 'flags' field to sched_items and the infra to use it

This is only preparation

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agofw/layer1: Add a priority field for sched_item
Sylvain Munaut [Tue, 14 Sep 2010 18:48:58 +0000 (20:48 +0200)]
fw/layer1: Add a priority field for sched_item

Each item has a priority associated to it. The standard is :
-4    -> Responses processing
-3    -> L1S parameters changes
-2    -> [Reserved for TPU window setup]
-1    -> (anything)
 0..7 -> Commands relative to time slot n
         (relative to current l1s main timeslot)
 8    -> (anything)
 9    -> [Reserved for TPU window cleanup]
10    -> (anthing)

Note that with this modification, an item scheduled for the
current frame from within a call back won't have its priority
respected !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years ago[layer23] Added XOR and COMP128 encryption to test SIM
Andreas.Eversberg [Fri, 17 Sep 2010 15:51:23 +0000 (15:51 +0000)]
[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

13 years agohost/mobile: Enable frq_refef & hand over now that libosmocore is updated
Sylvain Munaut [Fri, 17 Sep 2010 12:46:39 +0000 (14:46 +0200)]
host/mobile: Enable frq_refef & hand over now that libosmocore is updated

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agoMerge commit 'af5ee34c353ea2868a4b04b227bc1b511e1ac42b'
Sylvain Munaut [Fri, 17 Sep 2010 12:40:56 +0000 (14:40 +0200)]
Merge commit 'af5ee34c353ea2868a4b04b227bc1b511e1ac42b'

13 years agoMake sure we don't user std{err,in,out} if they don't exist.
Sylvain Munaut [Fri, 17 Sep 2010 12:38:17 +0000 (14:38 +0200)]
Make sure we don't user std{err,in,out} if they don't exist.

This is required for target build in libosmocore

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agoprotocol/gsm_04_08: Fix cr field position in gsm48_cip_mode_cmd
Sylvain Munaut [Fri, 17 Sep 2010 11:55:45 +0000 (13:55 +0200)]
protocol/gsm_04_08: Fix cr field position in gsm48_cip_mode_cmd

Thanks to Dieter for pointing this out.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years ago[layer23] Added missing state change
Andreas.Eversberg [Fri, 17 Sep 2010 09:42:06 +0000 (09:42 +0000)]
[layer23] Added missing state change

13 years ago[layer23] CM service is now accepted when ciphering has started
Andreas.Eversberg [Fri, 17 Sep 2010 09:07:29 +0000 (09:07 +0000)]
[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.

13 years ago[layer23] Added missing pointer reset during establishment of LAPDm connection
Andreas.Eversberg [Thu, 16 Sep 2010 08:39:43 +0000 (08:39 +0000)]
[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.

13 years ago[layer23] Fixed A5/1 support coding
Andreas.Eversberg [Wed, 15 Sep 2010 14:21:06 +0000 (14:21 +0000)]
[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.

13 years ago[layer23] Fix in LAPDm: reset send_buffer offset at resume
Andreas.Eversberg [Wed, 15 Sep 2010 10:25:42 +0000 (10:25 +0000)]
[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.

13 years agolayer1: Make rfch_get_params tolerate NULL ptr for unwanted params
Sylvain Munaut [Tue, 14 Sep 2010 18:40:32 +0000 (20:40 +0200)]
layer1: Make rfch_get_params tolerate NULL ptr for unwanted params

If the caller doesn't need some params, just don't give them !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agolayer23: Add support for SI1 decoding and imm.ass hopping
Sylvain Munaut [Sun, 12 Sep 2010 13:19:59 +0000 (15:19 +0200)]
layer23: Add support for SI1 decoding and imm.ass hopping

The gsm48_decode_freq_list should ideally become something
shared between this app and mobile but it has incompatibilities
for now ... need to sort that out with Andreas to unify in the
future.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agolayer23: Move app logic in layer3.c with state struct.
Sylvain Munaut [Sun, 1 Aug 2010 09:56:17 +0000 (11:56 +0200)]
layer23: Move app logic in layer3.c with state struct.

It's far from perfect but at least it's not split in two file and
makes it easier to expand the logic.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agolayer23/l1ctl: Add the RX power to the DATA_IND debug print
Sylvain Munaut [Sun, 1 Aug 2010 10:13:26 +0000 (12:13 +0200)]
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>
13 years agolayer23/l1ctl: Remove useless printf debug
Sylvain Munaut [Sun, 1 Aug 2010 10:12:07 +0000 (12:12 +0200)]
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>
13 years agofw/layer1: Use the proper RF params for the burst specific part
Sylvain Munaut [Thu, 29 Jul 2010 21:57:08 +0000 (23:57 +0200)]
fw/layer1: Use the proper RF params for the burst specific part

We sometime need the RF param of the _burst_ and some time of the
'4-burst' group.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years agomisc: update .gitignore files
Sylvain Munaut [Thu, 29 Jul 2010 21:32:00 +0000 (23:32 +0200)]
misc: update .gitignore files

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
13 years ago[layer1] Fixed memory leak issue after releasing dedicated mode
Andreas.Eversberg [Tue, 14 Sep 2010 19:13:36 +0000 (19:13 +0000)]
[layer1] Fixed memory leak issue after releasing dedicated mode

While releasing dedicated mode, pending SDCCH and SACCH messages need to be
flushed. Without it, it would also cause old pending messages to be sent
during next dedicated mode.

13 years ago[layer23] Undo second hunk of last commit
Andreas.Eversberg [Tue, 14 Sep 2010 08:57:29 +0000 (08:57 +0000)]
[layer23] Undo second hunk of last commit

13 years ago[layer23] Fixed IMEISV type IE for CIPHERING COMPLETE message
Andreas.Eversberg [Tue, 14 Sep 2010 08:52:22 +0000 (08:52 +0000)]
[layer23] Fixed IMEISV type IE for CIPHERING COMPLETE message

Bug found by Dieter.

13 years agovty: Add functions to access index and node
Holger Hans Peter Freyther [Mon, 13 Sep 2010 18:24:03 +0000 (02:24 +0800)]
vty: Add functions to access index and node

It is easier to call these two functions from bindings than
wrapping the vty structure and figuring out the alignment of
the enum on all different ABIs.

13 years ago[layer1] Fixed double IRQ bug
Andreas.Eversberg [Sun, 12 Sep 2010 13:49:41 +0000 (13:49 +0000)]
[layer1] Fixed double IRQ bug

During IRQ handling, disabling and enabling IRQ may cause the same IRQ to
fire again. This is because the condition for this IRQ may be fullfilled
again, while still handling it. Using local_firq_save() and
local_irq_resore() intead, the IRQ handling will be completed before it is
cleared, and may then fire again.

The problem was detected during process of messages from layer23 to layer1.
In the IRQ context, the TX-functions of l23_api.c are called. There,
messages are queued and events are scheduled. During access to a queue or
a scheduler from any IRQ context or from normal context, interrupts must be
locked to prevent nested calls.

If it is not desired to call l23_api.c inside IRQ context, a message queue
must be used. If a message is written to that queue, it must be locked.
Afterwards a signal must be sent to the main process. The main process
locks the queue and de-queues the message. This is how it is done by all
layer 1 drivers of mISDN.

13 years ago[layer1] Added frequency change control to layer 1 (L1CTL_FREQ_REQ)
Andreas.Eversberg [Sat, 11 Sep 2010 18:10:14 +0000 (18:10 +0000)]
[layer1] Added frequency change control to layer 1 (L1CTL_FREQ_REQ)

The given new frequency set will be used at given frame number.
If the frame number is already reached, the frequency set will be changed
directly.

The functionality has been successfully tested.

13 years ago[layer23 / layer1] Added interface for changing crypto mode of DSP
Andreas.Eversberg [Sat, 11 Sep 2010 12:10:31 +0000 (12:10 +0000)]
[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.

13 years ago[layer23] Fix of MCC/MNC output in sysinfo.c
Andreas.Eversberg [Sat, 11 Sep 2010 11:57:28 +0000 (11:57 +0000)]
[layer23] Fix of MCC/MNC output in sysinfo.c

13 years agovty: Use the copyright string from the app_info.
Holger Hans Peter Freyther [Sat, 11 Sep 2010 05:41:41 +0000 (13:41 +0800)]
vty: Use the copyright string from the app_info.

13 years agovty: Link osmovty to osmocore as it is using the symbols
Holger Hans Peter Freyther [Fri, 10 Sep 2010 19:58:37 +0000 (03:58 +0800)]
vty: Link osmovty to osmocore as it is using the symbols

Use SUBDIRS to build src first and the src/vty. We will need
to find the right way add the dependencies.

13 years agovty: Everything <= CONFIG_NODE is not a child of config
Holger Hans Peter Freyther [Sat, 4 Sep 2010 03:19:39 +0000 (11:19 +0800)]
vty: Everything <= CONFIG_NODE is not a child of config

The method should be renamed to is child of config node
as it was comparing if vty->node > CONFIG_NODE. This is
fixing an assert in go_to_parent as we tried to find a
parent for the CONFIG_NODE.

13 years agoAdd handover and frequency redefiniton message headers
Andreas Eversberg [Wed, 1 Sep 2010 21:37:07 +0000 (23:37 +0200)]
Add handover and frequency redefiniton message headers

This simply add some TS 04.08 related structures for frequency
redefinition and handover.

13 years agoui: Some experimental code snippets i cobbled together several months ago.
Ingo Albrecht [Wed, 1 Sep 2010 19:24:34 +0000 (21:24 +0200)]
ui: Some experimental code snippets i cobbled together several months ago.

13 years agoplugin: Blind build fix for OSX...
Holger Hans Peter Freyther [Tue, 31 Aug 2010 09:14:04 +0000 (17:14 +0800)]
plugin: Blind build fix for OSX...

According to a internet search PATH_MAX is in limits.h on OSX.

13 years agovty: Make the talloc ctx extern void* to avoid duplicate symbols
Holger Hans Peter Freyther [Tue, 31 Aug 2010 09:09:44 +0000 (17:09 +0800)]
vty: Make the talloc ctx extern void* to avoid duplicate symbols

13 years ago[layer23] SIM client accepts status code 61xx as a positive result
Andreas.Eversberg [Mon, 30 Aug 2010 11:43:16 +0000 (11:43 +0000)]
[layer23] SIM client accepts status code 61xx as a positive result

13 years ago[layer23] "show cell 1 <arfcn>" gives better overview of cell allocation
Andreas.Eversberg [Sun, 29 Aug 2010 21:08:08 +0000 (21:08 +0000)]
[layer23] "show cell 1 <arfcn>" gives better overview of cell allocation

13 years ago[layer23] Fixed security issue
Andreas.Eversberg [Sun, 29 Aug 2010 11:05:07 +0000 (11:05 +0000)]
[layer23] Fixed security issue

Authentication must not be performed using SIM client, if different IMSI is
used, to protect identity of caller.

13 years ago[layer23] Reset scheduler after leaving dedicated mode
Andreas.Eversberg [Sun, 29 Aug 2010 10:05:54 +0000 (10:05 +0000)]
[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.

13 years ago[layer23] Fix of corrupt MM event messages
Andreas.Eversberg [Sun, 29 Aug 2010 08:57:23 +0000 (08:57 +0000)]
[layer23] Fix of corrupt MM event messages

13 years ago[layer23] Disable FREQUENCY REDEFINITION and HANDOVER COMPLETE / FAILURE due to uncom...
Andreas.Eversberg [Sat, 28 Aug 2010 09:52:05 +0000 (09:52 +0000)]
[layer23] Disable FREQUENCY REDEFINITION and HANDOVER COMPLETE / FAILURE due to uncommitted definitions in libosmocore

See http://home.eversberg.eu/osmocore.patch

13 years ago[layer23] Layer 3 now uses SIM client to request and update SIM data
Andreas.Eversberg [Sat, 28 Aug 2010 09:46:36 +0000 (09:46 +0000)]
[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.

13 years ago[layer23] Adding SIM client
Andreas.Eversberg [Sat, 28 Aug 2010 09:36:07 +0000 (09:36 +0000)]
[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.

13 years agovty: Handle nodes part of the lib in the lib, for the rest call the callback
Holger Hans Peter Freyther [Thu, 26 Aug 2010 06:37:10 +0000 (14:37 +0800)]
vty: Handle nodes part of the lib in the lib, for the rest call the callback