Commit Graph

3014 Commits

Author SHA1 Message Date
Vadim Yanitskiy f73db50f6b trxcon: rename 'enum trx_lchan_type' and its items
Change-Id: I76a7d9fed3d6ab47725fceb803aa16ddbfd2e1a2
Related: OS#5599, OS#3761
2022-07-09 23:56:18 +07:00
Vadim Yanitskiy 19ad5c9256 trxcon: remove '\brief' marker from the comments
This marker is not required to be present in Doxygen comments.

Change-Id: If793037e2b2bc9b708617867a4d4ddb0fa2f1ddb
2022-07-04 17:41:09 +07:00
Vadim Yanitskiy 259314abae trxcon: group *.c files into 'src' directory
Change-Id: I1a3703e48507cd51cd8198f13b993f54c44bc41e
Related: OS#5599, OS#3761
2022-07-04 17:41:09 +07:00
Vadim Yanitskiy b7335dfe79 trxcon: group header files into 'include/osmocom/bb/trxcon'
This is the first step towards the goal of moving the scheduler
into a separate library.

Change-Id: Ifa6137c239c215a3d323213ee74d34b419622be4
Related: OS#5599, OS#3761
2022-07-02 19:02:49 +07:00
Vadim Yanitskiy 57ce62f4bc trxcon: Makefile.am: fix make {dist,distcheck} targets
File '.version' must be also listed in EXTRA_DIST, otherwise I get:

  echo 0.0.0 > ../../.version-t && mv ../../.version-t ../../.version
  /bin/sh: line 1: ../../.version-t: Permission denied

Change-Id: I65f7c505f5a231bab114c45f5fdd7421601dfbc0
Related: OS#5599, OS#3761
2022-07-01 19:34:21 +07:00
Vadim Yanitskiy d75cc116e2 trxcon: Makefile.am: move versioning magic to the bottom
This is a more usual place for manually added targets.

Change-Id: I69892f8689fd7062ca26b6f1337c972b11b1906e
Related: OS#5599, OS#3761
2022-07-01 19:19:23 +07:00
Harald Welte 58f7758379 update git URLs (git -> https; gitea)
Change-Id: Idfdfad0c32ae25311a0fc050e38429e001d0c5b7
2022-06-18 13:59:31 +02:00
Vadim Yanitskiy 095b360bc8 layer23: chantype_rsl2gsmtap() is deprecated, use chantype_rsl2gsmtap2()
Change-Id: Id54b973cec8479fc32775be260f8a9fac8f09bae
2022-05-13 23:16:42 +03:00
Vadim Yanitskiy 2ac370830f trxcon: clarify L1CTL_DM_REL_REQ related logging
In reality, trxcon does not switch back to BCCH itself.  Neither
the firmware does, so let's correct this confusing log message.

Change-Id: Iad308ad980af4caa7d7d1b358ba7288885f96e04
2022-05-13 23:16:42 +03:00
Vadim Yanitskiy 4c0c88b40d firmware/layer1: clarify L1CTL_DM_EST_REQ related logging
Change-Id: I7a7fb32eab0ab20672a47861c3b66da92bd83015
2022-05-13 23:16:39 +03:00
Vadim Yanitskiy 627e4c4f6c firmware/battery: fix -Wunused-variable in battery_compal_e88_timer_cb()
Change-Id: I3e9bbc21aec57dea84034d233a2ba1902602bdb2
2022-04-25 16:18:04 +03:00
Vadim Yanitskiy 5ef597a7e1 firmware/apps/hello_world: remove unused test[] buffer
Change-Id: I20d41111d6f611202dcefada8091ccda0cc51dad
2022-04-25 16:17:28 +03:00
Vadim Yanitskiy 569ea1e9d2 firmware/apps/layer1: remove unused 'atrLength' in main()
Change-Id: I4bb1dae28c07218e8b801bc162b82d03fd083bad
2022-04-25 16:17:28 +03:00
Vadim Yanitskiy 17d6073e72 firmware/apps/rssi: remove redundant block in handle_pm()
Below in the common path for both true and false branches we do
have a conditional block setting ARFCN_UPLINK if uplink is true.

