diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
index cd8e94656d37b316b173d598cd5da24e51bf8341..27a494d4d33189b06938df7d521ae04b44bafa18 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
@@ -1,6 +1,24 @@
-/***********************************************************************
+/*
+ * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The OpenAirInterface Software Alliance licenses this file to You under
+ * the OAI Public License, Version 1.0  (the "License"); you may not use this file
+ * except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.openairinterface.org/?page_id=698
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *-------------------------------------------------------------------------------
+ * For more information about the OpenAirInterface (OAI) Software Alliance:
+ *      contact@openairinterface.org
+ */
 
-**********************************************************************/
 /*! \file PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
 * \brief Top-level routines for generating the NPDSCH physical channel for NB_IoT,
 * \author M. KANJ
@@ -121,8 +139,8 @@ int dlsch_modulation_NB_IoT(int32_t 				**txdataF,
 							uint8_t 				control_region_size,      // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
 							NB_IoT_DL_eNB_SIB_t      *dlsch0, //NB_IoT_eNB_NDLSCH_t
 							int 					G,						  // number of bits per subframe
-							unsigned short				npdsch_data_subframe,     // subframe index of the data table of npdsch channel (G*Nsf)  , values are between 0..Nsf  			
-							unsigned short				subframe,
+							unsigned int				npdsch_data_subframe,     // subframe index of the data table of npdsch channel (G*Nsf)  , values are between 0..Nsf  			
+							unsigned int				subframe,
 							unsigned short 			NB_IoT_RB_ID)
 {
     //uint8_t harq_pid = dlsch0->current_harq_pid;
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
index a4e12c589a119101160c10425628d8729b47bd7b..8148dfd470175a1c0aa8abd7adf458d18bf46fcc 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
@@ -1,6 +1,24 @@
-/*******************************************************************************
+/*
+ * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The OpenAirInterface Software Alliance licenses this file to You under
+ * the OAI Public License, Version 1.0  (the "License"); you may not use this file
+ * except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.openairinterface.org/?page_id=698
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *-------------------------------------------------------------------------------
+ * For more information about the OpenAirInterface (OAI) Software Alliance:
+ *      contact@openairinterface.org
+ */
 
- *******************************************************************************/
 /*! \file PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
 * \brief Routines for the scrambling procedure of the NPDSCH physical channel for NB_IoT,	 TS 36-211, V13.4.0 2017-02
 * \author M. KANJ
@@ -29,17 +47,17 @@
 #include "PHY/LTE_REFSIG/defs_NB_IoT.h"
 
 void dlsch_sib_scrambling_NB_IoT(LTE_DL_FRAME_PARMS     *frame_parms,
-							                    NB_IoT_DL_eNB_SIB_t   *dlsch, //NB_IoT_eNB_NDLSCH_t 
-							                    int                    tot_bits,        				// total number of bits to transmit
-							                    uint8_t                Nf,   						// Nf is the frame number (0..9)
-							                    uint8_t                Ns)							  // slot number (0..19)
+							                    NB_IoT_DL_eNB_SIB_t    *dlsch,
+                                  int                    tot_bits,                // total number of bits to transmit
+                                  uint16_t                Nf,              // Nf is the frame number (0..9)
+                                  uint8_t                Ns)  
 {
   int         i,j,k=0;
   uint32_t    x1,x2, s=0;
   uint8_t     *e = dlsch->e; 															//uint8_t *e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
 
-  x2 = (dlsch->si_rnti<<15) + (frame_parms->Nid_cell + 1) * ( (Nf % 61) + 1 ) ;
-
+   //x2 = (dlsch->si_rnti<<15) + (frame_parms->Nid_cell + 1) * ( (Nf % 61) + 1 ) ;
+  x2 = (dlsch->si_rnti<<14) + ((Nf%2)<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell;
   // for NPDSCH not carriying SIBs
   //x2 = (dlsch->harq_process_sib1.rnti<<14) + ((Nf%2)<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell;   //this is c_init in 36.211 Sec 10.2.3.1
   
diff --git a/openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h b/openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
index d71492b53d563e9df9e4bf8dc81bfb2578f530c6..7d718789d6839eace20ee4620200fdbca71ab62e 100644
--- a/openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+++ b/openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
@@ -115,7 +115,7 @@ void npbch_scrambling(LTE_DL_FRAME_PARMS  *frame_parms,
 void dlsch_sib_scrambling_NB_IoT(LTE_DL_FRAME_PARMS     *frame_parms,
                                   NB_IoT_DL_eNB_SIB_t    *dlsch,  //NB_IoT_eNB_NDLSCH_t
                                   int                    tot_bits,                
-                                  uint8_t                Nf,
+                                  uint16_t                Nf,
                                   uint8_t                Ns); 
 
 /*
@@ -250,15 +250,15 @@ int dlsch_modulation_NB_IoT(int32_t               **txdataF,
                             uint8_t               control_region_size,      // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
                             NB_IoT_DL_eNB_SIB_t    *dlsch0,  //NB_IoT_eNB_NDLSCH_t
                             int                   G,              // number of bits per subframe
-                            unsigned short            npdsch_data_subframe,     // subframe index of the data table of npdsch channel (G*Nsf)  , values are between 0..Nsf        
-                            unsigned short            subframe,
+                            unsigned int            npdsch_data_subframe,     // subframe index of the data table of npdsch channel (G*Nsf)  , values are between 0..Nsf        
+                            unsigned int            subframe,
                             unsigned short        NB_IoT_RB_ID);
 
 int32_t dlsch_encoding_NB_IoT(unsigned char              *a,
                               NB_IoT_DL_eNB_SIB_t        *dlsch, // NB_IoT_eNB_NDLSCH_t
                               uint8_t                    Nsf,        // number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
                               unsigned int               G,
-                              uint8_t option);         // G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
+                              uint8_t                    option);         // G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
  
 
 void rx_ulsch_NB_IoT(PHY_VARS_eNB_NB_IoT      *phy_vars_eNB,
diff --git a/openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c b/openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
index ce37a949b63094ccfb74791e61c430f4df405ec0..60ba8fe22caac2b286b796257476d565359a8d5f 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
@@ -246,10 +246,10 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
         printf("\n");*/
       }
 
