Mbed u-blox C027

Overview

The u-blox C027 is a starter kit that allows quick prototyping of a variety of applications for the Internet of Things. The device comes with a cellular module as well as a GPS/GNSS receiver, which enable straightforward development of applications with location-aware communication capability.

u-blox C027

For demonstration purposes, the mbed application shield can be attached to the C027. It provides various sensors and an LCD display.

mbed application shield

The Cumulocity mbed agent connects the C027 application board to Cumulocity and provides the following features:

Prerequisites

To run the Cumulocity mbed agent, the following items are required:

Setup

Note that the device cannot be flashed without the power supply connected.

Further information is available on http://mbed.org/users/ublox/notebook/u-blox-C027-Getting-Started/ and http://mbed.org/users/ublox/notebook/u-blox-C027-Downloading/.

Install the Agent

Version Release Date Download
1.9 18.Feb 2015 download
2.0 6.Mar 2015 download
2.2 10.Aug 2015 download

Connect the C027

Interacting with the Cumulocity Platform

The device is now connected to Cumulocity and sends sensor data periodically. You can now browse and process the collected data in the cloud in various ways:

Browse the collected sensor data under “Measurements” tab, as shown in the following screenshot: Measurement Screenshot

The device sends new sensor data only when the sensor values are changing. If the values remain constant, no new values are sent until 15 minutes when a sending is forced to inform the platform of device connectivity.

Create a dashboard to customize the representation of the sensor data from the device. You can create a new dashboard by selecting the mbed device, clicking on the small cog symbol on the top right and selecting “Create Dashboard”. An example dashboard created for an mbed device is shown below: Dashboard Screenshot

For further details, see the Cumulocity User Guide.

Interacting with the Control Operations

The “Control” page features a listing of all possible operations that are supported by a u-blox device, as shown in the following screenshot:

Control Operations Screenshot

Currently the u-blox firmware supports three operations:

Troubleshooting

Tips and Tricks

Force a Sensory Data Sending

Subject to the sensitivity threshold, you may not see frequent sending of sensor data because similar sensor readings are not sent. This effect is especially noticeable for the temperature sensor. However, it is possible to trigger an immediate sensory data sending by manually imposing a change to the sensory readings.

Perform a Factory Reset

When a u-blox device is already registered under a certain tenant, a Factory Reset has to be performed to remove the stored credentials so that the device can be re-registered again. The factory reset is performed as follows:

Tips and Tricks for Developers

Enable Debug Mode

By default, the agent runs in production mode, which does not write any information to the serial port. You can enable the debug mode to see a detailed log of the agent running. Prior to version 2.1, in order to enable debug mode, you can either push up the joystick before starting the agent, or at any time after the agent is connected to the cloud and running. Starting from version 2.1, simply push up the joystick at any time debug mode will be enabled.

The debug information is printed to the serial port of the device. To view its content, see http://mbed.org/handbook/SerialPC for details.

Please note (applies only to versions prior to 2.1): Because the agent only reads the state of the joystick once per several seconds, you may need to push up the joystick and hold it for several seconds to switch on/off debug mode.

When the agent is running in debug mode, many operations will be slowed down by a factor of 2 to 3 because of the large amount of I/O operations. If you want to disable the debug mode and switch back to express mode, simply push down the joystick and hold for several seconds (No holding is required starting from version 2.1).

Change the Agent Source Code

If you want to change the behaviour of the agent, go to mbed.org and adopt the source code. Here are the steps required to do so:

Change Reporting Interval in the Source Code

By default the reporting intervals for all sensor values are 15 minutes. You can change the reporting intervals by changing the defined corresponding macros in the source code (all units in second):

Change Reporting Sensitivity Threshold in the Source Code

Due to the jittering nature of the sensory readings, there is a threshold set for all sensor values to avoid constantly reporting false positive sensor reading changes. As the sensitivity of the sensors varies, the thresholds for different sensors vary. These thresholds are defined as a fraction of the last reported sensor values and you can also change them in the corresponding source file (all in real fraction numbers):