Commit Graph

28 Commits

Author SHA1 Message Date
Vadim Yanitskiy c9e579cea1 layer23: always check return value of rsl_dec_chan_nr()
The rsl_dec_chan_nr() may fail to decode RSL channel number, so
variables ch_type/chan_ss/chan_ts would remain uninitialized.

Change-Id: I9ab18bdaf41a29fcd32a7060668ef9db07b8cf7e
Related: OS#5599
2022-11-29 02:15:39 +07:00
Vadim Yanitskiy 136cf481c7 layer23: fix -Werror=old-style-definition problems
Change-Id: I0187acb02de6fd22ccc86c112640caa8aa3fa2bc
2022-11-05 19:18:42 +07:00
Oliver Smith 1741372556 treewide: remove FSF address
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.

Change-Id: I73be012c01c0108fb6951dbff91d50eb19b40c51
2021-12-14 12:52:04 +00:00
Vadim Yanitskiy 825716851e host/layer23/ccch_scan: skip CCCH frames with wrong length
It's not clear why do we get frames with unexpected length, but
we definitely should not crash.  Just log and ignore them.

Change-Id: I85392becbffdb3ba7365decfd8f3769abe3c02c7
Related: OS#5171
2021-06-09 22:51:07 +02:00
Martin Hauke 1f7a2ab5d3 Fix common misspellings and typos
Change-Id: I962b42871693f33b1054d43d195817e9cd84bb64
2019-10-17 08:07:39 +00:00
Vadim Yanitskiy 8b8485680a layer23/app_ccch_scan.c: omit dummy (fill) frames
In some conditions it's required to maintain continuous burst
transmission (e.g. on C0). If there is nothing to transmit at
a given moment, either a LAPDm func=UI fill frame,
or a "dummy" Paging Request is used.

In case of 'ccch_scan' application, they are useless.
Let's detect and omit them.

Change-Id: I6ccecb1a78bdac3e467bdc14b7a01afbe17aa53c
2018-10-02 01:54:24 +07:00
Vadim Yanitskiy bc391c54f3 layer23/app_ccch_scan.c: hexdump unhandled PCH/AGCH messages
Change-Id: I81d6558525e7f68c4fcd6c6272224d58532e2efb
2018-10-02 01:29:09 +07:00
Vadim Yanitskiy 5541149bc7 layer23/app_ccch_scan.c: print pdisc in error message
Change-Id: Ic88f5d4b263610a376bbb9729e882097393ef2be
2018-10-02 01:22:20 +07:00
Vadim Yanitskiy dfd357985e layer23/app_ccch_scan.c: clean up System Information handling
Change-Id: I8c2594920fcad8a3e346b938bd0c20409f4d01c9
2018-10-02 01:12:32 +07:00
Vadim Yanitskiy 6a50ae922b layer23/app_ccch_scan.c: print 'new-line' char locally
Change-Id: I03da1329501ce9b3c5cca49a1654ba68e9bb6a98
2018-10-02 00:36:20 +07:00
Vadim Yanitskiy f7ea747548 layer23/app_ccch_scan.c: clean up copy-pasted code
By definition, 'ccch_scan' application is intended to be used for
monitoring of CCCH channels on C0/TS0. There is no need to send
RACH requests, therefore there is no need to care about the
mobile allocation from SI1 message.

Most likely, this "dead" code was copy-pasted from mobile
application. Let's clean it up!

Change-Id: I7c2f47cbc825a5e5a50863d842729d3d8408b9dd
2018-10-02 00:16:40 +07: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 937005e247 layer23/ccch_scan: Replace fprintf() with LOGP() and print SI-id
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-22 18:34:58 +01:00
Steve Markgraf 50d58f9dd9 layer23/ccch_scan: Print Paging Requests of type 3
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-22 18:10:23 +01:00
Steve Markgraf 4300e89ba8 layer23/ccch_scan: Print channel type of correct TMSI for Paging Request Type 2
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-22 18:01:06 +01:00
Andreas Eversberg 8f77cbecb4 host/layer23: Removed local copy of LAPDm, using libosmocore instad
Since libosmocore already has LAPDm implementation, we don't need the
local copy of LAPDm code anymore.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Harald Welte 5d65fcba6c add l1ctl_proto.h #includes to lots of files
this is apparently a result of no longer including it indirectly via lapdm.h
2011-06-22 23:08:55 +02:00
Pablo Neira Ayuso 404f634406 src: use namespace prefix osmo_signal*
Summary of changes:

s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g
2011-05-15 14:39:39 +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
Holger Hans Peter Freyther 66de91f3a8 ccch: Print paging of tyep2 2011-01-23 14:29:44 +01:00
Holger Hans Peter Freyther d1790b9940 ccch: Decode the paging1 type paging requests
Th size checks are a bit messy and I have not seen an optional
MI yet. So this code path is not tested at all.
2011-01-23 14:29:44 +01:00
Holger Hans Peter Freyther 9d90193dee ccch: Print the decoded immediate assignment again, ignore two messages
Decode the immediate assignment and print the messages as a
notice, ignore the Notification for voice group services and
use a magic number for SI 2quater that I could not find in my
version of the spec.
2011-01-23 14:29:44 +01:00
Holger Hans Peter Freyther f9a699e682 ccch: Stop using fprintf for the SI
Stop using fprintf to print the System Information number of the
data we get. For the check use LOGP with LOGL_ERROR. There is
little use in this information.
2011-01-23 14:29:44 +01:00
Holger Hans Peter Freyther 5c49b44653 ccch: Stop following assignment requests and sending LUs
Make the ccch_scan only look at the immediate assignment
but do not follow it. The old behavior was dangerous as
it could interfere with the real receiver of the channel.
2011-01-23 11:36:30 +01:00
Holger Hans Peter Freyther 84bde8f7fb ccch: Fix the cast of the frequency list 2011-01-23 11:36:30 +01:00
Holger Hans Peter Freyther a31f742a94 ccch: Remove the app_phone.c, move it to the app_ccch_scan file 2011-01-23 11:36:30 +01:00
Holger Hans Peter Freyther d97f0f2681 ccch: Add a copyright header to that file. 2011-01-23 11:36:30 +01:00
Holger Hans Peter Freyther 88eb926637 layer23: Rename layer23 to ccch_scan as discussed on the ml 2011-01-23 11:36:30 +01:00