-  /*   if(frame%64==1 && subframe ==0)
+     if(frame%64==1 && subframe ==0)
       {     
-       do_SIB1_NB_IoT_x(0,0,carrier,208,92,1,3584,7,2,hyper_frame);
-      }*/
+       do_SIB1_NB_IoT_x(0,0,carrier,208,92,1,3584,8,2,hyper_frame);
+      }
       
 /////////////////////////////////////////////////////////////////////////////////
   //uint8_t      *control_region_size = get_NB_IoT_SIB1_eutracontrolregionsize();
@@ -307,7 +307,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
     }
 
 
-    ///////////////////////////////////////////////////////// SIB1 ////////////////////////////////////////////////////////
+      ///////////////////////////////////////////////////////// SIB1 ////////////////////////////////////
     if((subframe == 4)  && (frame%2==0) && (frame%32<16) )   ////if((subframe != 0)  && (subframe != 4) && (subframe != 9) ) 
     {
         if( frame%32 == 0 )
@@ -319,9 +319,9 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
                                   1);                   //////////// G*2
         
         
-            dlsch_sib_scrambling_NB_IoT(fp,                    // is called only in subframe 4
+             dlsch_sib_scrambling_NB_IoT(fp,
                                          sib1,
-                                         1888,            //////   total_bits
+                                         1888,
                                          frame,
                                          subframe*2);
         }
@@ -332,12 +332,12 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
                                 3,                          // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
                                 sib1,
                                 236,                       // number of bits per subframe
-                               ((frame%32)/2),///npdsch_data_subframe, data per subframe//subframe index of the data table of npdsch channel (G*Nsf) ((frame%32)/2),values are between 0..Nsf        
-                                4,
+                               ((frame%32)/2),
+                               4,       
                                 RB_IoT_ID);
         
         }
-     ///////////////////////////////////////////////////////// END ////////////////////////////////////////////////////////
+        ///////////////////////////////////////////////////////// END ////////////////////////////////////////////////////////
         
   //////////////////////////////////////////////////// SIB23 ////////////////////////////////////////////////////////////////////////
   if( (subframe >0) && (subframe !=5) && (With_NSSS == 0) && (frame%2==1) && (frame%64<16) )   ////if((subframe != 0)  && (subframe != 4) && (subframe != 9) ) 
@@ -376,7 +376,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
                                 AMP,
                                 fp,
                                 3,                          // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
