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

Committer:
mbed_official
Date:
Tue Jun 12 07:30:28 2018 +0100
Revision:
65:92e581c01e8c
Parent:
63:d01e7341699d
Child:
69:a8a0ac9f3f8a
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

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:85f4174a8e29 1 # Nanostack Border Router
mbed_official 0:85f4174a8e29 2
mbed_official 0:85f4174a8e29 3 Nanostack Border Router is a generic mbed border router implementation that provides the 6LoWPAN ND or Thread border router initialization logic.
mbed_official 0:85f4174a8e29 4
mbed_official 0:85f4174a8e29 5 Border router is a network gateway between a wireless 6LoWPAN mesh network and a backhaul network. It controls and relays traffic between the two networks. In a typical setup, a 6LoWPAN border router is connected to another router in the backhaul network (over Ethernet or a serial line) which in turn forwards traffic to/from the internet or a private company LAN, for instance.
mbed_official 0:85f4174a8e29 6
mbed_official 0:85f4174a8e29 7 ![](images/br_role.png)
mbed_official 0:85f4174a8e29 8
mbed_official 0:85f4174a8e29 9 ## Structure
mbed_official 0:85f4174a8e29 10
mbed_official 0:85f4174a8e29 11 This application runs on mbed OS and utilizes PHY drivers and Nanostack to form a border router.
mbed_official 0:85f4174a8e29 12
mbed_official 0:85f4174a8e29 13 ![](images/structure.png)
mbed_official 0:85f4174a8e29 14
mbed_official 0:85f4174a8e29 15 The code layout is organized like this:
mbed_official 0:85f4174a8e29 16
mbed_official 0:85f4174a8e29 17 ```
mbed_official 0:85f4174a8e29 18 configs/ Contains example configuration files
mbed_official 0:85f4174a8e29 19 drivers/ Contains PHY drivers
mbed_official 0:85f4174a8e29 20 mbed-os/ Contains mbed OS itself
mbed_official 0:85f4174a8e29 21 source/ Contains the application code
mbed_official 0:85f4174a8e29 22 mbed_app.json Build time configuration file
mbed_official 0:85f4174a8e29 23 ```
mbed_official 0:85f4174a8e29 24
mbed_official 0:85f4174a8e29 25 ## Building
mbed_official 0:85f4174a8e29 26
mbed_official 0:85f4174a8e29 27 1. Clone this repository.
mbed_official 0:85f4174a8e29 28 1. Run `mbed deploy`.
mbed_official 0:85f4174a8e29 29 1. Select target platform.
mbed_official 0:85f4174a8e29 30 1. Select toolchain.
mbed_official 0:85f4174a8e29 31 1. Configure.
mbed_official 0:85f4174a8e29 32 1. Build.
mbed_official 0:85f4174a8e29 33
mbed_official 0:85f4174a8e29 34 For example:
mbed_official 0:85f4174a8e29 35
mbed_official 0:85f4174a8e29 36 ```
mbed_official 0:85f4174a8e29 37 $ mbed deploy
mbed_official 0:85f4174a8e29 38
mbed_official 0:85f4174a8e29 39 $ mbed target K64F
mbed_official 0:85f4174a8e29 40 OR
mbed_official 0:85f4174a8e29 41 $ mbed target NUCLEO_F429ZI
mbed_official 0:85f4174a8e29 42
mbed_official 0:85f4174a8e29 43 $ mbed toolchain GCC_ARM
mbed_official 0:85f4174a8e29 44
mbed_official 0:85f4174a8e29 45 $ mbed compile
mbed_official 0:85f4174a8e29 46 ```
mbed_official 0:85f4174a8e29 47
mbed_official 0:85f4174a8e29 48 ## Selecting the target platform
mbed_official 0:85f4174a8e29 49
mbed_official 44:261a58f0aba0 50 The target platform is the hardware on which the border router runs. There are number of target platforms already available for you in the mbed OS.
mbed_official 0:85f4174a8e29 51
mbed_official 18:704c4307eb78 52 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/).
mbed_official 0:85f4174a8e29 53
mbed_official 65:92e581c01e8c 54 The border router requires an RF driver to be provided for Nanostack. Currently, there are the following drivers:
mbed_official 0:85f4174a8e29 55
mbed_official 0:85f4174a8e29 56 * [Atmel AT86RF233](https://github.com/ARMmbed/atmel-rf-driver)
mbed_official 0:85f4174a8e29 57 * [Atmel AT86RF212B](https://github.com/ARMmbed/atmel-rf-driver)
mbed_official 0:85f4174a8e29 58 * [STM Spirit1](https://github.com/ARMmbed/stm-spirit1-rf-driver)
mbed_official 0:85f4174a8e29 59 * [NXP MCR20A](https://github.com/ARMmbed/mcr20a-rf-driver)
mbed_official 0:85f4174a8e29 60
mbed_official 65:92e581c01e8c 61 The backhaul is either SLIP or Ethernet. For Ethernet either an mbed OS "EMAC"
mbed_official 65:92e581c01e8c 62 driver can be used, or a native Nanostack driver. Currently, there are Nanostack drivers
mbed_official 65:92e581c01e8c 63 for the following backhauls:
mbed_official 65:92e581c01e8c 64
mbed_official 65:92e581c01e8c 65 * [K64F Ethernet](https://github.com/ARMmbed/sal-nanostack-driver-k64f-eth)
mbed_official 65:92e581c01e8c 66 * [SLIP driver](https://github.com/ARMmbed/sal-stack-nanostack-slip)
mbed_official 65:92e581c01e8c 67
mbed_official 0:85f4174a8e29 68 The existing drivers are found in the `drivers/` folder. More drivers can be linked in.
mbed_official 0:85f4174a8e29 69
mbed_official 0:85f4174a8e29 70 See [Notes on different hardware](https://github.com/ARMmbed/mbed-os-example-mesh-minimal/blob/master/Hardware.md) to see known combinations that work.
mbed_official 0:85f4174a8e29 71
mbed_official 0:85f4174a8e29 72 ## Configuring Nanostack Border Router
mbed_official 0:85f4174a8e29 73
mbed_official 0:85f4174a8e29 74 Applications using Nanostack Border Router need to use a `.json` file for the configuration. The example configurations can be found in the `configs/` folder.
mbed_official 0:85f4174a8e29 75
mbed_official 0:85f4174a8e29 76 ### The backhaul configuration options
mbed_official 0:85f4174a8e29 77
mbed_official 0:85f4174a8e29 78 | Field | Description |
mbed_official 0:85f4174a8e29 79 |-------------------------------------|---------------------------------------------------------------|
mbed_official 0:85f4174a8e29 80 | `backhaul-dynamic-bootstrap` | Defines whether the manually configured backhaul prefix and default route are used, or whether they are learnt automatically via the IPv6 neighbor discovery. False means static and true means automatic configuration. |
mbed_official 0:85f4174a8e29 81 | `backhaul-prefix` | The IPv6 prefix (64 bits) assigned to and advertised on the backhaul interface. Example format: `fd00:1:2::` |
mbed_official 0:85f4174a8e29 82 | `backhaul-default-route` | The default route (prefix and prefix length) where packets should be forwarded on the backhaul device, default: `::/0`. Example format: `fd00:a1::/10` |
mbed_official 0:85f4174a8e29 83 | `backhaul-next-hop` | The next-hop value for the backhaul default route; should be a link-local address of a neighboring router, default: empty (on-link prefix). Example format: `fe80::1` |
mbed_official 22:8740285d8f09 84 | `backhaul-mld` | Enable sending Multicast Listener Discovery reports to backhaul network when a new multicast listener is registered in mesh network. Values: true or false |
mbed_official 0:85f4174a8e29 85
mbed_official 0:85f4174a8e29 86 ### 6LoWPAN ND border router options
mbed_official 0:85f4174a8e29 87
mbed_official 0:85f4174a8e29 88 | Field | Description |
mbed_official 0:85f4174a8e29 89 |-------------------------------------|---------------------------------------------------------------|
mbed_official 0:85f4174a8e29 90 | `security-mode` | The 6LoWPAN mesh network traffic (link layer) can be protected with the Private Shared Key (PSK) security mode, allowed values: `NONE` and `PSK`. |
mbed_official 0:85f4174a8e29 91 | `psk-key` | A 16-bytes long private shared key to be used when the security mode is PSK. Example format (hexadecimal byte values separated by commas inside brackets): `{0x00, ..., 0x0f}` |
mbed_official 0:85f4174a8e29 92 | `multicast-addr` | Multicast forwarding is supported by default. This defines the multicast address to which the border router application forwards multicast packets (on the backhaul and RF interface). Example format: `ff05::5` |
mbed_official 0:85f4174a8e29 93 |`ra-router-lifetime`|Defines the router advertisement interval in seconds (default 1024 if left out).|
mbed_official 0:85f4174a8e29 94 |`beacon-protocol-id`|Is used to identify beacons. This should not be changed (default 4 if left out).|
mbed_official 0:85f4174a8e29 95
mbed_official 0:85f4174a8e29 96 To learn more about 6LoWPAN and the configuration parameters, read the [6LoWPAN overview] (https://docs.mbed.com/docs/arm-ipv66lowpan-stack/en/latest/quick_start_intro/index.html).
mbed_official 0:85f4174a8e29 97
mbed_official 0:85f4174a8e29 98 See [configs/6lowpan_Atmel_RF.json](configs/6lowpan_Atmel_RF.json) for an example configuration file.
mbed_official 0:85f4174a8e29 99
mbed_official 0:85f4174a8e29 100 #### The routing protocol RPL (6LoWPAN ND)
mbed_official 0:85f4174a8e29 101
mbed_official 0:85f4174a8e29 102 Nanostack Border Router uses [RPL](https://tools.ietf.org/html/rfc6550) as the routing protocol on the mesh network side (RF interface) when in 6LoWPAN-ND mode. Currently, only the `grounded/non-storing` operation mode is supported.
mbed_official 0:85f4174a8e29 103
mbed_official 0:85f4174a8e29 104 Nanostack Border Router offers the following configuration options for RPL:
mbed_official 0:85f4174a8e29 105
mbed_official 0:85f4174a8e29 106 | Field | Description |
mbed_official 0:85f4174a8e29 107 |-------------------------------------|---------------------------------------------------------------|
mbed_official 0:85f4174a8e29 108 | rpl-instance-id | The RPL instance ID value that identifies the RPL instance, default: 1 |
mbed_official 0:85f4174a8e29 109 | rpl-idoublings | RPL Trickle parameter: DIOIntervalDoublings value, default: 12 |
mbed_official 0:85f4174a8e29 110 | rpl-imin | RPL Trickle parameter: DIOIntervalMin value, default: 9 |
mbed_official 0:85f4174a8e29 111 | rpl-k | RPL Trickle parameter: the redundacy constant k, default: 10 |
mbed_official 0:85f4174a8e29 112 | rpl-max-rank-inc | Maximum rank increase value, default: 2048|
mbed_official 0:85f4174a8e29 113 | rpl-min-hop-rank-inc | Minimum rank increase value, default: 128 |
mbed_official 0:85f4174a8e29 114 | rpl-default-lifetime | Default lifetime for the RPL routes, default: 64 |
mbed_official 0:85f4174a8e29 115 | rpl-lifetime-unit | The value of the unit that describes the lifetime (in seconds), default: 60 |
mbed_official 0:85f4174a8e29 116 | rpl-pcs | The number of bits that may be allocated to the path control field. |
mbed_official 0:85f4174a8e29 117 | rpl-ocp | The Objective Function (OF) to use, values: 1=OF0 (default), 2=MRHOF |
mbed_official 0:85f4174a8e29 118
mbed_official 0:85f4174a8e29 119 ### Thread configuration
mbed_official 0:85f4174a8e29 120
mbed_official 0:85f4174a8e29 121 The Thread-specific parameters are listed below.
mbed_official 0:85f4174a8e29 122
mbed_official 0:85f4174a8e29 123 | Field | Description |
mbed_official 0:85f4174a8e29 124 |-------------------------------------|---------------------------------------------------------------|
mbed_official 0:85f4174a8e29 125 | `commissioning-dataset-timestamp` | Used for updating the Thread network parameters. The device with the highest value propagates the parameters to the network (in the same Realm-Local scope). |
mbed_official 0:85f4174a8e29 126 | `pan-id` | 2-byte Personal Area Network ID. |
mbed_official 0:85f4174a8e29 127 | `extended-pan-id` | 8-byte value used to identify Thread networks in range. |
mbed_official 0:85f4174a8e29 128 | `mesh-local-prefix` | ULA prefix used for communication within the Thread network. |
mbed_official 0:85f4174a8e29 129 | `network-name` | A human-readable name for the network. |
mbed_official 0:85f4174a8e29 130 | `pskc` | Pre-Shared Key for the Commissioner. |
mbed_official 0:85f4174a8e29 131 | `pskd` | Pre-Shared Key for the device. |
mbed_official 0:85f4174a8e29 132 | `thread-master-key` | A key used to derive security material for MAC and MLE protection. |
mbed_official 0:85f4174a8e29 133
mbed_official 0:85f4174a8e29 134
mbed_official 0:85f4174a8e29 135 For the Thread Border Router, there are example configuration files for `SLIP` and `ETH` backhaul connectivity:
mbed_official 0:85f4174a8e29 136
mbed_official 0:85f4174a8e29 137 * [configs/Thread_Atmel_RF.json](configs/Thread_Atmel_RF.json)
mbed_official 0:85f4174a8e29 138 * [configs/Thread_SLIP_Atmel_RF.json](configs/Thread_SLIP_Atmel_RF.json)
mbed_official 0:85f4174a8e29 139
mbed_official 0:85f4174a8e29 140 The [mbedtls_thread_config.h](source/mbedtls_thread_config.h) file configures mbed TLS for Thread use.
mbed_official 0:85f4174a8e29 141
mbed_official 0:85f4174a8e29 142 <span class="notes">**Note:** The configuration examples are for testing purposes only; do not use them for production or expose them.</span>
mbed_official 0:85f4174a8e29 143
mbed_official 0:85f4174a8e29 144
mbed_official 0:85f4174a8e29 145 #### Backhaul connectivity
mbed_official 0:85f4174a8e29 146
mbed_official 0:85f4174a8e29 147 The Nanostack border router application can be connected to a backhaul network. This enables you to connect the devices in a 6LoWPAN mesh network to the internet or a private LAN. Currently, the application supports SLIP (IPv6 encapsulation over a serial line) and Ethernet backhaul connectivity.
mbed_official 0:85f4174a8e29 148
mbed_official 0:85f4174a8e29 149 ```
mbed_official 0:85f4174a8e29 150 "config": {
mbed_official 0:85f4174a8e29 151 "backhaul-driver": {
mbed_official 65:92e581c01e8c 152 "help": "options are ETH, SLIP, EMAC",
mbed_official 0:85f4174a8e29 153 "value": "ETH"
mbed_official 0:85f4174a8e29 154 },
mbed_official 0:85f4174a8e29 155 "backhaul-mac-src": {
mbed_official 0:85f4174a8e29 156 "help": "Where to get EUI48 address. Options are BOARD, CONFIG",
mbed_official 0:85f4174a8e29 157 "value": "BOARD"
mbed_official 0:85f4174a8e29 158 },
mbed_official 0:85f4174a8e29 159 "backhaul-mac": "{0x02, 0x00, 0x00, 0x00, 0x00, 0x01}",
mbed_official 0:85f4174a8e29 160 "backhaul-dynamic-bootstrap": true,
mbed_official 0:85f4174a8e29 161 "backhaul-prefix": "\"fd00:300::\"",
mbed_official 0:85f4174a8e29 162 "backhaul-next-hop": "\"fe80::1\"",
mbed_official 0:85f4174a8e29 163 "backhaul-default-route": "\"::/0\"",
mbed_official 0:85f4174a8e29 164 .............
mbed_official 0:85f4174a8e29 165 }
mbed_official 0:85f4174a8e29 166 ```
mbed_official 0:85f4174a8e29 167
mbed_official 65:92e581c01e8c 168 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).
mbed_official 65:92e581c01e8c 169
mbed_official 65:92e581c01e8c 170 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`.
mbed_official 0:85f4174a8e29 171
mbed_official 0:85f4174a8e29 172 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`.
mbed_official 0:85f4174a8e29 173
mbed_official 0:85f4174a8e29 174 If you use the static bootstrap mode, you need to configure a default route on the backhaul interface to properly forward packets between the backhaul and the 6LoWPAN mesh network. In addition to this, you need to set a backhaul prefix. The static mode creates a site-local IPv6 network from which packets cannot be routed outside.
mbed_official 0:85f4174a8e29 175
mbed_official 0:85f4174a8e29 176 When using the autonomous mode in the 6LoWPAN ND configuration, you can set the `prefix-from-backhaul` option to `true` to use the same backhaul prefix on the mesh network side as well. This allows the mesh nodes to be directly connectable from the outside of the mesh network. In the Thread network, it is enough that `backhaul-dynamic-bootstrap` is set to true.
mbed_official 0:85f4174a8e29 177
mbed_official 0:85f4174a8e29 178
mbed_official 0:85f4174a8e29 179 #### Note on the SLIP backhaul driver
mbed_official 0:85f4174a8e29 180
mbed_official 0:85f4174a8e29 181 If you are using a K64F board, you need to use the UART1 serial line of the board with the SLIP driver. See the `pins` section in the [mbed_app.json](./mbed_app.json) configuration file. To use a different UART line, replace the `SERIAL_TX` and `SERIAL_RX` values with correct TX/RX pin names.
mbed_official 0:85f4174a8e29 182
mbed_official 0:85f4174a8e29 183 If you wish to use the hardware flow control, set the configuration field `slip_hw_flow_control` to true. By default, it is set to false. Before using hardware flow control, make sure that the other end of your SLIP interface can handle the flow control.
mbed_official 0:85f4174a8e29 184
mbed_official 0:85f4174a8e29 185 For the pin names of your desired UART line, refer to your development board's documentation.
mbed_official 0:85f4174a8e29 186
mbed_official 0:85f4174a8e29 187 An example configuration for the SLIP driver:
mbed_official 0:85f4174a8e29 188
mbed_official 0:85f4174a8e29 189 ```
mbed_official 0:85f4174a8e29 190 "target_overrides": {
mbed_official 0:85f4174a8e29 191 "K64F": {
mbed_official 0:85f4174a8e29 192 "SERIAL_TX": "PTE0",
mbed_official 0:85f4174a8e29 193 "SERIAL_RX": "PTE1",
mbed_official 0:85f4174a8e29 194 "SERIAL_CTS": "PTE2",
mbed_official 0:85f4174a8e29 195 "SERIAL_RTS": "PTE3"
mbed_official 0:85f4174a8e29 196 }
mbed_official 0:85f4174a8e29 197 ```
mbed_official 0:85f4174a8e29 198
mbed_official 65:92e581c01e8c 199 #### Note on EMAC backhaul
mbed_official 65:92e581c01e8c 200
mbed_official 65:92e581c01e8c 201 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.
mbed_official 65:92e581c01e8c 202
mbed_official 65:92e581c01e8c 203 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.
mbed_official 65:92e581c01e8c 204
mbed_official 65:92e581c01e8c 205 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`.
mbed_official 65:92e581c01e8c 206
mbed_official 0:85f4174a8e29 207 ### Switching the RF shield
mbed_official 0:85f4174a8e29 208
mbed_official 0:85f4174a8e29 209 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.
mbed_official 0:85f4174a8e29 210
mbed_official 0:85f4174a8e29 211 To select the Atmel radio shield, use the following:
mbed_official 0:85f4174a8e29 212
mbed_official 0:85f4174a8e29 213 ```
mbed_official 0:85f4174a8e29 214 "radio-type":{
mbed_official 0:85f4174a8e29 215 "help": "options are ATMEL, MCR20, SPIRIT1",
mbed_official 0:85f4174a8e29 216 "value": "ATMEL"
mbed_official 0:85f4174a8e29 217 },
mbed_official 0:85f4174a8e29 218 ```
mbed_official 0:85f4174a8e29 219
mbed_official 0:85f4174a8e29 220 To select the NXP radio shield, use the following:
mbed_official 0:85f4174a8e29 221
mbed_official 0:85f4174a8e29 222 ```
mbed_official 0:85f4174a8e29 223 "radio-type":{
mbed_official 0:85f4174a8e29 224 "help": "options are ATMEL, MCR20, SPIRIT1",
mbed_official 0:85f4174a8e29 225 "value": "MCR20"
mbed_official 0:85f4174a8e29 226 },
mbed_official 0:85f4174a8e29 227 ```
mbed_official 0:85f4174a8e29 228
mbed_official 0:85f4174a8e29 229 To select the STM Spirit1 radio shield, use the following:
mbed_official 0:85f4174a8e29 230
mbed_official 0:85f4174a8e29 231 ```
mbed_official 0:85f4174a8e29 232 "radio-type":{
mbed_official 0:85f4174a8e29 233 "help": "options are ATMEL, MCR20, SPIRIT1",
mbed_official 0:85f4174a8e29 234 "value": "SPIRIT1"
mbed_official 0:85f4174a8e29 235 },
mbed_official 0:85f4174a8e29 236 ```
mbed_official 0:85f4174a8e29 237
mbed_official 0:85f4174a8e29 238 In case you have choosen the STM Spirit1 Sub-1 GHz RF expansion board [X-NUCLEO-IDS01A4](https://github.com/ARMmbed/stm-spirit1-rf-driver), you need also to configure its MAC address in the `mbed_app.json` file, for example:
mbed_official 0:85f4174a8e29 239
mbed_official 0:85f4174a8e29 240 ```json
mbed_official 0:85f4174a8e29 241 "target_overrides": {
mbed_official 0:85f4174a8e29 242 "*": {
mbed_official 0:85f4174a8e29 243 "spirit1.mac-address": "{0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7}"
mbed_official 0:85f4174a8e29 244 },
mbed_official 0:85f4174a8e29 245 }
mbed_official 0:85f4174a8e29 246 ```
mbed_official 0:85f4174a8e29 247
mbed_official 0:85f4174a8e29 248 <span class="notes">**Not**: This MAC address must be unique within the 6LoWPAN mesh network.</span>
mbed_official 0:85f4174a8e29 249
mbed_official 0:85f4174a8e29 250 After changing the radio shield, you need to recompile the application.
mbed_official 0:85f4174a8e29 251
mbed_official 65:92e581c01e8c 252 ## File system support
mbed_official 65:92e581c01e8c 253
mbed_official 65:92e581c01e8c 254 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.
mbed_official 65:92e581c01e8c 255
mbed_official 65:92e581c01e8c 256 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:
mbed_official 65:92e581c01e8c 257
mbed_official 65:92e581c01e8c 258 `ns_file_system_set_root_path(root-path)`
mbed_official 65:92e581c01e8c 259
mbed_official 65:92e581c01e8c 260 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.
mbed_official 65:92e581c01e8c 261
mbed_official 65:92e581c01e8c 262
mbed_official 0:85f4174a8e29 263 ## Running the border router application
mbed_official 0:85f4174a8e29 264
mbed_official 0:85f4174a8e29 265 1. Find the binary file `nanostack-border-router.bin` in the `BUILD` folder.
mbed_official 0:85f4174a8e29 266 2. Copy the binary to the USB mass storage root of the development board. It is automatically flashed to the target MCU. When the flashing is complete, the board restarts itself. Press the **Reset** button of the development board if it does not restart automatically.
mbed_official 0:85f4174a8e29 267 3. The program begins execution.
mbed_official 0:85f4174a8e29 268 4. Open the [serial connection](#serial-connection-settings), for example PuTTY.
mbed_official 0:85f4174a8e29 269
mbed_official 0:85f4174a8e29 270 ## Serial connection settings
mbed_official 0:85f4174a8e29 271
mbed_official 0:85f4174a8e29 272 Serial connection settings for the Nanorouter are as follows:
mbed_official 0:85f4174a8e29 273
mbed_official 0:85f4174a8e29 274 * Baud-rate = 115200
mbed_official 0:85f4174a8e29 275 * Data bits = 8
mbed_official 0:85f4174a8e29 276 * Stop bits = 1
mbed_official 0:85f4174a8e29 277
mbed_official 0:85f4174a8e29 278 If there is no input from the serial terminal, press the **Reset** button of the development board.
mbed_official 0:85f4174a8e29 279
mbed_official 0:85f4174a8e29 280 In the PuTTY main screen, save the session and click **Open**. This opens a console window showing debug messages from the application. If the console screen is blank, you may need to press the **Reset** button of the board to see the debug information. The serial output from the 6LoWPAN border router looks something like this in the console:
mbed_official 0:85f4174a8e29 281
mbed_official 0:85f4174a8e29 282 ```
mbed_official 0:85f4174a8e29 283 [INFO][app ]: Starting Nanostack border router...
mbed_official 0:85f4174a8e29 284 [INFO][brro]: NET_IPV6_BOOTSTRAP_AUTONOMOUS
mbed_official 0:85f4174a8e29 285 [INFO][app ]: Using ETH backhaul driver...
mbed_official 0:85f4174a8e29 286 [INFO][Eth ]: Ethernet cable is connected.
mbed_official 0:85f4174a8e29 287 [INFO][addr]: Tentative Address added to IF 1: fe80::ac41:dcff:fe37:72c4
mbed_official 0:85f4174a8e29 288 [INFO][addr]: DAD passed on IF 1: fe80::ac41:dcff:fe37:72c4
mbed_official 0:85f4174a8e29 289 [INFO][addr]: Tentative Address added to IF 1: 2001:999:21:9ce:ac41:dcff:fe37:72c4
mbed_official 0:85f4174a8e29 290 [INFO][addr]: DAD passed on IF 1: 2001:999:21:9ce:ac41:dcff:fe37:72c4
mbed_official 0:85f4174a8e29 291 [INFO][brro]: Backhaul bootstrap ready, IPv6 = 2001:999:21:9ce:ac41:dcff:fe37:72c4
mbed_official 0:85f4174a8e29 292 [INFO][brro]: Backhaul interface addresses:
mbed_official 0:85f4174a8e29 293 [INFO][brro]: [0] fe80::ac41:dcff:fe37:72c4
mbed_official 0:85f4174a8e29 294 [INFO][brro]: [1] 2001:999:21:9ce:ac41:dcff:fe37:72c4
mbed_official 0:85f4174a8e29 295 [INFO][addr]: Address added to IF 0: fe80::ff:fe00:face
mbed_official 0:85f4174a8e29 296 [INFO][br ]: BR nwk base ready for start
mbed_official 0:85f4174a8e29 297 [INFO][br ]: Refresh Contexts
mbed_official 0:85f4174a8e29 298 [INFO][br ]: Refresh Prefixs
mbed_official 0:85f4174a8e29 299 [INFO][addr]: Address added to IF 0: 2001:999:21:9ce:0:ff:fe00:face
mbed_official 0:85f4174a8e29 300 [INFO][addr]: Address added to IF 0: fe80::fec2:3d00:4:a0cd
mbed_official 0:85f4174a8e29 301 [INFO][brro]: RF bootstrap ready, IPv6 = 2001:999:21:9ce:0:ff:fe00:face
mbed_official 0:85f4174a8e29 302 [INFO][brro]: RF interface addresses:
mbed_official 0:85f4174a8e29 303 [INFO][brro]: [0] fe80::ff:fe00:face
mbed_official 0:85f4174a8e29 304 [INFO][brro]: [1] fe80::fec2:3d00:4:a0cd
mbed_official 0:85f4174a8e29 305 [INFO][brro]: [2] 2001:999:21:9ce:0:ff:fe00:face
mbed_official 0:85f4174a8e29 306 [INFO][brro]: 6LoWPAN Border Router Bootstrap Complete.
mbed_official 0:85f4174a8e29 307 ```
mbed_official 65:92e581c01e8c 308
mbed_official 65:92e581c01e8c 309 ## Known Issues
mbed_official 65:92e581c01e8c 310 * Application does not link with NUCLEO_F429ZI boards, issue #[113](https://github.com/ARMmbed/nanostack-border-router/issues/113)
mbed_official 65:92e581c01e8c 311