libosmocore/tests
Vadim Yanitskiy 7790459c8e coding: fix decoding of AHS_SID_UPDATE frames (BER ~50%)
As was demonstrated in [1], there is a TCH/AHS specific problem in
libosmocoding causing unexpected BER ~50% in decoded AHS_SID_UPDATE
frames.  The reason is that A[H]S_SID_UPDATE employs quite tricky
interleaving algorithm, which is different from the algorithm used
by normal TCH/AHS speech frames or A[F]S_SID_UPDATE frames.

An AHS_SID_UPDATE frame consists of two halves (228 bits each):

  +---------+--------------------|---------+--------------------+
  | in-band |     SID marker     | in-band |     coded data     |
  +---------+--------------------|---------+--------------------+
  | 16 bits |      212 bits      | 16 bits |      212 bits      |

The first half contains coded in-band signalling data (16 bits) and
the identification marker (212 bits), which allows to detect that
it's an AHS_SID_UPDATE.  This half is carried by even bits of the
first two bursts and odd bits of the last two bursts.

The other half also contains the in-band data (16 bits), while the
remaining 212 bits contain encoded SID_UPDATE (212 bits).  This
half is carried by even bits of the last two bursts and odd bits
of the first two bursts.

Current implementation does not use odd bits of the first two
bursts at all, so buffer cB[] in gsm0503_tch_ahs_decode_dtx()
contains only 114 out of 228 bits.

This patch changes the logic, so that gsm0503_tch_ahs_decode_dtx()
would not split AHS_SID_UPDATE onto two frames anymore like its
TCH/AFS equivalent does, but attempt to deinterleave the second
half and attempt to decode the payload immediately.