-                                sib1,
+                                sib23,
                                 236,                       // number of bits per subframe
                                (subframe-2),///npdsch_data_subframe, data per subframe//subframe index of the data table of npdsch channel (G*Nsf) ((frame%32)/2),values are between 0..Nsf        
                                 subframe,
diff --git a/openair2/LAYER2/MAC/config_NB_IoT.c b/openair2/LAYER2/MAC/config_NB_IoT.c
index 57163f8e1e69432467e4efd48a8afc05f5ec3b41..a2e3efdcaa432ab0fd810302636178bce802f1f8 100644
--- a/openair2/LAYER2/MAC/config_NB_IoT.c
+++ b/openair2/LAYER2/MAC/config_NB_IoT.c
@@ -580,7 +580,7 @@ void rrc_mac_config_req_NB_IoT(
 
     //return 0;
 
-      init_mac_NB_IoT(mac_inst);
+      //init_mac_NB_IoT(mac_inst);
 
       LOG_I(MAC,"[NB-IoT] Init_MAC done\n");
 
diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c b/openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c
index db740d78b32c69ffaa8e434fb320f2e4516c9078..2121e28d7dc906d7904bcdfb4d9d9f6b7e12e5da 100644
--- a/openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c
+++ b/openair2/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c
@@ -139,7 +139,7 @@ uint8_t do_MIB_NB_IoT(
 
   //decide how to set it
   mib_NB_IoT->message.schedulingInfoSIB1_r13 =10; //see TS 36.213-->tables 16.4.1.3-3 ecc...  // to make 8 repetitions
-  mib_NB_IoT->message.systemInfoValueTag_r13= frame%16;
+  mib_NB_IoT->message.systemInfoValueTag_r13= 0;
   mib_NB_IoT->message.ab_Enabled_r13 = 0;
 
   //to be decided
@@ -192,6 +192,9 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
    eutraControlRegionSize = CALLOC(1,sizeof(long));
   long systemInfoValueTagSI = 0;
 
+  long *offset=NULL; //this parameter should be set only if we are considering in-band operating mode (samePCI or differentPCI)
+  offset = CALLOC(1,sizeof(long));
+
   memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_NB_t));
   bcch_message->message.present = BCCH_DL_SCH_MessageType_NB_PR_c1;
   bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13;
@@ -359,9 +362,11 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
     exit(-1);
   }
 
+  //FIXME which value chose for the following parameter
+  *offset =1;
   //FIXME which value chose for the following parameter
   (*sib1_NB_IoT)->si_WindowLength_r13=SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
-  (*sib1_NB_IoT)->si_RadioFrameOffset_r13= 0;
+  (*sib1_NB_IoT)->si_RadioFrameOffset_r13=offset;
 
   /////optional parameters, decide to use at future
   /*
@@ -401,14 +406,13 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
 /*do_SIB1_NB*/
 uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
         rrc_eNB_carrier_data_NB_IoT_t *carrier,
-        uint16_t mcc, //208
-        uint16_t mnc, //92
-        uint16_t tac, //1
-        uint32_t cell_identity, //3584
-        uint16_t band,  // 7
-        uint16_t mnc_digit_length, //2
-        uint32_t frame
-               )
+        uint16_t mcc,
+        uint16_t mnc,
+        uint16_t tac,
+        uint32_t cell_identity,
+        uint16_t band,
+        uint16_t mnc_digit_length,
+        uint32_t frame)
 {
   BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT);
   SystemInformationBlockType1_NB_t **sib1_NB_IoT= &(carrier->sib1_NB_IoT);
@@ -430,6 +434,9 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
    eutraControlRegionSize = CALLOC(1,sizeof(long));
   long systemInfoValueTagSI = 0;
 
+  long *offset=NULL; //this parameter should be set only if we are considering in-band operating mode (samePCI or differentPCI)
+  offset = CALLOC(1,sizeof(long));
+
   memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_NB_t));
   bcch_message->message.present = BCCH_DL_SCH_MessageType_NB_PR_c1;
   bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13;
@@ -597,9 +604,11 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
     exit(-1);
   }
 */
+  //FIXME which value chose for the following parameter
+  *offset =1;
   //FIXME which value chose for the following parameter
   (*sib1_NB_IoT)->si_WindowLength_r13=SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
-  (*sib1_NB_IoT)->si_RadioFrameOffset_r13= 0;
+  (*sib1_NB_IoT)->si_RadioFrameOffset_r13=offset;
 
   /////optional parameters, decide to use at future
   /*