Change-Id: If3adc5d1f11d3f43cb4c17bdb355b160ab61dc56
2022-04-25 16:17:28 +03:00
Vadim Yanitskiy 8ecc266d8d firmware/apps/rssi: fix -Wmaybe-uninitialized in handle_pm()
In this function we have the following condition:

  if (pm_mode == PM_IDLE && (mode == MODE_MAIN || mode == MODE_SPECTRUM))

so the 'mode' can be either MODE_MAIN or MODE_SPECTRUM.  Still,
GCC throws false-positive warnings that 'a' and 'e' may be used
uninitialized in handle_pm().

Let's eliminate these warnings by using 'if-else' statement.

Change-Id: I86d241c41d4de135f4cd79f56f7fdd18696b7890
2022-04-25 16:14:35 +03:00
Vadim Yanitskiy 3f49d7a0fa firmware/layer1: fix unused variable 'l1h' [-Wunused-variable]
Change-Id: If8c3da3908c1dab7a93e69daee13426f9bdbccad
2022-04-25 16:14:21 +03:00
Vadim Yanitskiy 80ef655d00 firmware/layer1: fix 'MFNONE' not handled in switch [-Wswitch]
Change-Id: I4c38599b29de73e26e9b603564f63b88e65e16b9
2022-04-21 15:03:11 +03:00
Vadim Yanitskiy a6fad425db firmware/layer1: fix -Wtype-limits in chan_nr2mf_task_mask()
arm-none-eabi-gcc versions 11.2.0 shows the following warning:

  layer1/l23_api.c: In function 'chan_nr2mf_task_mask':
  layer1/l23_api.c:123:25: warning: comparison is always true due to
                                    limited range of data type [-Wtype-limits]
    123 |         if (second_task >= 0) /* optional */

Let's get rid of {master,second}_task by using a macro.

Change-Id: I00bd3e11a14f10b78fd91f0e6915ca4fc0817d6a
2022-04-21 15:03:11 +03:00
Vadim Yanitskiy 859485c681 firmware/abb: fix missing 'break' in twl3025_unit_enable()
Change-Id: I8224f8c2dba6891ef3fffcb6eed6572d35132d2e
2022-04-21 15:03:11 +03:00
Oliver Smith e634dec487 mobile/subscriber.c: fix auth resp with test sim
Do not send a dummy authentication response with the test sim.

Fixes: 39dc9c46 ("mobile/subscriber.c: consider GSM_SIM_TYPE_SAP too")
Change-Id: I0ee910c171d383fb2cdcaf5eb54eafe18da3430b
2022-02-23 17:59:32 +01: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
Harald Welte da2793a216 gprsdecode: Don't leak memory in gsmtap_sendmsg()
Change-Id: Ib9e439ad6f24c573abb6da1523713a669898d23f
Depends: libosmocore I106b09f2a49bf24ce0e8d11fd4d4ee93e9cafdf5
Related: OS#5329
2021-11-25 15:40:02 +01:00
Philipp Maier 0af84f408d logging: use meaningful default loglevels
Some logging categories use LOGL_INFO or even LOGL_DEBUG. Lets set those
to LOGL_NOTICE to have a less crowded default log output.

Change-Id: I3faefccae2218b17bd942bc2afac7d8e515897b7
Related: OS#2577
2021-11-15 17:12:22 +00:00
Harald Welte 3e8518a44b layer23/osmocon: require libosmocore >= 1.5.0 in configure.ac
This should give a meaningful error message if people use too old
libosmocore.

Change-Id: I7d9950b5eaa836ed1ac86045bd5364fed221e369
2021-10-16 10:55:33 +02:00
Harald Welte 98219554b6 262-10 is "DB Netz AG" and not "DB Systel"
Change-Id: Idbce4bade4305fabbedcf15c5bd9253fbb371744
2021-10-08 05:46:57 +00:00
Vadim Yanitskiy 00b70983a5 trx_toolkit: support setting artificial delay for TRXC
Change-Id: Idb1ef445bc14a6312f08a83ecacc3a938b0e1d70
Related: OS#5245
2021-10-03 14:13:51 +06:00
Vadim Yanitskiy 2308b58250 trxcon/scheduler: unify and enrich decoding error messages
Regarding the removal of burst_mask2str() from the TCH/H handler,
it does not make sense to print it because the mask is already
shifted and an earlier logging should already contain this info.