Change-Id: I8686d895e96fa0e606c1898b6574cc80a8f46983
Related: [1] I434157e2091a306c039123cea08d84bd8533c937
Related: SYS#5853
2022-05-25 13:34:31 +00:00
..
a5 tests: a5_test: Print wrong buffer correctly on error 2018-05-16 21:13:58 +02:00
abis rsl: Fix tlv_parse of IPAC_DLCX_IND message 2022-04-05 17:32:41 +02:00
auth Use define for key buffers 2018-12-20 09:51:02 +00:00
base64 base64: reformat using Lindent to conform to our coding style 2021-09-21 19:57:56 +00:00
bitgen bitXXgen: add osmo_loadXXbe_ext_2() to get right-adjusted values 2020-09-14 11:53:46 +00:00
bits tests: bitrev_test: Fix dynamic-stack-buffer-overflow 2018-05-16 17:10:33 +02:00
bitvec bitvec_read_field(): fix incorrect bit-shift issue found by UBSan 2021-11-18 13:11:20 +00:00
bsslap bssmap_le/bsslap tests: We must use %td for ptrdiff_t printing 2020-10-09 09:55:53 +02:00
bssmap_le bssmap_le: support additional IEs in Perform Location Request 2022-03-22 18:38:19 +03:00
codec codec: Add functions for AMR s->d bits and d->s bits 2020-05-14 14:51:22 +02:00
coding treewide: remove FSF address 2021-12-14 12:44:03 +01:00
comp128 tests: test actual support status for auth. algo 2016-06-29 16:33:40 +00:00
context context: Add support for [per-thread] global talloc contexts 2019-08-27 13:43:31 +02:00
conv conv: add convolutional coder for AMR SID UPDATE frames 2020-03-09 13:40:27 +01:00
ctrl ctrl: Pre-calculate required size before allocating msgb 2021-06-15 16:29:44 +00:00
dtx coding: fix decoding of AHS_SID_UPDATE frames (BER ~50%) 2022-05-25 13:34:31 +00:00
endian add/clean big-endian packed structs (struct_endianess.py) 2018-12-19 18:40:03 +00:00
exec Introduce helper functions for safe fork+exec of processes 2019-12-17 13:49:28 +01:00
fr treewide: remove FSF address 2021-12-14 12:44:03 +01:00
fsm Drop use of log_set_print_filename() API inside libosmocore 2021-02-20 17:13:58 +00:00
gad add GAD coding for Location Services 2020-10-07 11:39:46 +00:00
gb ns2: message: BLOCK/BLOCK ACK allow to use a given NSVCI instead of using the nsvc nsvci 2021-10-08 05:43:46 +00:00
gea tests: gea_test: Use correct max size for key in buffer 2018-05-16 20:09:39 +02:00
gprs use osmo_init_logging2() with proper talloc ctx 2018-04-06 04:37:50 +02:00
gsm48 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm0408 gsm: Introduce helper rach_tx_integer_raw2val() 2022-04-26 17:47:57 +02:00
gsm0502 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm0808 gsm0808: Fix decoding of IE GSM0808_IE_LCS_CLIENT_TYPE 2022-03-18 17:36:46 +01:00
gsm23003 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm23236 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm29205 treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsup Drop use of log_set_print_filename() API inside libosmocore 2021-02-20 17:13:58 +00:00
i460_mux tests/*: fix control reaches end of non-void func 2021-01-21 12:13:42 +00:00
it_q tests/*: fix control reaches end of non-void func 2021-01-21 12:13:42 +00:00
iuup iuup: Submit RNL-STATUS-Initialization.ind upon rx of Init 2022-01-07 13:02:56 +00:00
kasumi gsm: kasumi: Fix dynamic-stack-buffer-overflow on out buffers not multiple of 64 bits 2018-05-17 12:13:04 +02:00
lapd treewide: remove FSF address 2021-12-14 12:44:03 +01:00
logging tests/logging: merge both logging_test_{stream,wqueue}.err 2022-01-31 16:56:09 +00:00
loggingrb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
msgb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
msgfile treewide: remove FSF address 2021-12-14 12:44:03 +01:00
oap treewide: remove FSF address 2021-12-14 12:44:03 +01:00
osmo-auc-gen osmo-auc-gen: Print RFC3310 IMS HTTP-AKA style base64 nonce/res 2021-09-21 19:57:56 +00:00
prbs Add pseudo-random bit sequence generator to libosmcoore 2017-07-10 23:42:02 +02:00
sercomm treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sim treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sms treewide: remove FSF address 2021-12-14 12:44:03 +01:00
smscb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sockaddr_str treewide: remove FSF address 2021-12-14 12:44:03 +01:00
socket add osmo_sockaddr_to_str_c(), osmo_sockaddr_to_str_buf2() 2022-01-31 15:03:53 +00:00
stats select: gather statistics for TCP connections 2021-12-23 14:52:15 +00:00
strrb treewide: remove FSF address 2021-12-14 12:44:03 +01:00
tdef treewide: remove FSF address 2021-12-14 12:44:03 +01:00
time_cc add osmo_time_cc, moved from osmo-bsc 2021-11-15 09:06:03 +00:00
timer treewide: remove FSF address 2021-12-14 12:44:03 +01:00
tlv tlv: Fix length returned by t{l16,16l}v_put 2021-03-18 14:20:35 +01:00
use_count treewide: remove FSF address 2021-12-14 12:44:03 +01:00
ussd treewide: remove FSF address 2021-12-14 12:44:03 +01:00
utils treewide: remove FSF address 2021-12-14 12:44:03 +01:00
vty treewide: remove FSF address 2021-12-14 12:44:03 +01:00
write_queue Drop use of log_set_print_filename() API inside libosmocore 2021-02-20 17:13:58 +00:00
Makefile.am tests/logging: merge both logging_test_{stream,wqueue}.err 2022-01-31 16:56:09 +00:00
atlocal.in build: make check: disable sim_test when built with --disable-pcsc 2016-11-16 16:40:44 +00:00
libsercomstub.c Embedded: add sercomm stubs 2018-01-21 19:08:05 +00:00
testsuite.at tests/logging: merge both logging_test_{stream,wqueue}.err 2022-01-31 16:56:09 +00:00