Changelog

SDK

The SDK has had a major change in the Security layer with respect to 3.4.0.

Notable changes include:

  • ARM mbed-TLS ( Apache License version 2.0 ) security library replaces Escript Cycur-TLS library
    • mbedtls-2.12.0 library is integrated
    • Escript Cycur-TLS library and its dependencies are completely removed
      • Will not be supported anymore
    • For DTLS - PSK is implemented
      • The default cipher suite is MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8
    • For TLS - RSA certificate exchange is implemented
      • The default cipher suite is MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
      • PEM certificate string is expected from the user to define the server certificate
  • The complete MbedTLS adaptor for ServalStack (EPL 2.0) is temporarily provided as part of the Common Code Base and will be contributed to ServalStack once it has well matured
  • Amazon FreeRTOS is updated to v1.4.2
  • A new application for streaming live sensor data using Long Range (LoRa) radio based on RN2483 is added
    • The application is called LoRaThingsNetworkExample
      • By default the ecosystem is provided with The Things Network
      • Easy-to-use LoRa interface is added in the Connectivity of the Common code base
  • The application compilation time is improved
    • Only the necessary shared packages are compiled based on the application needs
    • By default, in the common configuration, all the packages will be enabled
    • User can choose to enable/disable the shared packages and its dependencies based on application needs using the individual application makefile feature-set macros
  • Application support for Bootloader v1.2.0 is added
    • RAM is used instead of NVM (User page) flag to switch from application to bootloader
    • Backward compatibility also provided in case user uses bootloader version lesser than v1.2.0
  • VirtualXdkDemo application has had the below changes.
    • Rolling LED indication if there is no BLE connectivity
    • Integrated Noise sensor in the High priority data BLE service
    • External temperature sensor/ LEM sensor can now be connected as hot-plug in the runtime
  • Fixed the BoschXDKCloudConnectivity application to parse the config file if End Of Line (EOL) character is not provided in config.txt file
  • Fixed the AwsSendDataOverMQTT application publish data payload for the right sensor values
  • Watchdog is enabled by default in all the applications with ~4 minutes of timeout
    • Watchdog reset cause is printed in all the applications at appropriate places
  • Moved BLE Sensor Services from BLE shared package to Common code base and legacy support for BCDS_SensorServices.h has been provided
  • Ethernet IEEE 802.3 32-bit CRC related support are added to Utils shared package
  • Cayenne-LPP serializer is fixed for right endianness for all the supported sensors
  • ADC central is improved for dynamic ADC channel configuration changes

Eclipse Mita

Since the last Workbench release the following things changed:

  • Added Eclipse Hono over MQTT
  • Added SD card
  • Added noise sensor
  • Added ADC
  • MQTT now supports username/password authentication
  • The MQTT implementation now reconnects if connection is lost
  • Initialization of global variables is more robust
  • The wrongly spelled configuration item “authentication” in WLAN was renamed (from “authentification”)

Eclipse Hono

We’ve implemented an Eclipse Hono resource. This means that you no longer have to manually implement how Hono talks over MQTT. Instead you can directly set it up like this:

setup net: WLAN { /* ... */ }
setup backend: HonoMqtt {
  transport = net;
  url = "mqtt://iot.eclipse.org";
  clientId = "XDK42";
  authentication = Authenticated(username="consumer@HONO", password="verysecret");

  var telemetry = telemetry(qos=0);
}

SD Card

You can now read from and write to files on SD cards. As usual this requires a setup. There you declare which files you want to access on the card and how to operate on them. Let’s say you want to log acceleration data to a csv file called log.csv every time you press the first button:

package main;
import platforms.xdk110;

setup logging: SDCard {
       var csvInit = rewindingTextWrite("log.csv");
       var csv = appendingTextWrite("log.csv");
}

every XDK110.startup {
       // this truncates the log file and writes the csv header
       logging.csvInit.write("accel_x_axis, accel_y_axis, accel_z_axis\n");
}

every button_one.pressed {
       logging.csv.write(`${accelerometer.x_axis.read()}, ${accelerometer.y_axis.read()}, ${accelerometer.z_axis.read()}\n`);
}

You can read from files the same way. Note that you need to specify an additional argument for reading: the chunk size you want to read.

There are different ways to access files: when reading you can either always read from the start or from where you last left off. When writing you can either always truncate and write the whole file or always append to a file.

Last but not least you can operate on files in both text mode, reading and writing strings, and binary mode, reading and writing byte arrays.

Noise Sensor

You can now access the SDK’s noise sensor implementation from Mita directly. We’ve taken great care to validate any access and configuration to it. We will try to notify you for example if you access the noise sensor more often than you’ve configured it to sample the microphone.

ADC

Accessing ADC channels works just like accessing any other connectivity:

setup adc: ADC {
  var microphone = channel(CH4);
}

every 10 milliseconds {
  let sample = adc.microphone.read();
}

XDK Workbench

Major changes in the workbench includes:

  • Added support for bootloader 1.2.0
  • We now support several SDK’s
    • This means that user can now change / upgrade the SDK’s without having to update the complete workbench
  • Added support for the latest Java library
    • JRE - from 1.8.121 to 1.8.181

Known Issues Mac OS

We are updating the JRE feature. Since versions previous to 3.5.0 have some execution bits not set you need to change the file permissions of features/com.bosch.cds.xdk.jre.macosx.x86_64.feature_@VERSION@/jre/Contents/Home/lib/jspawnhelper to 755 or else the update wil fail. If you've already updated without changing permissions some files have lost their execution bit (permission 755). You can fix this manually by running these commands:

chmod 755 XDK.app/Contents/MacOS/XDK-Workbench
chmod 755 XDK.app/Contents/Eclipse/Segger/macosx/JLinkGDBServer
chmod 755 XDK.app/Contents/Eclipse/Segger/macosx/libjlinkarm.dylib

chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*jre/Contents/Home/bin/java
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/jjs
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/keytool
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/orbd
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/pack200
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/policytool
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/rmid
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/rmiregistry
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/servertool
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/tnameserv
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/bin/unpack200
chmod 755 XDK.app/Contents/Eclipse/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/Home/lib/jspawnhelper
rm XDK.app/Contents/Eclipse/features/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/MacOS/libjli.dylib
ln -s  ../Home/lib/jli/libjli.dylib XDK.app/Contents/Eclipse/features/com.bosch.cds.xdk.jre.macosx.x86_64.feature_*/jre/Contents/MacOS/

This will be fixed from the next release onwards.