Commit Graph

31 Commits

Author SHA1 Message Date
Andreas.Eversberg f2b1e55c1e [layer23] Updated layer23 to current L1 support and forthcomming hopping. 2010-06-28 13:33:14 +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
Harald Welte a10344b39e [layer23] remove raw printf about RACH CONF 2010-06-25 16:37:29 +02:00
Harald Welte bc860c43c2 [layer23] use the TSC that is passed from L1 when going in dedicated mode 2010-06-24 18:57:28 +02:00
Sylvain Munaut 16cd41e809 l1a_l23_interface: Update DM EST REQ format
We include all the parameters we're gonna need to support
TS!=0, hopping, TSC, ...

We also assume the upper layer have decoded the low level
bit fields and gives us neat accessible variables and a
sorted ARFCN array for the Mobile Allocation

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-24 18:57:28 +02: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
Harald Welte 45f7b8bddf [layer23] Add debug print of _CONF messages 2010-06-20 19:42:49 +02:00
Harald Welte 281ea80498 [L1CTL] rename primitives to comply with official naming s/_REQ/_CONF/
When L23 issues a REQ, we should respond with CONF, rather than _RESP
2010-06-20 19:10:21 +02:00
Harald Welte cdc91973ee [L1CTL] rename L1CTL_RESET to L1CTL_RESET_IND
and define a new structure that indicates the type of reset
2010-06-20 18:44:27 +02:00
Jan Luebbe b76f3d0686 l1ctl.c: add missing ntohs for band_arfcn
This fixes mangled ARFCN numbers in gsmtap.
2010-06-17 10:02:16 +02:00
Harald Welte fd2a426395 l1ctl: Drop frames where L1 indicates they have bit errors 2010-05-29 13:06:10 +02:00
Andreas.Eversberg 9359a91504 Moved layer 1 <-> layer 2 interface from main.c to a seperate file of
liblayer23. Other applications using liblayer23 don't need to re-implement it.

Messages from layer 1 are not freed in layer2_read() anymore. They will be
freed by the upper layers. The layers may also decide to queue or to forward
the messages. In general: A message is always discarded by the message handler
and not after calling the message handler.
2010-05-22 10:46:20 +00:00
Harald Welte 89c6b9510e correct endian conversion of arfcn in tx_ph_dm_ext_req() 2010-05-20 23:48:19 +02: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 516917e836 Fixes and improvements of layer23. 2010-04-29 20:46:11 +02:00
Andreas Eversberg e91d8a934c l1ctl_tx_ccch_req() now uses arfcn as parameter.
The arfcn variable is renamed to test_arfcn.

I think that arfcn and other frequency parameters should be stored at
the process which sets it and using it when calling l1ctl_tx_ccch_req().
2010-04-25 17:31:35 +02:00
Harald Welte 13a0a05887 layer23: signal the L1CTL DONE flag at the end of a power measurement 2010-04-05 22:21:36 +08:00
Harald Welte 1fa7930eea layer23: Introduce signals to indicate PM RES and L1 RESET to app 2010-04-05 21:30:00 +08:00
Harald Welte db60b706cc layer23: split into liblayer23 and 'apps'
similar to the concept of having 'apps' in the firmware build process,
I'm now building the common code as liblayer23 and we have three apps
that use this library:
 layer23 - the old layer23 program
 bcch_scan - a passive bcch scanner under development
 echo_test - a test program sending large msgb's containing zero bytes
2010-04-05 21:30:00 +08:00
Harald Welte 1e4d22cb5f Implement L23-triggered L1 power measurement scan
Now layer23 can ask L1 to scan an entire range of ARFCN's and do power
measurements.  This is the first step in the cell (re)selection process.
2010-03-27 18:42:43 +08:00
Harald Welte ace2b08244 add L1CTL ECHO REQUEST code 2010-03-27 12:32:32 +08:00
Harald Welte e8a7bbffd2 layer23: convert to libosmocore logging API 2010-03-27 08:56:05 +08:00
Harald Welte 0841075df2 layer23: remove debug.c and thus last remnants of libosmocom 2010-03-27 00:07:46 +08:00
Harald Welte bee63154c4 L1A/L23 interface (L1CTL) cleanup
* introduce a new 'l1ctl_hdr' structure common to all messages
  on this interface
* use struct l1ctl_hdr in both the firmware and layer23
* add a new L1CTL_PM_REQ request for performing layer23-initiated
  power measurements (firmware does not implement them yet)
2010-03-21 12:57:28 +08:00
Harald Welte 07446ab098 layer23: fill in signal level and dBm fields of gsmtap 2010-03-09 23:05:58 +01:00
Harald Welte 97c8b6f33b start to use libosmocore within the firmware
* remove linuxlist.h copy and use osmocore
 * don't put 'struct gsm_time' into l1ctl packets
 * include rx_level and snr for each burst in l1ctl
 * properly build libosmocore.a for target
 * move gsmtime functions into libosmocore
 * move ctype.h to standard location
2010-03-07 20:56:12 +01:00
Harald Welte 582aec803c layer23: GSMTAP update (gsmtap for uplink, DCCH and ACCH)
* use GSMTAP for uplink frames (generated by layer23; sent to L1)
* only use GSMTAP if the user specifies the '-i dstip' arguments
* properly encode the GSMTAP channel type
* requires GSMTAP protocol version 0x02 (see next commit for wireshark patch)
2010-03-04 15:43:45 +01:00
Harald Welte d4e118a7a0 Rename 'layer2' program to 'layer23' program 2010-03-03 14:25:21 +01:00