Skill Level: Beginner


Before you start you will need


  1. Prepare

    1. Connect the cellular and GPS/GNSS antennas as shown in the quickstart quide fo the kit.
    2. Plug your starter kit and the application shield together.
    3. Insert the SIM card from your cellular network operator into the device.
    4. Power the device using a power supply.
    5. Connect to your computer using a USB cable, using the connect connector on the board
    6. The microcontroller appears as a drive on your computer named mbed.

  2. Programm

    1. Login to the arm mbed compiler and import the following this example:
    2. Select the appropriate target platform (u-blox C027) in the upper right corner of the compiler.
    3. (optional) In somecases you need to add your SIMPIN and network operators APN settings by editing defines on line the file main.cpp
      //! Set your secret SIM pin here (e.g. "1234"). Check your SIM manual.# define SIMPIN      NULL/*! The APN of your network operator SIM, sometimes it is "internet" check your     contract with the network operator. You can also try to look-up your settings in     google: https://www.google.de/search?q=APN+list */# define APN         NULL//! Set the user name for your APN, or NULL if not needed# define USERNAME    NULL//! Set the password for your APN, or NULL if not needed# define PASSWORD    NULL 
    4. Compile the example. At the end of the compile process a file will be downloaded from the browser which should be saved on the microcontroller drive.

    5. Press the RESET_FB button on the device to start the application
  3. Visualize

    When you plug in your microcontroller, the connection light will initially glow yellow, while the connection is established, then turn green when the connection had been made.

    View the data from your device, go to https://quickstart.internetofthings.ibmcloud.com/#/ and simply enter the device ID (IMEI/MEID of the modem) and select to visualize your data. Use the IMEI/MEID printed on the modem as the device ID. If you have a mbed application shield mounted you can use your cursor to see your devices ID on the display.

  4. Know where your device is

    The device is sening its exact location to the Cloud. The location is determined by the onboard GPS/GNSS receiver. Make sure that the GPS/GNSS antenna of is placed with good visibility to the sky. The green LED next to MAX module will start flashing when the position is available.

    Whenever the position of the device changes an json event is sent to the cloud.


    The event has the following payload format were xx.xxx will be replaced with the true location:

    {  "d" :   {     "lat": "xx.xxxxxxx",    "long": "xxx.xxxxxxx"  }}
  5. Use Alternative Hardware

    Alternatively you can run this recipe also on different hardware using the cellular and positining shield from Embedded Artist (http://www.embeddedartists.com/products/acc/cell_pos_shield.php) and possibly the ARMmbed Starter Kit (https://developer.ibm.com/remix/tutorials/arm-mbed-iot-starter-kit/). Thanks to mbed this recipe runs on all STM Nucleo boards, most Freescale and NXP arduino compatible development boards.

    There are only a few changes needed to above recipe.

    • Select the correct target platform during the compile process
    • Plug the SIM card into the cellular and positioning shield.
  6. Debug

    The C027 also has a virtual serial port console that can be used to capture diagnostics output from the device using Teraterm / Putty.

    Modem::initModem::devStatus  Device:       LISA-U200  Power Save:   Disabled  SIM:          Ready  CCID:         xxxxxxxxxxxxxxxxxxxx  IMEI:         xxxxxxxxxxxxxxxx  IMSI:         xxxxxxxxxxxxxxxxManufacturer: u-blox  Model:        LISA-U200  Version:      22.40Modem::registerModem::netStatus  CSD Registration:   Home  PSD Registration:   Home  Access Technology:  3G  Signal Strength:    -61 dBm  Bit Error Rate:     49  Operator:           Xxxxxxxx  Location Area Code: xxxx  Cell ID:            xxxxxxxx  Phone Number:       xxxxxxxxxxxxModem::joinModem:IP xxx.xxx.xxx.xxxLOG:   int main() L#442 IBM Quickstart:   https://quickstart.internetofthings.ibmcloud.com/#/device/xxxxxxxxxxxxxxx/sensor/...

    In addition you can enable further modem debug messages in case you like to dig-in further. This is done by setting the debug level after the object is created in main function.

    MDMSerial mdm; mdm.setDebug(3); // enable this for debugging issues

Expected Outcome

At the end of this tutorial you'll have your u-blox cellular IoT Starter Kit connected to IBM's Internet of Things (IoT) Foundation ready for you to register the device, begin a free trial and start creating cool IoT apps in IBM Bluemix.

Join The Discussion