Commit Graph

25 Commits

Author SHA1 Message Date
Martin Hauke 1f7a2ab5d3 Fix common misspellings and typos
Change-Id: I962b42871693f33b1054d43d195817e9cd84bb64
2019-10-17 08:07:39 +00:00
Vadim Yanitskiy a49b63ce5a l1ctl_proto.h: extend ccch_mode enum with CBCH
According to GSM TS 05.02, there are two ways to enable CBCH:

  a) replace sub-slot number 2 of CCCH+SDCCH/4 (comb. V),
  b) replace sub-slot number 2 of SDCCH/8 (comb. VII).

Unlike SDCCH/8 (case b), CCCH+SDCCH/4 can be allocated on TS0
only, and shall not use frequency hopping. This means that
implementing CBCH support on SDCCH/8 would require much more
efforts than on combined CCCH+SDCCH/4, as in last case CBCH
messages can be received without the need to switch from
idle to dedicated mode.

This change introduces a new ccch_mode item, which should be
used by the higher layers to indicate presence of CBCH channel
on C0/TS0, so the PHY would enable decoding of CBCH messages
on CCCH+SDCCH/4 (case a) in idle mode.

Regarding to CBCH on SDCCH/8 (case b), it makes sense to
extend the 'l1ctl_dm_est_req', so it would be handled in
dedicated mode on request from the higher layers.

Change-Id: Ia94ebf22a2ec439dfe1f31d703b832ae57b48ef2
2018-10-03 08:37:11 +00:00
Max 1a35cc801d cleanup some compile warnings 2015-12-31 14:06:03 +01:00
Harald Welte 73a809e57b Tell L1CTL_FBSB_REQ the expected received signal level
As Dieter points out, this drastically improves the resiliance to high
receive levels on the C155.  We cannot blindly assume a received signal
level of -85 dBm if the BTS is 2m away and we actually receive -40 dBm.

This patch extends the L1CTL_FBSB_REQ data structure in layer 1 with the
respective field, as well as the l1ctl_tx_fbsb_req() API function called
from the various layer23 apps.

"mobile" and "bcch_scan" already did a PM request and thus know the
expected signal power.  "ccch_scan" and "cbch_sniff" apparently don't
do, so the -85 dBm constant is now hardcoded into the host-side source
code there, and should probably be fixed in a follow-up patch.
2012-11-20 10:13:44 +01:00
Steve Markgraf 978ec28b71 firmware: add missing includes
This fixes all 'implicit-function-declaration'-warnings.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-12 23:43:05 +01:00
Steve Markgraf ff82113350 fw/layer1/fbsb: fix newline in a printf()-call
Found by clang:
warning: unknown escape sequence '\m'

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-31 21:55:01 +02:00
Andreas Eversberg 065b6e35a3 [rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gain
rffe_compute_gain() is the new name for rffe_set_gain(). I needed to change
this, to solve the name collision with the rffe_set_gain() function, which
actually sets the absolute gain.

rffe_get_gain() will now read the absolute gain which has been computed by
rffe_compute_gain() or set by rffe_set_gain().
2011-07-17 09:27:35 +02:00
Pablo Neira Ayuso ade79a0083 src: use new libosmogsm and include/osmocom/[gsm|core] path to headers
This patch changes include paths to get osmocom-bb working with
the current libosmocore tree.

Among all these renames, you can notice several tweaks that I
added on purpose, and that require some explanation, they are:

* hexdump() in osmocon.c and osmoload.c has been renamed to avoid
clashing with hexdump() defined in libosmocore.

* gsmmap now depends on libosmogsm. Actually I had to cleanup
Makefile.am because I was experiencing weird linking problems,
probably due to a bug in the autotools. With the change included
in this patch, I got it compiled and linked here correctly.

This patch has been tested with the phone Motorola C123 and the
following images files:

* firmware/board/compal_e88/hello_world.compalram.bin
* firmware/board/compal_e88/layer1.compalram.bin

Using the osmocon, bcch_scan and mobile tools.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-04-26 02:55:30 +02:00
Andreas Eversberg 937023be6e fw/layer1: Adding TAO loop to correct TPU window offset
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-03-20 14:59:16 +01:00
Steve Markgraf 18dba362c0 target/fw/layer1: correctly initialize afc_retries
Otherwise, when it reached AFC_RETRY_COUNT, no new FB0 tasks
were scheduled, and you needed to restart the phone in order to
successfully sync to a cell

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-10-25 20:59:24 +02:00
Sylvain Munaut 68c40addf7 fw/layer1: Convert primitives to use common DSP/TPU scenario ending
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17 20:52:40 +02:00
Sylvain Munaut f06d54ed6f 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>
2010-09-17 20:52:40 +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 1453c43202 layer1/tpu_window: Add experimental support for TS != 0
This is flawed, but allows testing ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-28 21:40:01 +02:00
Harald Welte 542086b200 [layer1] Activate AGC implementation
The target input level at the ABB ADC / DSP baseband downlink path
is just an estimate and might have to change
2010-06-25 16:39:01 +02:00
Harald Welte 806da1525b [layer1] use __attribute__ ((constructor)) for completion initializers 2010-06-24 13:30:56 +02: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 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 86074fce2e [layer1] FBSB: abort FB0 acquisition after 30 failing attempts
This should remove the 'endless FB0 loop' when the DSP detects a FB
where there really is none, and we drive the AFC DAC to its maximum
without ever getting the frequency offset below our threshold.
2010-06-20 17:28:21 +02:00
Harald Welte c1168aaec2 [layer1] FBSB: re-try FB0/FB1 request up to 3 times
So far, we have aborted our FB acquisition if we didn't detect a
Frequency Burst in the first period of 12 TDMA timeslots.  However,
this turns out to be giving up a bit too quickly.  We now re-try
this three times before giving up, which hopefully gives better
results.
2010-06-20 17:28:21 +02:00
Harald Welte cdebf0a6b3 layer1: disable FB0/FB1 SNR thresholds for now
they have caused more problems than they solve (i.e. we didn't
properly find many cells anymore)
2010-05-29 12:02:02 +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
Sylvain Munaut 2afc002e12 fw/layer1: Encapsulate mframe scheduler function better
There was some code meddling with mf_tasks directly. This is
fine if it's just setting/clearing a bit but since we're
gonna need some 'cleverness' into when to activate what to prevent
conflict, it's better to abstract that logic.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-28 10:17:04 +02:00
Harald Welte 5f751d3db8 layer1: move FB and SB detection into prim_fbsb.c 2010-04-09 21:32:56 +02:00