background image

 

 

 

1

 

©2019 Software AG. All rights reserved. 

Cumulocity agent for Bosch XDK rapid 
prototype device

 

This project is a device agent to connect the 

Bosch XDK

 to Cumulocity (C8Y Agent for 

XDK). The XDK is a quick and professional prototyping platform for prototyping IoT use 
cases. 

For this demo a Cumulocity tenant and an XDK device is required. For a free trial tenant 
you can register 

here

. 

When the XDK is registered in a Cumulocity tenant the environmental sensor readings 
measured by the XDK are sent to the Cumulocity IoT cloud. Potential use cases are: 

 

Control & monitor heating -> temperature sensor, acoustic sensor 

 

Control & monitor lighting in building -> digital light sensor 

 

Control & monitor machine -> acceleration sensor 

1

 

Content

 

1.

 

Overview

 

2.

 

Register XDK in Cumulocity

 

3.

 

Operate XDK

 

3.1 

Execute operations on device

 

3.2 

View events sent from device

 

3.3 

Detailed configuration

 

3.4 

Buttons

 

3.5 

Status indicated by LEDs

 

3.6 

Define Root Certificate for TLS

 

4.

 

Troubleshooting

 

5.

 

Sample dashboards

 

2

 

Overview of features XDK device agent 

The device agent allows to send measurements from the XDK to your Cumulocity tenant. 
These measurements can be visualised in dashboards. In the downstream direction 
operation commands can be sent to the XDK using the device managment app in 
Cumulocity: change configuration of sensors, stop/start publishing measurements and 
restarting the device. 
To get an idea of the currently active configuration the device agent sends its current 

Summary of Contents for XDK

Page 1: ...ting in building digital light sensor Control monitor machine acceleration sensor 1 Content 1 Overview 2 Register XDK in Cumulocity 3 Operate XDK 3 1 Execute operations on device 3 2 View events sent from device 3 3 Detailed configuration 3 4 Buttons 3 5 Status indicated by LEDs 3 6 Define Root Certificate for TLS 4 Troubleshooting 5 Sample dashboards 2 Overview of features XDK device agent The de...

Page 2: ...tenant 1 Prepare SD card 2 Register XDK in Cumulocity Upload SMART Rest Template 3 Install XDK Workbench 3 6 1 https developer bosch com web xdk downloads 4 Prepare project 5 Flash your C8Y Device Agent on your XDK 6 Procedure when re registering device in Cumulocity tenant 4 1 Prepare SD card NOTE Make sure your SD card is smaller than 32GB otherwise it can t be formatted in the FAT filesystem fo...

Page 3: ...cate being used for Cumulocity Therefore the buffer has to be increased In order to avoid a buffer overflow as seen in the following error message INFO XDK DEVICE 1 MQTT_ConnectToBroker_Z connecting secure INFO XDK DEVICE 1 11 SSL 1 Sec_receiveCB HORRIBLE Buffer full state 1 0x200023fc Increase MBEDTLS_SSL_MAX_CONTENT_LEN macro value from 4850 to 5950 in Common config MbedTLS MbedtlsConfigTLS h in...

Page 4: ... 2 dots pressed for deleting the configuration on the WIFI flash see as well handing of buttons 4 Register XDK again as before back to content 10 Operate XDK This section contains all information that is relevant once the XDK is registered in Cumulocity 11 Execute operations on device The XDK can receive operations and messages initiated in your C8Y tenant Operations to the XDK can either be issue...

Page 5: ... publishing measurements o stop o start 12 View events sent from device You can view the last events transmitted form the XDK by accessing the app Device management and follow Device Management Devices All Devices Then choose your XDK and select the Events template You can see events like 1 XDK started 2 Publish stopped 3 Publish stated 13 Buttons The buttons have following on the XDK have the fol...

Page 6: ...red The configuration for the XDK uses two sources file config txt on the SDCard file config txton the filesystem of the WIFI chip When registering the XDK a config on an SD card has to be inserted in the XDK Upon sucessful registration i e device receives credentials from Cumulocity the config value including theMQTTUSER MQTTPASSWORD are written to the config file on WIFI From then on the XDK can...

Page 7: ...Any Operation Restarting Off Off Blinking Registration Running Waiting for credentials Off Off On Registration Running Registration successful back to content 16 Define Root Certificate for TLS For TLS the root certificate of the CA has to be flashed to the XDK This certificate in included in the header file source ServerCA h in PEM format The currently included certificate from Go Daddy Class 2 C...

Page 8: ...s spaces PLEASE remove spaces from the workspace mingw32 make j 2 j8 clean C XDK Workbench XDK make mingw32 make exe C C XDK Workbench XDK SDK xdk110 Common f application mk clean new_bootloader mingw32 make 1 Entering directory C XDK Workbench XDK SDK xdk110 Common application mk 368 mixed implicit and normal rules Stop mingw32 make 1 Leaving directory C XDK Workbench XDK SDK xdk110 Common mingw3...

Page 9: ... HEAP ISSUE INFO XDK DEVICE 2 MQTT_ConnectToBroker_Z Failed since Connect event was not received INFO XDK DEVICE 2 MQTTOperation MQTT connection to the broker failed 0 time try again Increase heap size in xdk110 Common config AmazonFreeRTOS FreeRTOS FreeRTOSConfig h by changing the following value define configTOTAL_HEAP_SIZE size_t 72 1024 old value is size_t 70 1024 23 Config file cannot be pare...

Page 10: ...ainer doors open https cumulocity com guides users guide cockpit smart rules The rule On measurement explicit threshold create alarm is using the measurement c8y_Light with min 50000 and max 100000 4 Data point widget with data points c8y_acceleration accelerationX c8y_acceleration accelerationY and c8y_a cceleration accelerationZ 26 Rotation widget Using the Cumulocity custom widget published on ...

Page 11: ...ll rights reserved XDK After installation of the collada widget you will need to upload the 3D model of the XDk This is available resources XDK dae The following screenshots shows the required configuration back to content ...

Page 12: ... free to use fork and modify them subject to the license agreement While Software AG welcomes contributions we cannot guarantee to include every contribution in the master project For more information you can Ask a Question in the TECHcommunity Forums You can find additional information in the Software AG TECHcommunity Contact us at TECHcommunity if you have any questions ...

Reviews:

Related manuals for XDK