Change-Id: I42d20e2da73c21ca366dd246244cd716c8ccb459
Related: OS#4823
2021-07-04 20:02:53 +02:00
Vadim Yanitskiy f8bc28505f trxcon/trx_if: send NOPE indications if there is no burst
In a typical setup operating on the real radio interface, it's
the duty of the transceiver (e.g. osmo-trx) to send NOPE.ind to
the L1 implementation (e.g. osmo-bts-trx).  However, in a
virtual environment for ttcn3-bts-test we use a fake transceiver,
which due to its simplicity cannot send NOPE indications itself.

The lack of queues and buffering does not allow us to implement
NOPE indications in fake_trx.py, so the easiest approach is to
generate them from trxcon.  Send TRXD PDUs without the burst bits,
and fake_trx.py will tranform them info NOPE.ind for us.

Change-Id: I1c7f1315b8ef44f651efd6a22fb5b854f65c0946
Related: SYS#5313, OS#1569
2021-06-16 15:55:38 +02:00
Vadim Yanitskiy 529d54b13a trxcon/scheduler: introduce and use struct sched_burst_req
Similar to what we do in osmo-bts-trx, group everything related to
an Uplink burst into a structure.  Pass a pointer to this structure
to the logical channel handlers.  This makes the code easier to read,
and facilitates sending NOPE indications to the transceiver
(will be introduced in the upcoming patch).

Get rid of sched_trx_handle_tx_burst(), and instead just call
sched_trx_a5_burst_enc() directly from sched_frame_clck_cb().

Change-Id: Id45b27180c233fdc42ae1ef0b195554dd299a056
Related: SYS#5313, OS#1569
2021-06-16 15:55:32 +02:00
Vadim Yanitskiy c652349b4a trxcon/scheduler: cosmetic: move TDMA frame number calculation
Change-Id: I79efdfa543d37889dc6749eb25aab4e1639749c6
2021-06-16 15:05:51 +02:00
Vadim Yanitskiy e4d5bbccf9 trx_toolkit/transceiver.py: allow NOPE.ind on inactive timeslots
Change-Id: I27a3c8897cb82f6c264d34702c4ec64561bb9809
Related: SYS#5313, OS#1569
2021-06-16 15:05:40 +02: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
Vadim Yanitskiy c3c57d888e trx_toolkit: add primary/shadow indicator for TRXDv2 PDUs
Change-Id: I0a3ad4f0bda56b93e0ab8bf82b6b3758831edf60
Related: SYS#4895, OS#4941, OS#4006
2021-06-02 04:48:50 +02:00
Vadim Yanitskiy 1b7b4ec7a4 trx_toolkit: use RxMsg/TxMsg instead of TRX2L1/L12TRX
I intentionally do not use 'Downlink' and 'Uplink' terms in this project
because both MS and BTS transmit and receive on the opposite directions.
A burst coming from demodulator may be a Downlink or an Uplink burst
depending on the context, so we definitely need more precise terms.

Back then when I started to work on TRX toolkit, I decided to use the
'TRX2L1' and 'L12TRX' for receive and transmit directions respectively.
Now I find them hard to read, so let's replace them with 'Rx' and 'Tx'.

Change-Id: I688f24a3c09dd7e1cc00b5530ec26c8e8cfd8f7c
Related: OS#4006, SYS#4895
2021-05-03 20:39:10 +02:00
Vadim Yanitskiy b2349bc359 trx_toolkit/data_msg.py: remove obsolete documentation
We do have TRXC/TRXD documentation in osmo-gsm-manuals repository.
These big comments are out of sync with what we have in the manuals,
so let's better remove them to avoid maintaining docs in several places.

Change-Id: I47786cf3039f712efadc85bc4e1c3ae89e79ff25
Related: OS#4006, SYS#4895
2021-05-03 20:39:10 +02:00
Vadim Yanitskiy 87c5f2c92d trx_toolkit/data_msg.py: update entries in enum Modulation
Change-Id: Ia96b263bbb162b6c40f2cf81616118cc297299a5
Related: OS#4006, SYS#4895
2021-05-03 20:39:05 +02:00
Vadim Yanitskiy a4127f272a trx_toolkit/test_codec.py: add missing sub-test with key=0x88
Change-Id: If8e2ebedc48fecc4c54c71e40cadb0f3273602c5
2021-05-03 20:35:46 +02:00
Vadim Yanitskiy eac05ae644 trx_toolkit/ctrl_if_trx.py: fix undefined variable 'trx'
Change-Id: I5c06fa5183b4d04cbc0c68327a062b320477344c
2021-05-03 20:35:46 +02:00
Vadim Yanitskiy b988408166 trx_toolkit/fake_trx.py: use raw string notation for regex
This way there is no need to escape backslashes in regex.

