Bug in frequency list generation of libosmocore

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Dieter Spaar spaar at mirider.augusta.de
Mon Aug 22 14:53:15 UTC 2011


Hello,

appended is another patch for fixing a bug in the calculation of the
frequency lists. This time the patch is for the "Range 256 format".
The problem is that the operand for the "smod" operation might be
negative, in this case the simplified version won't work as expected.

In the patch I introduced a separate function for "smod" which takes
care of the sign. I have not yet checked if the other formats are also
affected, this would be the case if the "smod" operand can be negative.

There might be other solutions to fix the problem without the need
for a separate function, however I have not thought further about it.

A test vector is the following frequency list ("Range 256 format",
first byte is the length):

  09 8b 1c 83 8c 15 ef 02 2d 30

The correct ARFCNs are

  569 571 576 578 586 608 712 715 719

The uncorrected version would instead return:

  444 457 460 464 569 576 578 586 608

This means four ARFCNs are wrong which will cause problems if for
example the frequency list contains the ARFCNs for hopping.

Best regards,
  Dieter

Dieter Spaar, Germany                           spaar at mirider.augusta.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2nd_patch_frequ_list
Type: application/octet-stream
Size: 5389 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20110822/bc44e1be/attachment.obj>


More information about the baseband-devel mailing list