NBIoT Data Transmission How to Using BC95G Modem Based Shields - UDP Test and Network Status Signaling

Introduction: NBIoT Data Transmission How to Using BC95G Modem Based Shields - UDP Test and Network Status Signaling

About: electronics, software, ....

About this projects:

Test NB IoT network capabilities and raw UDP data transmission using xyz-mIoT by itbrainpower.net shield equipped with Quectel BC95G modem.

Required time: 10-15 minutes.

Difficulty: intermediate.

Remarque: soldering skills are required.

About NB IoT:
NarrowBand-Internet of Things (NB-IoT) is a Low Power Wide Area Network (LPWAN) radio technology standard developed to enable a wide range of devices and services to be connected using cellular telecommunications bands. The NB IoT technology provides improved both indoor and outdoor coverage, supports massive numbers of low throughput devices, low delay sensitivity, ultra-low device cost, low device power consumption and optimized network architecture.

Step 1: Components and Accessories Required

Obviously, the xyz-mIoT shield equipped Quectel BC95G modem - PN: XYZMIOT209#BC95G-UFL-xxxxxxx - is the main component required.

xyz-mIoT by itbrainpower.net shield is the first, and the most compact, IoT board that combines the versatility of ARM0 micro-controller (Microchip/Atmel ATSAMD21G in Arduino Zero compatible design), the comfortable use of the embedded sensors bundle with connectivity provided by LTE CAT M1 or NB-IoT long-range & low-power modems or legacy 3G / GSM modems.

The xyz-mIoT shield may have up to 5 integrated sensors, as: THS (temperature and humidity sensors) - HDC2010, tVOC & eCO2 (air quality sensor - CO2 total volatile organic compounds- CO2 equivalent) - CCS811, HALL (magnetic sensor) - DRV5032 or IR (infrared sensor) KP-2012P3C , secondary IR (infrared sensor) - KP-2012P3C, TILT (movement vibration sensor) or REED (magnetic sensor) - SW200D. Mentioned above sensors are populated on xyz-mIoT board and can be ordered using different Part Numbers.

In order to perform the NB IoT data transmission test, the following additional items are required:

  • 1 x capacitor 1000-2200uF/6.3V low ESR
  • one GSM antenna with uFL connector (or one uFL to SMA F pigtail and one GSM antenna with SMA)
  • one SIM card (nano SIM format) having NB-IoT support (in our tests we used a Vodafone Romania SIM card)

xyz-mIoT by itbrainpower.net shield can ordered online here, or from one distributor near you.

Step 2: Hardware Preparation - Soldering and Wiring

    a. Soldering

    • enable 5V from USB to be primary power supply for the xyz-mIoT shield as shown in first picture [solder over SJP6 pads - connect both pads]. Alternative: solder both connectors rows, place the board into one breadboard and connect between Vusb and Vraw using one male-male breadboard wire.
    • solder the 1000-2200 uF /6.3V Low ESR capacitor to the "super-capacitor PADS". Keep in mind the capacitor polarity [connect + pole to the Vpad+ pad and - pole to GND pad]!


    b. Wiring all together

    Insert the nano-SIM in his slot [the SIM must have the PIN checking removed]. Connect the antenna, then connect the USB cable to xyz-mIoT USB port and to your computer. See details in right image.

    The xyz-mIoT shield will be powered from the USB.

    Step 3: Arduino Classes Download and Install. Software Settings.

    All the software described bellow is available, for registered users, here.

    a. Download and install "xyz-mIoT shields Arduino class". Optional (not required for this test), you may download an install the "xyz-mIoT shields SENSORS support Arduino class". Install directives can be found on the download page.

    b. Download and install "NB IOT [UDP mode] support for xyz-mIoT shield" class. Same, the install directives can be found on download pages.

    c. Install and run "udp_echo.py" listener on your server; write down for use in next steps, the listener IP address and UDP PORT. Same code can be find also in "__UDP_listener_example" folder inside the "NB IOT [UDP mode] support for xyz-mIoT shield" class.

    d. Open in Arduino the "xyz_mIoT_NBIoT_Class_example_UDP_echo" example - this can be found under "File/Examples/itbpNBIoTClass" Arduino menu. This code can be previewed here.

    e. Let's make some settings in h files inside the "itbpNBIoTClass":

    - in "itbpGPRSIPdefinition.h" update the APN value, using the APN value of your NB IoT provider (In test was: "eggsn-test-3.connex.ro" for Vodafone Romania),

    - in "itbpGPRSIPdefinition.h" update the NETWORKID with the numeric network id code for your NB IoT provider ("22601" for Vodafone Romania),
    - in "itbpGPRSIPdefinition.h" update the LTE_BAND with numeric band code used for NB IoT service (20 - LTE band B20 for Vodafone Romania),

    - in "itbpGPRSIPdefinition.h" update the SERVER_ADDRESS and SERVER_PORT with values UDP echo listener service (from step c.),

    - in "itbpGSMdefinition.h" goto lines 60&61 and select __itbpModem__ xyzmIoT,

    - in "itbpGSMdefinition.h" goto lines 64&65 and select __Qmodule__ BC95G.

    Step 4: Arduino - Compile, Upload and Run the NB IoT Echo Test

    Open in Arduino the xyz_mIoT_NBIoT_Class_example_UDP_echo.ino project, from "File/Examples/itbpNBIoTClass" Arduino menu. Important: use arduino.cc v 1.8.5 or newer!

    a. Select Arduino board - xyz-mIoT shield and the programming port as shown in picture. HINT: in order to upload the code, you must press twice (fast) the xyz-mIoT shield RESET button [the board will switch into programming mode].

    b. Compile and upload the code.

    In order to visualize the debug output, use the Arduino Serial Monitor or other terminal by selecting the debug port with following settings: 57600bps, 8N, 1.

    In the code the NB IoT data exchange timing is set to 10min. The send/received data (transmission payload) and various NB-IoT status signaling [ENTER / LEAVE ACTIVE, IDLE and PSM modes; also DATAGRAM RECEIVED event] will be visualized in the debugging interface.



    Originally published by me on itbrainpower.net projects and how to section.

    Be the First to Share


      • Pi Day Speed Challenge

        Pi Day Speed Challenge
      • Trash to Treasure Contest

        Trash to Treasure Contest
      • Microcontroller Contest

        Microcontroller Contest