nrarfcn: Fix dl2ssb for bands with exceptions and non-contiguous allowed GSCN
Joanne reports that for N79 and DL NR ARFCN 720000 dl2ssb returns that same 720000 and a phone cannot connect to the base station. In contrast Amarisoft lteenb chooses SSB NR ARFCN = 720288 for the above setup and the phone connects ok. The problem turns out to be that in b8065120 (nrarfcn: New package to do computations with NR bands, frequencies and NR-ARFCN numbers.) I missed that the table for Applicable SS raster entries besides GSCN range for each band also specifies conditions for which particular GSCNs are allowed to be used inside that range. For example for N79 it is only GSCNs that are multiple of 16: https://github.com/blevic/nrarfcn/blob/7ece6a11/nrarfcn/tables/applicable_ss_raster_fr1.py#L60 Besides missing the "multiple of" condition, I also missed exceptional note conditions where instead of providing a range TS 38.104 specifies particular set of allowed GSCNs. For example for N39 and SCS=15 kHz only the following set of GSCNs is allowed to be used for SSB: {4707, 4715, 4718, 4729, 4732, 4743, 4747, 4754, 4761, 4768, 4772, 4782, 4786, 4793} https://github.com/blevic/nrarfcn/blob/7ece6a11/nrarfcn/tables/applicable_ss_raster_fr1.py#L39 https://github.com/blevic/nrarfcn/blob/7ece6a11/nrarfcn/tables/applicable_ss_raster_fr1.py#L13 -> Fix SSB calculation logic to take all that into account. This fixes N79 case and also highlights previous problems in our tests for above-mentioned n39 and for "multiple of" and "exceptional" cases in FR2. Also add explicit test for N77 because we use that band in the ORS. /reported-by @jhuge /reported-on nexedi/slapos!1729 (comment 227244)
Showing
Please register or sign in to comment