Change-Id: I1b2b6675851275bd5285ffc287410535b22055ae
2021-05-03 20:35:46 +02:00
Vadim Yanitskiy bd73f0920d trx_toolkit/gsm_shared.py: s/GSM_BURST_LEN/GMSK_BURST_LEN/g
Change-Id: I7268196eb9fd822f0e7b65899e4c83c48a20ba5b
2021-04-30 22:31:40 +02:00
Vadim Yanitskiy a2618b789a trx_toolkit/trxd_proto.py: fix missing field name for codec.Spare
Change-Id: I110dbcebf86cf978f2de7275a91c48b999fade32
Fixes: I482f72fd9305c51f43a0339d03904fb693d90ac9
Related: OS#4006, SYS#4895
2021-04-30 22:31:40 +02:00
Vadim Yanitskiy 8fc13352aa trx_toolkit/trxd_proto.py: fix encoding of TRXDv0 Tx PDUs
Change-Id: I9da59f7e7c47dd1cac833839165ba05de6b18144
Related: OS#4006, SYS#4895
2021-04-30 22:31:40 +02:00
Vadim Yanitskiy e9b0d7488f trxcon: fix legacy length expectations for TRXDv0 Rx PDUs
158 is basically: 8 + 148 + 2, where the last two are padding bytes
sent by legacy TRXDv0 transceivers.  We don't need them, so do not
drop PDUs without these leggacy padding bytes.

Change-Id: I6c0734bc4669ccde2a93940c9cf50fdbbd67cb00
2021-04-29 14:33:25 +02:00
Vadim Yanitskiy 393158ac08 trx_toolkit: change coding of 'PWR' and 'SCPIR' fields
During an internal discussion, it was decided to keep field 'PWR'
as-is and move 'SCPIR' into a separate octet.  This is easier to
parse, less confusing, and would save us some CPU cycles.

Change-Id: I482f72fd9305c51f43a0339d03904fb693d90ac9
Related: OS#4006, SYS#4895
2021-04-15 21:51:11 +02:00
Vadim Yanitskiy d4900f93ee trx_toolkit: define TRXDv2 PDUs using declarative codec
Change-Id: If356d285006c0b9b57879d0499b8144eca820cab
Related: OS#4006, SYS#4895
2021-04-12 01:51:14 +02:00
Vadim Yanitskiy 7c3a566b52 trx_toolkit: define TRXDv0/v1 PDUs using declarative codec
Change-Id: I739ae5da22c603fb2cf1e84d3a79fb1a6e7343b6
Related: OS#4006, SYS#4895
2021-04-08 03:20:39 +02:00
Vadim Yanitskiy 33f456dda3 trx_toolkit: make codec.py work with EOL Python 3.5
Our build system is based on Debian 9 and EOL Python 3.5, so we have
to maintain backwards compatibility (sigh).  Some type hints moved
to comments, some had to be commented out completely.  Hopefully,
we can 'un-vandalize' the code by reverting this change once there
will be no requirement to support EOL stuff.

Change-Id: I7211cfbb7549b6e700aa3dd44464ff762fd51185
Related: OS#4006, SYS#4895
2021-04-08 03:20:39 +02:00
Vadim Yanitskiy a772337e27 trx_toolkit: check in simple declarative codec
Change-Id: I7ff46b278c59af3720ee7f3950ea5a8b2f1313e1
Related: OS#4006, SYS#4895
2021-04-08 03:20:39 +02:00
Vadim Yanitskiy b00601d7ee trx_toolkit/data_msg.py: add type hints to static methods
Change-Id: I06fd8bc7418700de40467fd63a08da2bc2abcea2
2021-04-08 03:20:39 +02:00
Vadim Yanitskiy 45cc12d665 trx_toolkit/udp_link.py: cosmetic: setblocking() takes bool
Change-Id: I9c4fa8cb7c237f3b9e34ba236b6507da5c668aee
2021-03-14 00:57:43 +01:00