Tutorials > Cross-Domain Development Kit (XDK) Cloud Connectivity

Cross-Domain Development Kit (XDK) Cloud Connectivity

Track your XDK sensor values remotely!

This guide will help you connect your Cross-Domain Development Kit (XDK) to the Bosch IoT Suite. Once your device is registered with our cloud service, you can access its values over the API.
This opens up plenty of new opportunities to remotely monitor the valuable data in your custom applications, and to process it within your IoT scenarios.

Table of contents


Prerequisites

To work through this tutorial, you will need:

  • A Cross-Domain Development Kit (XDK) from Bosch
  • A microSD card (used to store credentials for the device) as well as an SD card reader in your PC
  • A 2.4 GHz Wi-Fi network within range of the device
  • A web browser that is up to date and does not block cookies
  • An email address that you can use to register a Bosch-ID user account


Step 1: Register your XDK with the cloud service

Before the XDK can upload its data into the Things service, you will need to register it. Your entry point is http://xdk.bosch-iot-suite.com/.

  • Log in with your Bosch-ID user account. If you do not have an account yet, just create one at the same site, wait for the confirmation email, and activate your account.
    Your personal data (name, password) will be stored centrally at Bosch, outside the Bosch IoT Things service.

    After authentication, you will be re-directed back to our service.
  • From the menu at the top, choose Registration to register your XDK with the Bosch IoT Things service.
  • In the form that opens up, please enter a Name for the XDK. It can be anything you like, and you can also change it later on.
    Bosch IoT Things will also have generated a unique identifier and a secret key, which serve as the access credentials for your device.
    As soon as your XDK is up and running, it will try to connect to our service using exactly this identifier and key.
    Therefore, please keep those credentials private and confidential.
  • Click Register, and the Bosch IoT Things service will show you the configuration settings generated for your XDK.

  • Click Save as to store the content in a file called config.txt.
    Alternatively, click Copy and paste the content into a file you have created and given the same name.
    Note: If you lose these credentials, you will need to re-register your XDK to generate a new credentials set.


Step 2: Configure XDK

Complete the config.txt configuration file by entering two additional values:

  • SSID - The Service Set Identifier is the name of your Wi-Fi network.
  • PASSWORD - This is the password used to access your Wi-Fi network.

If in doubt, please see the XDK Guide for Wi-Fi, which can be found under xdk.io > Learning.

Copy the configuration file to the SD card’s root directory, and insert the SD card into the XDK.
Note: Make sure to insert the SD card correctly into the slot. If it falls inside the XDK case, you can get it out by shaking the device with the SD card slot facing downwards.

In order to connect to the Bosch IoT Suite, the XDK needs to be flashed with a specific firmware package called BoschXDKCloudConnectivity:

  • Download the latest XDK workbench at xdk.io > downloads.
    If you haven’t registered before downloading, you will first need to complete an additional registration process.
  • Open the XDK Workbench, and select BoschXDKCloudConnectivity from the Welcome screen.
    (If you do not see the Welcome screen, you can access it via Help > Welcome).
  • Power down your XDK.
  • Connect the XDK to your PC using the USB cable from the package.
    The XDK’s green LED will turn on to confirm that the XDK battery is charging.
  • Start the XDK in bootloader mode.
    Note: To make sure the XDK is in bootloader mode, press and hold button 1 (marked with one dot) while flipping the ON/OFF switch to the ON position.
  • Select BoschXDKCloudConnectivity in the Workbench and click Flash in the XDK Devices window.
  • The Workbench will now flash the XDK with the LWM2M firmware. The progress will be logged to the console.

  • Any problems with the connection will be logged to the console as well.

  • Upon successful connection, the XDK sensor values are transmitted to the Bosch IoT Things service.

  • When you remove the USB cable, only the orange and the yellow LED should be active:

    • Orange: Indicates the XDK has been registered with the LWM2M server
    • Yellow (blinking): Indicates the XDK is running

