Documentation

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, Thread):

  • 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",
            }
        },
    
  • Thread configuration using Atmel AT86RF233 RF shield:

    "target_overrides": {
            "*": {
                "mbed-client-pal.pal-dns-api-version"        : 2,
                "nanostack-hal.event_loop_thread_stack_size" : 8192,
                "mbed-mesh-api.thread-config-channel"        : 22,
                "mbed-mesh-api.thread-config-panid"          : "0x0700",
                "nsapi.default-mesh-type"                    : "THREAD",
                "nanostack.configuration"                    : "thread_router",
                "atmel-rf.provide-default"                   : true,
                "target.device_has_add"                      : ["802_15_4_PHY"]
            },
            "<TARGET>": {
                "target.network-default-interface-type" : "MESH",
            }
        }
    

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\"",
        ...
 }