Nanostack Border Router is a generic mbed border router implementation that provides the 6LoWPAN ND or Thread border router initialization logic.

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Tue Jun 12 07:30:28 2018 +0100
Parent:
64:56c346f89ea4
Child:
66:5a933ba1e9ad
Commit message:
Merge branch 'mbed-os-5.9.0-oob'

* mbed-os-5.9.0-oob:
Updating mbed-os to mbed-os-5.9.0-rc3
Add Known Issues to README (#118)
Add file system instructions to README (#117)
?Update Thread configuration (#116)
Updating mbed-os to mbed-os-5.9.0-rc2
Revert "Revert support for EMAC backhaul driver"
Update configuration files
Updating mbed-os to mbed-os-5.9.0-rc1

.
Commit copied from https://github.com/ARMmbed/nanostack-border-router

Changed in this revision

Jenkinsfile Show annotated file Show diff for this revision Revisions of this file
README.md Show annotated file Show diff for this revision Revisions of this file
configs/6lowpan_Atmel_RF.json Show annotated file Show diff for this revision Revisions of this file
configs/6lowpan_Spirit1_RF.json Show annotated file Show diff for this revision Revisions of this file
configs/Thread_Atmel_RF.json Show annotated file Show diff for this revision Revisions of this file
configs/Thread_SLIP_Atmel_RF.json Show annotated file Show diff for this revision Revisions of this file
drivers/TARGET_NUCLEO_F429ZI/sal-nanostack-driver-stm32-eth.lib Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
source/border_router_main.cpp Show annotated file Show diff for this revision Revisions of this file
source/borderrouter_tasklet.c Show annotated file Show diff for this revision Revisions of this file
source/borderrouter_thread_tasklet.c Show annotated file Show diff for this revision Revisions of this file
source/mbedtls_thread_config.h Show annotated file Show diff for this revision Revisions of this file
--- a/Jenkinsfile	Wed Jun 06 08:00:25 2018 +0100
+++ b/Jenkinsfile	Tue Jun 12 07:30:28 2018 +0100
@@ -14,8 +14,8 @@
 // List of targets to compile
 def targets = [
   "K64F",
-  "K66F",
-  "NUCLEO_F429ZI"
+  "K66F"
+  //"NUCLEO_F429ZI"
   ]
 
 // Map toolchains to CI labels
--- a/README.md	Wed Jun 06 08:00:25 2018 +0100
+++ b/README.md	Tue Jun 12 07:30:28 2018 +0100
@@ -51,19 +51,20 @@
 
 If you wish to write your own target, follow the instructions in [Adding target support to mbed OS 5](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/advanced/porting_guide/).
 
-The border router requires backhaul and RF drivers to be provided for Nanostack. The backhaul is either SLIP or Ethernet. Currently, there are drivers for the following backhauls:
-
-* [K64F Ethernet](https://github.com/ARMmbed/sal-nanostack-driver-k64f-eth)
-* [NUCLEO_F429ZI Ethernet](https://github.com/ARMmbed/sal-nanostack-driver-stm32-eth)
-* [SLIP driver](https://github.com/ARMmbed/sal-stack-nanostack-slip)
-
-And following RF drivers:
+The border router requires an RF driver to be provided for Nanostack. Currently, there are the following drivers:
 
 * [Atmel AT86RF233](https://github.com/ARMmbed/atmel-rf-driver)
 * [Atmel AT86RF212B](https://github.com/ARMmbed/atmel-rf-driver)
 * [STM Spirit1](https://github.com/ARMmbed/stm-spirit1-rf-driver)
 * [NXP MCR20A](https://github.com/ARMmbed/mcr20a-rf-driver)
 
+The backhaul is either SLIP or Ethernet. For Ethernet either an mbed OS "EMAC"
+driver can be used, or a native Nanostack driver. Currently, there are Nanostack drivers
+for the following backhauls:
+
+* [K64F Ethernet](https://github.com/ARMmbed/sal-nanostack-driver-k64f-eth)
+* [SLIP driver](https://github.com/ARMmbed/sal-stack-nanostack-slip)
+
 The existing drivers are found in the `drivers/` folder. More drivers can be linked in.
 
 See [Notes on different hardware](https://github.com/ARMmbed/mbed-os-example-mesh-minimal/blob/master/Hardware.md) to see known combinations that work.
@@ -148,7 +149,7 @@
 ```
 "config": {
     "backhaul-driver": {
-        "help": "options are ETH, SLIP",
+        "help": "options are ETH, SLIP, EMAC",
         "value": "ETH"
     },
     "backhaul-mac-src": {
@@ -164,7 +165,9 @@
 }
 ```
 
-You can select your preferred option through the configuration file (field `backhaul-driver` in the `config` section). The value `SLIP` includes the SLIP driver, while the value `ETH` compiles the border router application with Ethernet backhaul support. You can define the MAC address on the backhaul interface manually (field `backhaul-mac-src` value `CONFIG`). Alternatively, you can use the MAC address provided by the development board (field `backhaul-mac-src` value `BOARD`). By default, the backhaul driver is set to `ETH` and the MAC address source is `BOARD`.
+You can select your preferred option through the configuration file (field `backhaul-driver` in the `config` section). The value `SLIP` includes the SLIP driver, while the value `ETH` compiles the border router application with Nanostack native Ethernet backhaul support. `EMAC` uses the board's default mbed OS network driver, which must be EMAC-based (derived from EMACInterface).
+
+You can define the MAC address on the backhaul interface manually (field `backhaul-mac-src` value `CONFIG`). Alternatively, you can use the MAC address provided by the development board (field `backhaul-mac-src` value `BOARD`). By default, the backhaul driver is set to `ETH` and the MAC address source is `BOARD`.
 
 You can also set the backhaul bootstrap mode (field `backhaul-dynamic-bootstrap`). By default, the bootstrap mode is set to true, which means the autonomous mode. With the autonomous mode, the border router learns the prefix information automatically from an IPv6 gateway in the Ethernet/SLIP segment. When the parameter is set to false, it enables you to set up a manual configuration of `backhaul-prefix` and `backhaul-default-route`.
 
@@ -193,6 +196,14 @@
     }
 ```
 
+#### Note on EMAC backhaul
+
+When `backhaul_driver` is set to `EMAC`, the border router will use the target's default network driver, as supplied by `NetworkInterface::get_default_instance`. This must be EMAC-based, derived from EMACInterface. If th - the same driver that a default-constructed `EthernetInterface` would use, so in principle it should work on any board where `EthernetInterface` works.
+
+To use a different interface, change the setting of `target.default-network-interface-type` in `mbed_app.json` to point to a different interface type, or add an overriding definition of `NetworkInterface::get_default_instance` to the application - this will override any default supplied by the target board.
+
+To use Wi-Fi or other more complex EMAC drivers, necessary configuration parameters must be supplied, either via `mbed_app.json` or configuration in the `NetworkInterface::get_default_instance` override. Also, the driver must follow the guidelines of `EMACInterface` - the border router does not call the `EMACInterface`'s `connect` method, so the driver must work with only a `powerup` call to the `EMAC`.
+
 ### Switching the RF shield
 
 By default, the application uses an Atmel AT86RF233/212B RF driver. You can alternatively use any RF driver provided in the `drivers/` folder or link in your own driver. You can set the configuration for the RF driver in the `json` file.
@@ -238,6 +249,17 @@
 
 After changing the radio shield, you need to recompile the application.
 
+## File system support
+
+The Application can enable use of file system as instructed in [mbed OS storage documentation](https://os.mbed.com/docs/latest/reference/storage.html). File system is not enabled by default due variety of possible configurations.
+
+Thread network stack is able to write/read network configuration settings to/from file system once the feature is activated. Activation happens by telling file system root path to nanostack. To set the root-path, use function:
+
+`ns_file_system_set_root_path(root-path)`
+
+Once the root-path is set, Thread stack will read configuration settings from the file system and write configuration back to file system once configuration is changed.
+
+
 ## Running the border router application
 
 1. Find the  binary file `nanostack-border-router.bin` in the `BUILD` folder.
@@ -283,3 +305,7 @@
 [INFO][brro]:    [2] 2001:999:21:9ce:0:ff:fe00:face
 [INFO][brro]: 6LoWPAN Border Router Bootstrap Complete.
 ```
+
+## Known Issues
+ * Application does not link with NUCLEO_F429ZI boards, issue #[113](https://github.com/ARMmbed/nanostack-border-router/issues/113)
+
--- a/configs/6lowpan_Atmel_RF.json	Wed Jun 06 08:00:25 2018 +0100
+++ b/configs/6lowpan_Atmel_RF.json	Tue Jun 12 07:30:28 2018 +0100
@@ -2,14 +2,14 @@
     "config": {
         "heap-size": {
              "help": "The amount of static RAM to reserve for nsdynmemlib heap",
-             "value": 50000
+             "value": 40000
         },
         "radio-type":{
             "help": "options are ATMEL, MCR20, SPIRIT1",
             "value": "ATMEL"
         },
         "backhaul-driver": {
-            "help": "options are ETH, SLIP",
+            "help": "options are ETH, SLIP, EMAC",
             "value": "ETH"
         },
         "mesh-mode": {
@@ -70,6 +70,8 @@
         "*": {
             "target.features_add": ["NANOSTACK", "LOWPAN_BORDER_ROUTER", "COMMON_PAL"],
             "target.features_remove": ["LWIP"],
+            "target.network-default-interface-type": "ETHERNET",
+            "nsapi.default-stack": "NANOSTACK",
             "mbed-trace.enable": 1,
             "nanostack.configuration": "lowpan_border_router",
             "platform.stdio-convert-newlines": true,
--- a/configs/6lowpan_Spirit1_RF.json	Wed Jun 06 08:00:25 2018 +0100
+++ b/configs/6lowpan_Spirit1_RF.json	Tue Jun 12 07:30:28 2018 +0100
@@ -2,14 +2,14 @@
     "config": {
         "heap-size": {
              "help": "The amount of static RAM to reserve for nsdynmemlib heap",
-             "value": 50000
+             "value": 40000
         },
         "radio-type":{
             "help": "options are ATMEL, MCR20, SPIRIT1",
             "value": "SPIRIT1"
         },
         "backhaul-driver": {
-            "help": "options are ETH, SLIP",
+            "help": "options are ETH, SLIP, EMAC",
             "value": "ETH"
         },
         "mesh-mode": {
@@ -71,6 +71,8 @@
             "target.features_add": ["NANOSTACK", "LOWPAN_BORDER_ROUTER", "COMMON_PAL"],
             "target.features_remove": ["LWIP"],
             "spirit1.mac-address": "{0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7}",
+            "target.network-default-interface-type": "ETHERNET",
+            "nsapi.default-stack": "NANOSTACK",
             "mbed-trace.enable": 1,
             "nanostack.configuration": "lowpan_border_router",
             "platform.stdio-convert-newlines": true,
--- a/configs/Thread_Atmel_RF.json	Wed Jun 06 08:00:25 2018 +0100
+++ b/configs/Thread_Atmel_RF.json	Tue Jun 12 07:30:28 2018 +0100
@@ -2,14 +2,14 @@
     "config": {
         "heap-size": {
              "help": "The amount of static RAM to reserve for nsdynmemlib heap",
-             "value": 50000
+             "value": 65535
         },
         "radio-type":{
             "help": "options are ATMEL, MCR20",
             "value": "ATMEL"
         },
         "backhaul-driver": {
-            "help": "options are ETH, SLIP",
+            "help": "options are ETH, SLIP, EMAC",
             "value": "ETH"
         },
         "mesh-mode": {
@@ -38,7 +38,7 @@
         "extended-pan-id": "{0xf1, 0xb5, 0xa1, 0xb2,0xc4, 0xd5, 0xa1, 0xbd }",
         "mesh-local-prefix": "{0xfd, 0x0, 0x0d, 0xb8, 0x0,0x0, 0x0, 0x0}",
         "network-name": "\"Thread Network\"",
-        "pskd": "\"abcdefghijklmno\"",
+        "pskd": "\"ABCDEFGH\"",
         "pskc": "{0xc8, 0xa6, 0x2e, 0xae, 0xf3, 0x68, 0xf3, 0x46, 0xa9, 0x9e, 0x57, 0x85, 0x98, 0x9d, 0x1c, 0xd0}",
         "thread-master-key": "{0x10, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}",
         "thread-use-static-link-config": true,
@@ -54,10 +54,13 @@
         "*": {
             "target.features_add": ["NANOSTACK", "COMMON_PAL", "THREAD_BORDER_ROUTER"],
             "target.features_remove": ["LWIP"],
+            "target.network-default-interface-type": "ETHERNET",
+            "nsapi.default-stack": "NANOSTACK",
             "mbed-trace.enable": 1,
             "nanostack.configuration": "thread_border_router",
             "platform.stdio-convert-newlines": true,
-            "platform.stdio-baud-rate": 115200
+            "platform.stdio-baud-rate": 115200,
+            "mbed-mesh-api.use-malloc-for-heap": true
         },
         "K64F": {
             "LED": "LED_GREEN",
--- a/configs/Thread_SLIP_Atmel_RF.json	Wed Jun 06 08:00:25 2018 +0100
+++ b/configs/Thread_SLIP_Atmel_RF.json	Tue Jun 12 07:30:28 2018 +0100
@@ -2,14 +2,14 @@
     "config": {
         "heap-size": {
              "help": "The amount of static RAM to reserve for nsdynmemlib heap",
-             "value": 50000
+             "value": 65535
         },
         "radio-type":{
             "help": "options are ATMEL, MCR20",
             "value": "ATMEL"
         },
         "backhaul-driver": {
-            "help": "options are ETH, SLIP",
+            "help": "options are ETH, SLIP, EMAC",
             "value": "SLIP"
         },
         "mesh-mode": {
@@ -40,7 +40,7 @@
         "extended-pan-id": "{0xf1, 0xb5, 0xa1, 0xb2,0xc4, 0xd5, 0xa1, 0xbd }",
         "mesh-local-prefix": "{0xfd, 0x0, 0x0d, 0xb8, 0x0, 0x0, 0x0, 0x0}",
         "network-name": "\"Thread Network\"",
-        "pskd": "\"abcdefghijklmno\"",
+        "pskd": "\"ABCDEFGH\"",
         "pskc": "{0xc8, 0xa6, 0x2e, 0xae, 0xf3, 0x68, 0xf3, 0x46, 0xa9, 0x9e, 0x57, 0x85, 0x98, 0x9d, 0x1c, 0xd0}",
         "thread-master-key": "{0x10, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}",
         "thread-use-static-link-config": true,
@@ -56,10 +56,13 @@
         "*": {
             "target.features_add": ["NANOSTACK", "COMMON_PAL", "THREAD_BORDER_ROUTER"],
             "target.features_remove": ["LWIP"],
+            "target.network-default-interface-type": "ETHERNET",
+            "nsapi.default-stack": "NANOSTACK",
             "mbed-trace.enable": 1,
             "nanostack.configuration": "thread_border_router",
             "platform.stdio-convert-newlines": true,
-            "platform.stdio-baud-rate": 115200
+            "platform.stdio-baud-rate": 115200,
+            "mbed-mesh-api.use-malloc-for-heap": true
         },
         "K64F": {
             "LED": "LED_GREEN",
--- a/drivers/TARGET_NUCLEO_F429ZI/sal-nanostack-driver-stm32-eth.lib	Wed Jun 06 08:00:25 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://github.com/ARMmbed/sal-nanostack-driver-stm32-eth/#1369c4a6a4546ca8ce8e51d7827621db2a2ad3c7
\ No newline at end of file
--- a/mbed-os.lib	Wed Jun 06 08:00:25 2018 +0100
+++ b/mbed-os.lib	Tue Jun 12 07:30:28 2018 +0100
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#35fa909641fedcad9bbe0c7300d4ccdf15a2b71a
+https://github.com/ARMmbed/mbed-os/#866850acc15e86cd4ac11bf4404078a49f921ddd
--- a/mbed_app.json	Wed Jun 06 08:00:25 2018 +0100
+++ b/mbed_app.json	Tue Jun 12 07:30:28 2018 +0100
@@ -2,14 +2,14 @@
     "config": {
         "heap-size": {
              "help": "The amount of static RAM to reserve for nsdynmemlib heap",
-             "value": 50000
+             "value": 40000
         },
         "radio-type":{
             "help": "options are ATMEL, MCR20, SPIRIT1",
             "value": "ATMEL"
         },
         "backhaul-driver": {
-            "help": "options are ETH, SLIP",
+            "help": "options are ETH, SLIP, EMAC",
             "value": "ETH"
         },
         "mesh-mode": {
@@ -66,6 +66,8 @@
         "*": {
             "target.features_add": ["NANOSTACK", "LOWPAN_BORDER_ROUTER", "COMMON_PAL"],
             "target.features_remove": ["LWIP"],
+            "target.network-default-interface-type": "ETHERNET",
+            "nsapi.default-stack": "NANOSTACK",
             "mbed-trace.enable": 1,
             "nanostack.configuration": "lowpan_border_router",
             "platform.stdio-convert-newlines": true,
--- a/source/border_router_main.cpp	Wed Jun 06 08:00:25 2018 +0100
+++ b/source/border_router_main.cpp	Tue Jun 12 07:30:28 2018 +0100
@@ -10,6 +10,12 @@
 #include "drivers/eth_driver.h"
 #include "sal-stack-nanostack-slip/Slip.h"
 
+#include "Nanostack.h"
+#include "NanostackEthernetInterface.h"
+#include "MeshInterfaceNanostack.h"
+#include "EMACInterface.h"
+#include "EMAC.h"
+
 #ifdef  MBED_CONF_APP_DEBUG_TRACE
 #if MBED_CONF_APP_DEBUG_TRACE == 1
 #define APP_TRACE_LEVEL TRACE_ACTIVE_LEVEL_DEBUG
@@ -19,6 +25,7 @@
 #endif //MBED_CONF_APP_DEBUG_TRACE
 
 #include "ns_hal_init.h"
+#include "mesh_system.h"
 #include "cmsis_os.h"
 #include "arm_hal_interrupt.h"
 
@@ -28,9 +35,18 @@
 
 #define APP_DEFINED_HEAP_SIZE MBED_CONF_APP_HEAP_SIZE
 static uint8_t app_stack_heap[APP_DEFINED_HEAP_SIZE];
-static uint8_t mac[6] = {0};
 static mem_stat_t heap_info;
 
+#define BOARD 1
+#define CONFIG 2
+#if MBED_CONF_APP_BACKHAUL_MAC_SRC == BOARD
+static uint8_t mac[6];
+#elif MBED_CONF_APP_BACKHAUL_MAC_SRC == CONFIG
+static const uint8_t mac[] = MBED_CONF_APP_BACKHAUL_MAC;
+#else
+#error "MAC address not defined"
+#endif
+
 static DigitalOut led1(MBED_CONF_APP_LED);
 
 static Ticker led_ticker;
@@ -50,6 +66,23 @@
     printf("%s\n", str);
 }
 
+#undef ETH
+#undef SLIP
+#undef EMAC
+#define ETH 1
+#define SLIP 2
+#define EMAC 3
+#if MBED_CONF_APP_BACKHAUL_DRIVER == EMAC
+static void (*emac_actual_cb)(uint8_t, int8_t);
+static int8_t emac_driver_id;
+static void emac_link_cb(bool up)
+{
+    if (emac_actual_cb) {
+        emac_actual_cb(up, emac_driver_id);
+    }
+}
+#endif
+
 /**
  * \brief Initializes the SLIP MAC backhaul driver.
  * This function is called by the border router module.
@@ -57,8 +90,6 @@
 void backhaul_driver_init(void (*backhaul_driver_status_cb)(uint8_t, int8_t))
 {
 // Values allowed in "backhaul-driver" option
-#define ETH 0
-#define SLIP 1
 #if MBED_CONF_APP_BACKHAUL_DRIVER == SLIP
     SlipMACDriver *pslipmacdriver;
     int8_t slipdrv_id = -1;
@@ -87,6 +118,37 @@
     }
 
     tr_error("Backhaul driver init failed, retval = %d", slipdrv_id);
+#elif MBED_CONF_APP_BACKHAUL_DRIVER == EMAC
+#undef EMAC
+    tr_info("Using EMAC backhaul driver...");
+    NetworkInterface *net = NetworkInterface::get_default_instance();
+    if (!net) {
+        tr_error("Default network interface not found");
+        exit(1);
+    }
+    EMACInterface *emacif = net->emacInterface();
+    if (!emacif) {
+        tr_error("Default interface is not EMAC-based");
+        exit(1);
+    }
+    EMAC &emac = emacif->get_emac();
+    Nanostack::EthernetInterface *ns_if;
+#if MBED_CONF_APP_BACKHAUL_MAC_SRC == BOARD
+    /* Let the core code choose address - either from board or EMAC (for
+     * ETH and SLIP we pass in the board address already in mac[]) */
+    nsapi_error_t err = Nanostack::get_instance().add_ethernet_interface(emac, true, &ns_if);
+    /* Read back what they chose into our mac[] */
+    ns_if->get_mac_address(mac);
+#else
+    nsapi_error_t err = Nanostack::get_instance().add_ethernet_interface(emac, true, &ns_if, mac);
+#endif
+    if (err < 0) {
+        tr_error("Backhaul driver init failed, retval = %d", err);
+    } else {
+        emac_actual_cb = backhaul_driver_status_cb;
+        emac_driver_id = ns_if->get_driver_id();
+        emac.set_link_state_cb(emac_link_cb);
+    }
 #elif MBED_CONF_APP_BACKHAUL_DRIVER == ETH
     tr_info("Using ETH backhaul driver...");
     arm_eth_phy_device_register(mac, backhaul_driver_status_cb);
@@ -94,7 +156,9 @@
 #else
 #error "Unsupported backhaul driver"
 #endif
-
+#undef SLIP
+#undef ETH
+#undef EMAC
 }
 
 /**
@@ -110,20 +174,12 @@
     mbed_trace_print_function_set(trace_printer);
     mbed_trace_config_set(TRACE_MODE_COLOR | APP_TRACE_LEVEL | TRACE_CARRIAGE_RETURN);
 
+    // Have to let mesh_system do net_init_core in case we use
+    // Nanostack::add_ethernet_interface()
+    mesh_system_init();
 
-#define BOARD 0
-#define CONFIG 1
 #if MBED_CONF_APP_BACKHAUL_MAC_SRC == BOARD
-    /* Setting the MAC Address from UID.
-     * Takes UID Mid low and UID low and shuffles them around. */
     mbed_mac_address((char *)mac);
-#elif MBED_CONF_APP_BACKHAUL_MAC_SRC == CONFIG
-    const uint8_t mac48[] = MBED_CONF_APP_BACKHAUL_MAC;
-    for (uint32_t i = 0; i < sizeof(mac); ++i) {
-        mac[i] = mac48[i];
-    }
-#else
-    #error "MAC address not defined"
 #endif
 
     if (MBED_CONF_APP_LED != NC) {
--- a/source/borderrouter_tasklet.c	Wed Jun 06 08:00:25 2018 +0100
+++ b/source/borderrouter_tasklet.c	Tue Jun 12 07:30:28 2018 +0100
@@ -117,7 +117,6 @@
 
 void border_router_tasklet_start(void)
 {
-    net_init_core();
     /* initialize Radio module*/
     net_6lowpan_id = rf_interface_init();
 
--- a/source/borderrouter_thread_tasklet.c	Wed Jun 06 08:00:25 2018 +0100
+++ b/source/borderrouter_thread_tasklet.c	Tue Jun 12 07:30:28 2018 +0100
@@ -373,7 +373,6 @@
 
 void border_router_tasklet_start(void)
 {
-    net_init_core();
     thread_rf_init();
     protocol_stats_start(&nwk_stats);
 
--- a/source/mbedtls_thread_config.h	Wed Jun 06 08:00:25 2018 +0100
+++ b/source/mbedtls_thread_config.h	Tue Jun 12 07:30:28 2018 +0100
@@ -19,6 +19,7 @@
 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
 #define MBEDTLS_SSL_EXPORT_KEYS
 #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
+#define MBEDTLS_SSL_MAX_CONTENT_LEN 4096
 
 #define MBEDTLS_SHA256_SMALLER //reduce ROM usage ~1,4kB, perf hit 30%