Step 3: Check connectivity

Back on the Bosch IoT Things website, you should see your XDK listed under My Things.

An inactive XDK should appear in dark blue, while an active XDK (one that has recently uploaded new sensor data) is displayed in light blue.

The upper ribbon of each tile shows when the most recent change was processed in the cloud.

Each sensor measurement transmitted to the cloud will update the XDK values stored by the Things service.
Please note, however, that Bosch IoT Things will not store the full history of data reported by each sensor, but only the latest value of each.


Step 4: Access your sensor data

Your application can directly access data from your Things by using the Bosch IoT Things APIs – the IoT device asset management of the Bosch IoT Suite.

You can refer to the XDK tutorial of the Bosch IoT Things service to learn how to view your sensor data and start writing your own applications.

In addition to this, we are currently working on a simple demonstration dashboard that allows you to review your sensor data directly in the dashboard.

Have fun using the XDK and share your experiences with the community at xdk.io!


What’s what

The XDK device

The Cross-Domain Development Kit (XDK) is a wireless sensor device that enables rapid prototyping of sensor-based products and applications for the Internet of Things (IoT). Please visit xdk.io to learn more.

The XDK Workbench

The Workbench is a software developer kit equipped with XDK-specific packages.

Download the latest Workbench at https://xdk.bosch-connectivity.com/software-downloads.

The Bosch IoT Suite

The Bosch IoT Suite provides middleware capabilities needed to build sophisticated IoT applications from top to bottom. It is provided as a set of cloud services.

Your XDK is connected to the Bosch IoT Hub service using the OMA Lightweight M2M (LWM2M) protocol and managed using the Bosch IoT Things service. You can book additional Bosch IoT Suite services to use with your IoT project.

Please visit the Bosch IoT Suite website to learn more.

The Bosch-ID service

The Bosch-ID service is an offering by the Bosch Group that allows their customers to use one user ID for services provided by various Bosch divisions.

Should you need to change your password or email address, or even close the account, you can do so in the Profile section that is available when you are logged in.


FAQ

  1. Why do I need two user accounts?
    At present, the XDK community does not use the Bosch-ID service. You will be informed in the XDK community once that changes.

  2. Where can I get further support?
    The XDK community is happy to share knowledge on all XDK questions at https://xdk.bosch-connectivity.com/community.
    If you want to know more about the Bosch IoT Suite services, please use our Bosch IoT Suite contact form.

  3. What is the meaning of the different LEDs?
    The XDK comes with four different LEDs that are used to indicate its current status.

Here is an overview of the meaning of each LED:

General meaningSpecific to LWM2MExample
red

If it is off, there is no cause for alarm.

  • On: The XDK device is not registering on the LWM2M server.
  • Blinking: The XDK device is registering on the LWM2M server, and will stop blinking once registration is complete.
If red, orange, and yellow LEDs are all blinking at the same time, a fatal error has occurred.
Please restart the device.
orangeNot urgent as long as it is not blinking.
  • On: The XDK device is registering on the LWM2M server.
  • Blinking: The XDK device is updating the registration on the LWM2M server, and will stop blinking once the update is complete.
A steady orange LED is nothing to worry about;
however, if it blinks for long time, action is required.
yellowIf it is blinking rapidly, action is required.
  • On: The XDK device has registered on the LWM2M server.
  • Blinking: The XDK device is running.
  • Blinking every 3 seconds: XDK is running, but SD card with configuration is not been detected properly.

  • Flashing fast: SD card access is not working.

The connection to the LWM2M server was successful and the XDK is running.

greenYour XDK is being charged via USB cable

If the USB cable had connected the XDK to your computer but the green LED is still off:

  • either the battery is already fully charged, or
  • your computer’s USB port did not recognize the plugged-in device; the USB slot is not active; the cord is placed incorrectly in the micro USB port; etc.