Mistake on this page? Email us

Advanced configuration

Configuration for the network interface

This is how to configure the network interface for the selected target.

The default network configuration is in the Mbed target file targets/targets.json. Typical options are null, ETHERNET, WIFI, CELLULAR, or MESH.

If the default configuration is set to Wi-Fi, you need to set the Wi-Fi credentials in the application configuration file.

To configure a target with built-in Wi-Fi:

"target_overrides": {
        "*": {
            "nsapi.default-wifi-security"       : "WPA_WPA2",
            "nsapi.default-wifi-ssid"           : "<SSID>",
            "nsapi.default-wifi-password"       : "<PASSWORD>"
        },
        "<YOUR_TARGET>": {
            "target.network-default-interface-type" : "WIFI",
        }
    },

To configure add-on boards (Wi-Fi):

ESP8266 Wi-Fi module using ESP firmware 1.7 with connected RESET (rst) and flow-control (rts/cts):

  "target_overrides": {
          "*": {
              "esp8266.rx"                                : "PTC3",
              "esp8266.tx"                                : "PTC4",
              "esp8266.rst"                               : "D8",
              "esp8266.rts"                               : "PTC1",
              "esp8266.cts"                               : "PTC2",
              "esp8266.provide-default"                   : true,
              "nsapi.default-wifi-security"               : "WPA_WPA2",
              "nsapi.default-wifi-ssid"                   : "\"SSID\"",
              "nsapi.default-wifi-password"               : "\"Password\""
          },
          "<TARGET>": {
              "target.network-default-interface-type" : "WIFI",
          }
      },

Read more about IP networking.

Configuration for non-TRNG targets for ESFS-SOTP storage

Note: This section is about EFSF-SOTP configuration which is legacy used by Device Management Client versions 1.3.0 -> 2.1.1. Device Management Client versions2.2.0 or later use secure storage via KVStore by default.

If there is no true random number generation (TRNG) available for your selected target, you need to provide entropy externally. This means providing entropy through factory provisioning for production devices, and using hardcoded entropy in developer mode through provisioning APIs as demonstrated in the reference example application. However, for a device to use externally provided entropy, you need to appropriately configure TLS. Device Management Client provides such configuration, but you need to enable it in the configuration file.

For example, the NUCLEO-F411RE is a non-TRNG target, so to enable external entropy:

 "NUCLEO_F411RE": {
       "client_app.mbedtls-user-config-file"      : "\"mbedTLSConfig_mbedOS_SW_TRNG.h\"",
       "client_app.pal-user-defined-configuration": "\"sotp_non_trng_config_MbedOS.h\"",
        ...
 }