PES4 / Mbed OS Queue_02
Committer:
demayer
Date:
Sat Apr 11 08:15:48 2020 +0000
Revision:
1:b36bbc1c6d27
Parent:
0:6bf0743ece18
IMU-library in .h und .cpp file aufgeteilt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
demayer 0:6bf0743ece18 1 ## How to commission a Thread device in practise
demayer 0:6bf0743ece18 2
demayer 0:6bf0743ece18 3 ### Building the node application
demayer 0:6bf0743ece18 4
demayer 0:6bf0743ece18 5 By default, the mbed Thread applications/examples use the static network link configuration defined in the [mesh-api configuration file](https://github.com/ARMmbed/mbed-os/blob/master/features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/mbed_lib.json).
demayer 0:6bf0743ece18 6 If you want to use the Thread commissioning, add the following lines to your `.json` file. You can use the [mesh-minimal](https://github.com/ARMmbed/mbed-os-example-mesh-minimal) application as an example.
demayer 0:6bf0743ece18 7
demayer 0:6bf0743ece18 8 * `"mbed-mesh-api.thread-use-static-link-config": false`
demayer 0:6bf0743ece18 9 * `"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\""]`
demayer 0:6bf0743ece18 10
demayer 0:6bf0743ece18 11 Setting `thread-use-static-link-config` to `false` prevents the usage of the predefined link configuration values and allows the device to start network scanning.
demayer 0:6bf0743ece18 12
demayer 0:6bf0743ece18 13 ### QR code generation
demayer 0:6bf0743ece18 14
demayer 0:6bf0743ece18 15 You can use [a free online tool](http://www.qr-code-generator.com/) to generate a QR code.
demayer 0:6bf0743ece18 16
demayer 0:6bf0743ece18 17 In the tool, fill in the URL field: `v=1&eui=000b57fffe07a8be&cc=PV7TUCB0`.
demayer 0:6bf0743ece18 18 These are just example values. Fill in the correct values for your device and make sure `v=1` is always there.
demayer 0:6bf0743ece18 19
demayer 0:6bf0743ece18 20 * `cc` is the PSKd, which is configured in the `.json` file (see the mesh-api configuration).
demayer 0:6bf0743ece18 21 * `eui` is equal to the RF MAC address by default.
demayer 0:6bf0743ece18 22
demayer 0:6bf0743ece18 23 There are four additional query parameters you can put into this field:
demayer 0:6bf0743ece18 24
demayer 0:6bf0743ece18 25 * `vn` Vendor name
demayer 0:6bf0743ece18 26 * `vm` Vendor model
demayer 0:6bf0743ece18 27 * `vv` Product/Vendor version
demayer 0:6bf0743ece18 28 * `vs` Product/Vendor serial number
demayer 0:6bf0743ece18 29
demayer 0:6bf0743ece18 30 To print the MAC address, you need to connect the node to the Thread network with static configuration enabled, unless you have your own configuration for the MAC address. For example, in the **mesh-minimal** application, place this `printf("MAC address = %s\n", mesh.get_mac_address());` after `printf("connected. IP = %s\n", mesh.get_ip_address());`
demayer 0:6bf0743ece18 31
demayer 0:6bf0743ece18 32 ### Using the Thread commissioning application
demayer 0:6bf0743ece18 33
demayer 0:6bf0743ece18 34 You can use the [Thread Android application](https://play.google.com/store/apps/details?id=org.threadgroup.commissioner) for commissioning:
demayer 0:6bf0743ece18 35
demayer 0:6bf0743ece18 36 1. Set up a connection to the Wi-Fi access point to which the Thread border router is connected. When connected, the application lists your Thread border routers(s).
demayer 0:6bf0743ece18 37 2. Select a border router from the list.
demayer 0:6bf0743ece18 38 3. Enter the passphrase asked by the application. It is `Thread Network` (when using the default mesh-api Thread configuration). After successful connection, the application is ready to scan the QR code.
demayer 0:6bf0743ece18 39 4. Power on your Thread device if it is not already on.
demayer 0:6bf0743ece18 40 5. Scan the QR code. The Thread device should join the network. If you are using the mesh-minimal application you should see the IP address printed: `connected. IP = ...`.