![](https://i.imgur.com/JORnn3y.png =150x)@NTUST # <font size=5>**OpenAirInterface (OAI) NB-IoT Project** </font> ###### tags: `Project` > **<font color = black>This project implements the Control Plane solution of 3GPP Rel13 NB-IoT specification and support single UE with Band28. You are welcome to share us your results by sending us your link.</font>** :::warning **Authors: Chung-Yin Ho, Chieh Chun Chen, JenRung Huang**, [Broadband Multimedia and Wireless Research Laboratory (BMW Lab.)](http://sc.et.ntust.edu.tw:30892/en/main/), [National Taiwan University of Science and Technology](https://www.ntust.edu.tw/home.php?Lang=En), Taiwan **Contact us: Prof. Ray-Guang Cheng** (E-mail: crg@gapps.ntust.edu.tw) --- <font size=4>**Outline**</font> [TOC] ::: --- ## Reference :::success - [Nokia LTEBox](https://hackmd.io/mnvf5pi5S-6v1ZqT_6Rf6w?view) ::: --- ## General Overview ### About the Project This page shows the installation guide of OAI NB-IoT Evolved Node B (eNB). You are welcome to use the system we developed and refer to our work [[IEEE INFOCOM](https://ieeexplore.ieee.org/abstract/document/8406868),[IEEE GLOBECOM](https://ieeexplore.ieee.org/abstract/document/9024650)] if you use it in your work. ### Contributors The MAC protocol, MAC-PHY FAPI/nFAPI interface, and system integration testing are contributed by BMW Lab., NTUST. The integration testing with the core network is mainly contributed by Nokia Lab. - **NTUST, Taiwan:** Chung-Yin Ho, Kai-Hsiang Hsu, Tian-Jen Liu, Bing-Zhi Hsieh, Wei-Tai Chen, Chang-Shen Liu, Jing-Wei Chen, Chieh-Chun Chen, Ting-Ann Lin, Jen-Rung Huang, Li-Ping Yu, Chin-Wei Kang, Cheng-Hsun Yang, Kuan-Cheng Lin, I-Chun Lin, Rong-Zhang Li, Chih-Ling Hsiao, Prof. Chin-Ya Huang, Prof. Ray-Guang Cheng (Email: crg@gapps.ntust.edu.tw) - **Nokia Bell Labs, France**: Bruno Mongazon-Cazavet (Email: bruno.mongazon-cazavet@nokia-bell-labs.com) --- ## Technical Document ### Publications :::info 1. Ray-Guang Cheng, Raymond Knopp, Chung-Yin Ho, Kai-Hsiang Hsu, Tian-Jen Liu, Wei-Tai Chen, Bing-Zhi Hsieh, Matthieu Kanj, Francois Taburet, Navid Nikaein, "Demo abstract—Design and implementation of an open source NB-IoT eNB," *IEEE Conference on Computer Communications (INFOCOM) Workshops*, April 2018. ([Paper](https://ieeexplore.ieee.org/abstract/document/8406868), [Video](https://www.youtube.com/watch?v=vAeMItjMO2w)) 2. Bing-Zhi Hsieh, "Uplink scheduler in narrowband Internet of things (NB-IoT) systems, Master Thesis, NTUST, July 2017. ([Thesis](https://hdl.handle.net/11296/bt4gae)) 3. Bing-Zhi Hsieh, Yu-Hsiang Chao, Ray-Guang Cheng, Navid Nikaein, "Design of a UE-specific uplink scheduler for narrowband Internet-of-Things (NB-IoT) systems," 2018 3rd International Conference on Intelligent Green Building and Smart Grid (IGBSG)*, April 2018. ([Paper](https://ieeexplore.ieee.org/abstract/document/8393573)) 4. Chin-Ya Huang∗, Chung-Ying Ho, Navid Nikaein, and Ray-Guang Cheng, “Design and prototype a virtualized 5G infrastructure supporting network slicing,” IEEE DSP Conference, ShangHai, China, Nov. 2018 ([Paper](https://ieeexplore.ieee.org/abstract/document/8631816)) 5. Chung-Yin Ho, "Implementation of an open source NB-IoT eNB," Master Thesis, NTUST, June 2019. ([Thesis](https://hdl.handle.net/11296/m989z2)) 6. Chung-Yin Ho, Ray-Guang Cheng, Jing-Wei Chen, and Chang-Sheng Liu, "Open NB-IoT network in a PC," *IEEE GLOBECOM 2019, Workshop on Emerging Technologies of Open Networks for 5G/B5G*, Dec. 2019. ([Paper](https://ieeexplore.ieee.org/abstract/document/9024650),[Video](https://www.youtube.com/watch?v=q7AatMU50D0)) 7. Chieh-Chun Chen, Ray-Guang Cheng, Chung-Yin Ho, Matthieu Kanj, Bruno Mongazon-Cazavet, Navid Nikaein, "Prototyping of open source NB-IoT network," *IEEE GLOBECOM 2020, Selected Areas in Communications Symposium: Track on Access Systems and Networks,* Dec. 2020 ([Paper](https://arxiv.org/abs/2006.02729), [Slide](https://drive.google.com/file/d/11LaLUeubEzANYvYeo98ffS33PXt3ifkF/view?usp=sharing), [Video](https://drive.google.com/u/0/uc?id=1l0QvsMulGxnfBpHR2dAz8yq5qZH5rNUu&export=download)) ::: ### Related Work :::warning #### B-COM 1. M. Kanj, V. Savaux and M. Le Guen, "A Tutorial on NB-IoT Physical Layer Design," in IEEE Communications Surveys & Tutorials, doi: 10.1109/COMST.2020.3022751.([Paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9194757)) #### [Radio Analog Micro Electronics](https://ramesrl.it) 1. G. Sciddurlo et al., "Looking at NB-IoT Over LEO Satellite Systems: Design and Evaluation of a Service-Oriented Solution," in IEEE Internet of Things Journal, vol. 9, no. 16, pp. 14952-14964, 15 Aug.15, 2022. [Paper](https://ieeexplore.ieee.org/document/9650576) 2. [NB-IoT4Space - 3GPP Narrow-Band Internet-of-Things (NB-IoT) User Sensor Integration into Satellite](https://connectivity.esa.int/projects/nbiot4space) - Contact window: Dr. Stefano Perticaroli (stefano.perticaroli@ramesrl.it) ::: ### Slides and Videos 1. Florian Kaltenberger, "[The Basics of OpenAirInterface and status of 5G-NR developments](https://www.openairinterface.org/docs/workshop/8_Fall2019Workshop-Beijing/Training/2019-12-03-KALTENBERGER-1.pdf)," Fall 2019 OpenAirInterface Workshop Beijing, Dec. 2019. 2. [OAI BMW Lab. Channel on Youtube](https://www.youtube.com/results?search_query=oai+bmwlab) 3. ChiehChun Chen, "Prototyping of Open Source NB-IoT Network," [2020 Mosaic5G Workshop](https://mosaic5g.io/workshop-2020/#program), Dec. 2020 ([Slide](https://mosaic5g.io/resources/workshop_2020/ChiehChun_m5g_nbiot.pdf), [Video](https://www.youtube.com/watch?v=kPvc9KPDoFc&t=11570s))) 4. OpenAirInterface Tutorials: [NB-IoT: UE (Quectel BC95-G) + eNB + EPC with CUPS](https://www.youtube.com/watch?v=TfN5uJrGbw8&ab_channel=OpenAirInterfaceTutorials) ## Guideline for Installing OAI NB-IoT eNB ### Software and Hardware Requirements ![](https://i.imgur.com/CwD6hZz.png) ### NB-IoT eNB Features - Frequency Domain: each carrier only requires 180KHz bandwidth (1 PRB) - Time Doamin: same as legacy LTE - Operation mode: In-band (NOTE: implementation not consider LTE signal) - Implement by Rel13 Control plan solution, and support single UE with Band28 ### Testing Step for NB-IoT eNB #### STEP 1: Build environment & NB-IoT eNB ==(Ubuntu16.04)== ```bash ### clone the eNB/UE source code $ git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ### checkout branch to tag 2020.w03 ### (the lte-softmodem we used is in the lte_build_oai file ### which does not exist in the latest develop brnach) $ cd ~/openairinterface5g $ git checkout 2020.w03 $ cd ~/openairinterface5g/cmake_targets ### build first time $ sudo ./build_oai -I ### after build -I change branch to develop-nb-iot (commit: 677bbab2) $ git checkout develop-nb-iot ### build NB-IoT eNB $ sudo ./build_oai -I --eNB -w USRP ``` #### STEP 2: Modify eNB's config file ```bash $ cp ~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band28.tm1.25PRB.usrpb210.conf ~/nbiot.conf ``` * eutra_band = 28 ; * dowlink_frequency = 780000000L ; * uplink_frequency_offset = -55000000 ; * MME ip address= "ltebox ipaddress" * eNB ip address= "your NB-IoT ip address" #### STEP 3: Run NB-IoT eNB ```bash $ cd ~/openairinterface5g/cmake_targets/lte_build_oai/build ### run the eNB by your config file (e.g. nbiot.conf) $ sudo ./lte-softmodem -O ~/nbiot.conf ``` ![](https://i.imgur.com/71FaKTu.png) ### Testing Step for UE Module ==(BC95-B28)== Testing environment setup in Eurecom with BC95-B28 ![](https://i.imgur.com/NJWWrUM.jpg) #### STEP 1: Install UELogViewer and QNavigator - UELogViewer (provided by Quectel) ![](https://i.imgur.com/rVMT2kJ.png) - QNavigator (provided by Quectel) ![](https://i.imgur.com/d2M8EVO.png) #### STEP 2: Run QNavigator 1. Connect module with main port 2. Set serial port parameter ![](https://i.imgur.com/pYstGZM.png) 3. After setup the serial port, click the "Connect to module" ![](https://i.imgur.com/ICTv9n5.png) 4. Go to QCOM to configure hte UE module by AT command ![](https://i.imgur.com/HO6Je8F.png) - When the eNB go to "got sync" - 1)Reboot the UE module AT+NRB - 2)Setting the configuration of UE(only for the first time) AT+NCONFIG = AUTOCONNECT, TRUE AT+NCONFIG = CR_0354_0388_SCRAMBLING, FALSE AT+NCONFIG = CR_0895_SI_AVOID, FALSE - 3)Lcok the frequency AT+NEARFCN=0, 9448 #### STEP 3: Run UE Logviewer 1. Connect module with debug port ![](https://i.imgur.com/fveVuwg.png) 2. Click "Connect" and select the "protocol.bin" ![](https://i.imgur.com/uT6ripr.png) 3. Use filter to analyze the message from UE side - RRC_DEBUG_ASN: - MIB/SIB1/SIB23 - RRCCOnnectionRequest/Setup/SetupComplete - NAS_DBG_NAD_MSG: - AttachRequest/Complete/Accept - Identity Request/Response - Authentication Request/Response - Security mode commasn/complete - There have a lot of messages in UElogviewer, fileter the specific message that you need ### Testing Step for UE Module ==(BC95-G)== Testing environment setup in NTUST with BC95-G - Model number: BC95GJB-02-STD (using AT+CGMM) ![](https://i.imgur.com/aVPEBtB.png) #### STEP 1: Install UEMonitor (provided by Quectel) ![](https://i.imgur.com/nzOLoeB.png) #### STEP 2: Install driver Follow the document provided from Quectel and update the driver for UART port - UART Ports Dispalyed on PC ![](https://i.imgur.com/Pt9eahW.png) #### STEP 3: Update firmware by Qflash 1. Connet the module with PC by USB 2. Switch J302 to “Main UART to USB” ![](https://i.imgur.com/wZ6O2Zv.png) 3. Check the device manager - COM and LPT - there have 4 com port from module ![](https://i.imgur.com/E6y3cTH.png) 4. Open the Qflash - COM Port = COM13(Ch A) - Baudrate = 9600 ![](https://i.imgur.com/lhhXugj.png) 5. Load firmware file ![](https://i.imgur.com/U4jcPFL.png) 6. Start to update firmware - press the Start button on Qflash - ![](https://i.imgur.com/QgQC3hx.png) - <font color=red>When showing the “Reset”, please press the S101 on module</font> ![](https://i.imgur.com/cIWwu71.jpg) - After press the S101 will show as below figure ![](https://i.imgur.com/XVluh3b.png) - Successfully update the firmware ![](https://i.imgur.com/uWdPC9C.png) ### STEP 4: Run UEMonitor 1. Connect the AT command port(Ch A) ![](https://i.imgur.com/BcOORuU.png) - Follow the BC95G AT command document to operate the module - **AT+NRB** : reboot the module - **AT+NCONFIG?** : check the config of module - Setting ![](https://i.imgur.com/rXtlFio.png) - <font color=red>Please remind the **CR_0354_0338_SCRAMBLING** and **CR_0859_SI_AVOID** must be “FALSE”</font> - **AT+NEARFCN=0,9448** : lock the frequecy with NB-IoT eNB - **AT+CGATT=1** : attach status of module 2. Connect the debug port(Ch B) - New project from UE debug port ![](https://i.imgur.com/pHiU9iv.png) - Set the serial port and path of fwpkg - Serial port: COM14(Ch B) - xml or fwpkg file(BC95GJBR01A06.fwpkg) ![](https://i.imgur.com/rCsnfVy.png) - filter the message - RRC_ASN_DEBUG - NAS_DBG_NAD_MSG - DCI - HARQ ![](https://i.imgur.com/osMkVko.png) ## Testing Result - Log - BC95B28 - [enb_bc95b28.log](https://drive.google.com/file/d/1oLgDqJovGdpykCNA7LRgGMw90hmkc400/view?usp=sharing) - [ue_bc95b28.log](https://drive.google.com/file/d/1ebbzMYw6--ZzFsWWmNQrka6_FIat30u-/view?usp=sharing) - [wireshark_bc95b28.pcapng](https://drive.google.com/file/d/1_vevlOdBkZngqZ0pvngKMtwB2j_jzEeZ/view?usp=sharing) - BC95G - [enb_bc95g.log](https://drive.google.com/file/d/1CmIaKYLdDN-a2rDZN0KNgC1tVvureLiH/view?usp=sharing) - [ue_bc95g.log](https://drive.google.com/drive/folders/19jFp8BpJnAA4AK_VgO3DAATzP9JpJXM4?usp=sharing) - [wireshark_bc95g.pcapng](https://drive.google.com/file/d/1hw1dgZ0KgX_KYWYTfbcwk-LgUbh_mGJf/view?usp=sharing) - Attach Complete ![](https://i.imgur.com/QETu18U.png) - Ping to 8.8.8.8 from UE ![](https://i.imgur.com/i9T7qKF.png) - Ping messages between UE and EPC ![](https://i.imgur.com/hy0dKNP.png) - Use UDP socket to send data from UE ![](https://i.imgur.com/bXMhgmq.png) - [Demo Video with BC95-G](https://www.youtube.com/watch?v=ggb4VCOh4bI&feature=youtu.be) ## Currently Status - Complete Attach procedure. - Do the ping request from the UE side, and successfully get the reply. (one packet) - Temp CRC recovery only can solve three kinds of uplink data(AUTH RSP/SecModeCMD/AttachComplete) from specific UE(BC95-B28/BC95G) ## Remaining Issue - PHY Decoding Failure, uplink data would be decoded error for specific bit in the PHY layer after random access. -> Temp solution by enable NB-IoT CRC recovery in cmake_targets/CMakeLists.txt ![](https://i.imgur.com/8zv5Iwo.png) The latest commit is already set the NB_IOT_CRC_REVOVERY to TRUE and the eNB can recovery the decoded error uplink message. Modify the NB_IOT_CRC_REVOVERY from True to False for reveaing the issue. - Not support multiple UE connection - UE Configuration ![](https://i.imgur.com/9iu2vaB.png) ### Possible Solution by Dr. Fedor Zhukov (Email: fedenka94@gmail.com) The main problem why some messages didn't get decoded on PHY/MAC layers caused by Turbo-decoder implementation. We carefully checked the whole RX chain with respect to Matlab simulation: OFDM Demodulation >> Channel estimation/Equalization >> Transform decoding >> Descrambling >> Channel deinterleaving >> Rate matching >> Channel Decoding. Based on our observations, the same chunks of data didn't get processed alike with Matlab and with OAI Turbo decoder. Difference appeared on Channel Decoding stage. Here are the main points: A. There are 2 implemenations available in OAI: scalar and SSE. We focused on Scalar Turbo Decoder only. B. Second problem was in LLR size, initially set in OAI - Int16. It turned out that shift to the Int32 would fix decoding problems of scalar implementation completely: all size messages get decoded properly with no omissions then. So, in short: in order to make OAI NB-IoT code decode UL all messages - **a scalar version of Turbo Decoder must be used and input argument to Turbo Decoder (LLR) must be set to Int32**. ---