This application is the simplest one to utilize our mesh networking stack. It just joins your device to the unsecure 6LoWPAN-ND network. The canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-mesh-minimal

Example mesh application for Mbed OS

With this application, you can use our mesh networking stack. This application joins your device to the unsecure 6LoWPAN-ND network.

Setup

Building with Mbed CLI

If you'd like to use Mbed CLI to build this offline, then you should refer to the Mbed CLI documentation. The instructions here relate to using the Mbed Online Compiler

  1. Click `Import this application` button.
  2. Change the channel settings: See the file `mbed_app.json` for an example of defining an IEEE 802.15.4 channel to use.
  3. Compile the application

A binary is generated at the end of the build process.

Connect the RF shield to the board

By default, we are using the Atmel AT86RF233, which you can purchase. Place the shield on top of your board, and power it on.

Program the target

Drag and drop the binary to the target to program the application.

Update the firmware of the border router.

You can read the instructions on updating the firmware of your board working as 6LoWPAN border router here.

Please remember to connect the Ethernet cable between the border router and your router. Then, power up the board.

Testing

As soon as both the border router and the target are up and running, you can verify the correct behavior. Open a serial console, and see the IP address obtained by the device.

Note: This application uses a baud rate of 115200.

Quote:

connected. IP = 2001:db8:a0b:12f0::1

You can use this IP address to ping from your PC and verify that the connection is working correctly.

Changing the radio driver (optional)

To run a 6LoWPAN-ND network, you need a working RF driver for Nanostack. This example uses the Atmel AT86RF233 by default.

To change the RF driver:

  1. Uninstall the Atmel RF driver.
  2. Install the new driver. (For example, for the FRDM-CR20A radio shield based on the MCR20A device.)
  3. Recompile your application.
Committer:
mbed_official
Date:
Fri Jan 19 08:15:09 2018 +0000
Revision:
72:a7c594402382
Enable NVM for Thread devices (#166)

Allow Thread devices to store files to NVM.
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-mesh-minimal

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 72:a7c594402382 1 /*
mbed_official 72:a7c594402382 2 * Copyright (c) 2017 ARM Limited. All rights reserved.
mbed_official 72:a7c594402382 3 * SPDX-License-Identifier: Apache-2.0
mbed_official 72:a7c594402382 4 * Licensed under the Apache License, Version 2.0 (the License); you may
mbed_official 72:a7c594402382 5 * not use this file except in compliance with the License.
mbed_official 72:a7c594402382 6 * You may obtain a copy of the License at
mbed_official 72:a7c594402382 7 *
mbed_official 72:a7c594402382 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 72:a7c594402382 9 *
mbed_official 72:a7c594402382 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 72:a7c594402382 11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
mbed_official 72:a7c594402382 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 72:a7c594402382 13 * See the License for the specific language governing permissions and
mbed_official 72:a7c594402382 14 * limitations under the License.
mbed_official 72:a7c594402382 15 */
mbed_official 72:a7c594402382 16 #ifndef MESH_NVM_H
mbed_official 72:a7c594402382 17 #define MESH_NVM_H
mbed_official 72:a7c594402382 18
mbed_official 72:a7c594402382 19 void mesh_nvm_initialize(void);
mbed_official 72:a7c594402382 20
mbed_official 72:a7c594402382 21 #endif