Bosch IoT Device Management - will be discontinued by mid 2024

Create the config files

The config files hold the device properties and the WiFi network information that the sketch uses to connect to WiFi.

Templates for the two required config files are available at arduino-via-hono/config_template/.


You should copy the config template files to your sketch folder (e.g. ditto-examples\arduino-via-hono\examples\opla_kit) and fill in the required properties.

You can copy most of the properties which need to be replaced, marked <in angle brackets>, from the provisioning.json file that was generated during the device provisioning step.

After that, you should change the file name extension from .h_template to just .h

Device connectivity related configuration

This file will hold the credentials which allow the Arduino board to connect to the Bosch IoT Device Management service.

#ifndef CONFIG_H
#define CONFIG_H
 
#define MQTT_HOST "mqtt.bosch-iot-hub.com"
#define MQTT_PORT 8883
 
#define TENANT_ID "<your-tenantId>"
#define DEVICE_AUTH_ID "<your-authId>"
#define DEVICE_PASSWORD "<your secret in plan text>"
 
#define THING_NAMESPACE "<your namespace is the first part of the device ID before the : character>"
#define THING_NAME "<the name is the second part of the device ID after the : character>"
 
#endif


WiFi configuration

This file will hold the credentials which allow the Arduino board to access your local WiFi network.

#ifndef CONFIG_WIFI_H
#define CONFIG_WIFI_H
 
#define SECRET_SSID "<ssid>"
#define SECRET_PASS "<pass>"
 
#endif

Make sure you keep the quotation marks for the strings.