This is a simple mbed client example demonstrating, registration of a device with mbed Device Connector and reading and writing values as well as deregistering on different Network Interfaces including Ethernet, WiFi, 6LoWPAN ND and Thread respectively.
Fork of mbed-os-example-client by
Diff: README.md
- Revision:
- 72:d0c254f237c4
- Parent:
- 71:ec259c9b02ea
- Child:
- 74:2a6c17db52ea
diff -r ec259c9b02ea -r d0c254f237c4 README.md --- a/README.md Mon Mar 13 13:00:12 2017 +0000 +++ b/README.md Mon Mar 13 13:45:12 2017 +0000 @@ -110,13 +110,23 @@ 6LoWPAN ND and Thread use IPv6 for connectivity. Therefore, you need to verify first that you have a working IPv6 connection. To do that, ping the Connector IPv6 address `2607:f0d0:2601:52::20` from your network. +<span class="notes">**Note:** In case you want to use the STM Spirit1 Sub-1 GHz RF expansion board (X-NUCLEO-IDS01A4), you need also to configure its MAC address in the `mbed_app.json` file, for example:</span> + +```json + "target_overrides": { + "*": { + "spirit1.mac-address": "{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7}" + }, + } +``` + #### Border router There are two options for border router. ##### Nanostack-border-router - The [Nanostack-border-router](https://github.com/ARMmbed/nanostack-border-router-private) can be configured and built for the 6LoWPAN ND or Thread mode. + The [nanostack-border-router](https://github.com/ARMmbed/nanostack-border-router) can be configured and built for the 6LoWPAN ND or Thread mode. ##### mbed gateway @@ -137,35 +147,6 @@ You can view debug traces from the gateway with a serial port monitor. The gateway uses baud rate 460800. The gateway IPv6 address is correctly configured when the following trace is visible: `Eth bootstrap ready, IP=XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX`. -<span class="notes">**Note:** In case you want to use the NUCLEO_F429ZI + X-NUCLEO-IDS01A4 target hardware configuration, you need also to use the [stm32-border-router](https://github.com/ARMmbed/stm32-border-router) (that can be used only as a 6LoWPAN BR and only with NUCLEO_F429ZI) as gateway router. In this case, you need to enable another security feature. By default, the `stm32-border-router` uses `PSK` as security.</span> - -You can enable the security here on your mbed-os-example-client application, for example: - -```json - "target_overrides": { - "*": { - "mbed-mesh-api.6lowpan-nd-security-mode": "PSK", - } - } -``` - -Alternatively, you can remove the link layer security from the `stm32-border-router`. To do that, change the [mbed_app.json](https://github.com/ARMmbed/stm32-border-router/blob/master/mbed_app.json) fetched from the `stm32-border-router` repository, for example: - -```json - "config": { - "security-mode": "NONE", - } -``` - -Furthermore, for the STM Spirit1 Sub-1 GHz RF expansion board (X-NUCLEO-IDS01A4) you need also to configure its MAC address in the `mbed_app.json` file, for example: -```json - "target_overrides": { - "*": { - "spirit1.mac-address": "{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7}" - }, - } -``` - #### Channel settings The default 2.4GHz channel settings are already defined by the [mbed-mesh-api](https://github.com/ARMmbed/mbed-mesh-api) to match the mbed gateway settings. The application can override these settings by adding them to the `mbed_app.json` file in the main project directory. For example: @@ -302,29 +283,29 @@ mbed import mbed-os-example-client ``` -4. To build the application, select the hardware board and build the toolchain using the command: +3. To build the application, select the hardware board and build the toolchain using the command: Specify the config file in the build command, for example for 6LoWPAN - ``` + ``` mbed compile -m K64F -t GCC_ARM -c --app-config configs/6lowpan_Atmel_RF.json ``` mbed CLI builds a binary file under the project’s `BUILD/` directory. -5. Plug the Ethernet cable into the board if you are using Ethernet mode. +4. Plug the Ethernet cable into the board if you are using Ethernet mode. -6. If you are using 6LoWPAN ND or Thread mode, connect and power on the gateway first. +5. If you are using 6LoWPAN ND or Thread mode, connect and power on the gateway first. -7. Plug the micro-USB cable into the **OpenSDA** port. The board is listed as a mass-storage device. +6. Plug the micro-USB cable into the **OpenSDA** port. The board is listed as a mass-storage device. -8. Drag the binary `BUILD/K64F/GCC_ARM/mbed-os-example-client.bin` to the board to flash the application. +7. Drag the binary `BUILD/K64F/GCC_ARM/mbed-os-example-client.bin` to the board to flash the application. -9. The board is automatically programmed with the new binary. A flashing LED on it indicates that it is still working. When the LED stops blinking, the board is ready to work. +8. The board is automatically programmed with the new binary. A flashing LED on it indicates that it is still working. When the LED stops blinking, the board is ready to work. -10. Press the **Reset** button on the board to run the program. +9. Press the **Reset** button on the board to run the program. -11. For verification, continue to the [Monitoring the application](#monitoring-the-application) chapter. +10. For verification, continue to the [Monitoring the application](#monitoring-the-application) chapter. **To build the example using the Online IDE:**