[srslte-users] srslte_sss_synch_N_id_1

Anderson, Douglas J. danderson at its.bldrdoc.gov
Tue Jun 7 18:35:21 UTC 2016


Hi all,

I'm looking at the function srslte_sss_synch_N_id_1:

https://github.com/srsLTE/srsLTE/blob/master/srslte/lib/sync/sss.c#L140

/** Returns the N_id_1 value based on the m0 and m1 values */
int srslte_sss_synch_N_id_1(srslte_sss_synch_t *q, uint32_t m0, uint32_t m1) {
  if (m0==m1 || m0 > 29 || m1 > 29) {
    return SRSLTE_ERROR;
  }
  int N_id_1;
  if (m1 > m0) {
    N_id_1 = q->N_id_1_table[m0][m1 - 1];
  } else {
    N_id_1 = q->N_id_1_table[m1][m0 - 1];
  }
  return N_id_1;
}

I'm using it to evaluate a capture from a cell with id 89, which should have N_id_1 of 29. According to Table 6.11.2.1-1 in the LTE specs, this should have a m0/m1 of 29 and 30, which is what your fn srslte_sss_synch_m0m1_partial is returning. But then sss_synch_N_id_1 returns SRSLTE_ERROR because of the value "30". From what I can tell, 30 should be a valid value.

With the following change, all your tests still pass, and I was able to get the cell ID and decode the MIB from my capture.

diff --git a/srslte/lib/sync/sss.c b/srslte/lib/sync/sss.c
index 771c275..cb21493 100644
--- a/srslte/lib/sync/sss.c
+++ b/srslte/lib/sync/sss.c
@@ -139,7 +139,7 @@ uint32_t srslte_sss_synch_subframe(uint32_t m0, uint32_t m1) {

 /** Returns the N_id_1 value based on the m0 and m1 values */
 int srslte_sss_synch_N_id_1(srslte_sss_synch_t *q, uint32_t m0, uint32_t m1) {
-  if (m0==m1 || m0 > 29 || m1 > 29) {
+  if (m0==m1 || m0 > 30 || m1 > 30) {
     return SRSLTE_ERROR;
   }
   int N_id_1;
If this looks good and I can create a pull request. If I'm misunderstanding something, please let me know.

Thanks!
-Doug

Douglas Anderson | Intern
DOC/NTIA/ITS.M | 325 Broadway St., Boulder, CO 80305 | P: 303 497 3582
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.softwareradiosystems.com/pipermail/srslte-users/attachments/20160607/15f385bb/attachment.html>


More information about the srslte-users mailing list