You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 24, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+32-26Lines changed: 32 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
# Getting started with mbed Client on mbed OS
1
+
# Getting started with Mbed Client on Mbed OS
2
2
3
-
This is the mbed Client example for mbed OS (we also have one for [Linux](https://github.com/ARMmbed/mbed-client-linux-example)). It demonstrates how to register a device with mbed Device Connector, how to read and write values, and how to deregister. If you are unfamiliar with mbed Device Connector, we recommend that you read [the introduction to the data model](https://docs.mbed.com/docs/mbed-device-connector-web-interfaces/en/latest/#the-mbed-device-connector-data-model) first.
3
+
This is the Mbed Client example for Mbed OS (we also have one for [Linux](https://github.com/ARMmbed/mbed-client-linux-example)). It demonstrates how to register a device with Mbed Device Connector, how to read and write values, and how to deregister. If you are unfamiliar with Mbed Device Connector, we recommend that you read [the introduction to the data model](https://docs.mbed.com/docs/mbed-device-connector-web-interfaces/en/latest/#the-mbed-device-connector-data-model) first.
*[mbed-cli](https://github.com/ARMmbed/mbed-cli) - to build the example programs. To learn how to build mbed OS applications with mbed-cli, see [the user guide](https://github.com/ARMmbed/mbed-cli/blob/master/README.md).
*[mbed-cli](https://github.com/ARMmbed/mbed-cli) - to build the example programs. To learn how to build Mbed OS applications with mbed-cli, see [the user guide](https://github.com/ARMmbed/mbed-cli/blob/master/README.md).
9
9
*[Serial port monitor](https://developer.mbed.org/handbook/SerialPC#host-interface-and-terminal-applications).
10
10
11
11
The application:
12
12
13
13
* Connects to network with WiFi, Ethernet, 6LoWPAN ND or Thread connection.
14
-
* Registers with mbed Device Connector.
15
-
* Gives mbed Device Connector access to its resources (read and write).
16
-
* Records the number of clicks on the device’s button and sends the number to mbed Device Connector.
17
-
* Lets you control the blink pattern of the LED on the device (through mbed Device Connector).
14
+
* Registers with Mbed Device Connector.
15
+
* Gives Mbed Device Connector access to its resources (read and write).
16
+
* Records the number of clicks on the device’s button and sends the number to Mbed Device Connector.
17
+
* Lets you control the blink pattern of the LED on the device (through Mbed Device Connector).
18
18
19
19
## Application setup
20
20
@@ -55,7 +55,7 @@ defines the defaults settings for applications. The most relevant parameters are
*[Supported combinations of board and shields](#supported-combinations-of-board-and-shields)
61
61
@@ -128,7 +128,7 @@ For sub-GHz shields ([Spirit1](https://github.com/ARMmbed/stm-spirit1-rf-driver)
128
128
129
129
For more information about the radio shields, see [the related documentation](docs/radio_module_identify.md).
130
130
131
-
131
+
=======
132
132
#### Supported combinations of board and shields
133
133
134
134
See Mesh-minimal's [Notes on different hardware](https://github.com/ARMmbed/mbed-os-example-mesh-minimal/blob/master/Hardware.md) for known combinations of development boards and RF shields that have been tested with mesh networking stack.
@@ -161,8 +161,8 @@ With Thread, you can change the operating mode of the client from the default ro
161
161
To run this application using ESP8266 WiFi Interface, you need:
162
162
163
163
1. An [ESP8266](https://en.wikipedia.org/wiki/ESP8266) WiFi module.
1. Mount the WiFi module onto [K64F Grove Shield v2](https://os.mbed.com/platforms/FRDM-K64F/#supported-seeed-studio-grove-extension).
166
166
1. Attach the shield on your board.
167
167
1. In the `mbed_app.json` file, change:
168
168
@@ -235,11 +235,11 @@ If you have issues with the `X-NUCLEO-IDW04A1` board, please double-check that m
235
235
236
236
### Non listed board support
237
237
238
-
Apart from the listed configurations, this example can work on other mbed OS supported hardware boards which support any of the given network interface including Ethernet, WiFi, Mesh (6LoWPAN) or Thread, provided the configuration fulfills condition that the target hardware has TLS entropy implemented for it. On devices where hardware entropy is not present, TLS is disabled by default. This would result in compile time failures or linking failures.
238
+
Apart from the listed configurations, this example can work on other Mbed OS supported hardware boards which support any of the given network interface including Ethernet, WiFi, Mesh (6LoWPAN) or Thread, provided the configuration fulfills condition that the target hardware has TLS entropy implemented for it. On devices where hardware entropy is not present, TLS is disabled by default. This would result in compile time failures or linking failures.
239
239
240
240
To learn why entropy is required, read the [TLS Porting guide](https://docs.mbed.com/docs/mbed-os-handbook/en/5.2/advanced/tls_porting/).
241
241
242
-
Also, the complete example configuration of mbed Client, the selected network interface and mbed OS components must fit into hardware's given memory size (Flash size and RAM size).
242
+
Also, the complete example configuration of Mbed Client, the selected network interface and Mbed OS components must fit into hardware's given memory size (Flash size and RAM size).
243
243
244
244
<spanclass="notes">**Note:** On non-K64F boards, there is no unregistration functionality and button presses are simulated through timer ticks incrementing every 15 seconds.</span>
245
245
@@ -248,15 +248,15 @@ Also, the complete example configuration of mbed Client, the selected network in
248
248
249
249
### Client credentials
250
250
251
-
To register the application with the mbed Device Connector service, you need to create and set the client side certificate.
251
+
To register the application with the Mbed Device Connector service, you need to create and set the client side certificate.
252
252
253
-
1. Go to [mbed Device Connector](https://connector.mbed.com) and log in with your mbed account.
254
-
1. On mbed Device Connector, go to [My Devices > Security credentials](https://connector.mbed.com/#credentials) and click the **Get my device security credentials** to get new credentials for your device.
253
+
1. Go to [Mbed Device Connector](https://connector.mbed.com) and log in with your Mbed account.
254
+
1. On Mbed Device Connector, go to [My Devices > Security credentials](https://connector.mbed.com/#credentials) and click the **Get my device security credentials** to get new credentials for your device.
255
255
1. Replace the contents in the `security.h` file of this project's folder with the content copied above.
256
256
257
257
### IP address setup
258
258
259
-
This example uses IPv4 to communicate with the [mbed Device Connector Server](https://api.connector.mbed.com) except for 6LoWPAN ND and Thread. However, you can easily change it to IPv6 by changing the `mbed_app.json` you make:
259
+
This example uses IPv4 to communicate with the [Mbed Device Connector Server](https://api.connector.mbed.com) except for 6LoWPAN ND and Thread. However, you can easily change it to IPv6 by changing the `mbed_app.json` you make:
260
260
261
261
```
262
262
"target_overrides": {
@@ -276,7 +276,7 @@ If your network does not have DHCP enabled, you have to manually assign a static
276
276
277
277
### Changing the socket type
278
278
279
-
Your device can connect to mbed Device Connector via UDP or TCP binding mode. The default and only allowed value is UDP for Thread and 6LoWPAN. TCP is the default for other connections. The binding mode cannot be changed in 6LoWPAN ND or Thread mode.
279
+
Your device can connect to Mbed Device Connector via UDP or TCP binding mode. The default and only allowed value is UDP for Thread and 6LoWPAN. TCP is the default for other connections. The binding mode cannot be changed in 6LoWPAN ND or Thread mode.
280
280
281
281
To change the binding mode:
282
282
@@ -291,14 +291,14 @@ Possible socket types per connection:
291
291
| Network interface | UDP | TCP |
292
292
| ------------------------------|:-----:|:-----:|
293
293
| Ethernet (IPv4) | X | X |
294
-
| Ethernet (IPv6) | X |X|
294
+
| Ethernet (IPv6) | X ||
295
295
| Wifi (IPv4) | X | X |
296
296
| Wifi (IPv6) - Not supported |||
297
297
| 6LoWPAN/Thread (IPv6) | X ||
298
298
299
299
## Building the example
300
300
301
-
To build the example using mbed CLI:
301
+
To build the example using Mbed CLI:
302
302
303
303
1. Open a command line tool and navigate to the project’s directory.
304
304
@@ -351,9 +351,9 @@ Import this repository in the Online IDE and continue from step 3 onwards.
351
351
352
352
The application prints debug messages over the serial port, so you can monitor its activity with a serial port monitor. The application uses baud rate 115200.
353
353
354
-
<span class="notes">**Note:** Instructions to set this up are located [here](https://developer.mbed.org/handbook/SerialPC#host-interface-and-terminal-applications).</span>
354
+
<span class="notes">**Note:** Instructions to set this up are located [here](https://os.mbed.com/handbook/SerialPC#host-interface-and-terminal-applications).</span>
355
355
356
-
After connecting, you should see messages about connecting to mbed Device Connector:
356
+
After connecting, you should see messages about connecting to Mbed Device Connector:
357
357
358
358
```
359
359
Starting mbed Client example
@@ -382,14 +382,14 @@ handle_button_click, new value of counter is 1
382
382
383
383
1. Flash the application.
384
384
2. Verify that the registration succeeded. You should see `Registered object successfully!` printed to the serial port.
385
-
3. On mbed Device Connector, go to [My devices > Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here.
385
+
3. On Mbed Device Connector, go to [My devices > Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here.
386
386
4. Press the **SW2** button on the device a number of times (make a note of how many times you did that).
387
387
5. Go to [Device Connector > API Console](https://connector.mbed.com/#console).
388
388
6. Click the **Endpoint directory lookups** drop down menu.
389
389

390
390
7. In the menu, click **GET** next to **Endpoint's resource representation**. Select your _endpoint_ and _resource-path_. For example, the _endpoint_ is the identifier of your endpoint that can be found in the `security.h` file as `MBED_ENDPOINT_NAME`. Select `3200/0/5501`as a resource path and click **TEST API**.
391
391
8. The number of times you pressed **SW2** is shown.
392
-
9. Press the **SW3** button to unregister from mbed Device Connector. You should see `Unregistered Object Successfully` printed to the serial port and the LED starts blinking. This will also stop your application. Press the **Reset** button to run the program again.
392
+
9. Press the **SW3** button to unregister from Mbed Device Connector. You should see `Unregistered Object Successfully` printed to the serial port and the LED starts blinking. This will also stop your application. Press the **Reset** button to run the program again.
393
393
394
394
<span class="notes">**Note:** On non-K64F boards, there is no unregistration functionality and button presses are simulated through timer ticks incrementing every 15 seconds.</span>
395
395
@@ -407,7 +407,13 @@ The application exposes three [resources](https://docs.mbed.com/docs/mbed-device
407
407
2. `3201/0/5850`. Blink function, blinks **LED1** when executed (POST).
408
408
3. `3201/0/5853`. Blink pattern, used by the blink function to determine how to blink. In the format of `1000:500:1000:500:1000:500` (PUT).
409
409
410
-
To learn how to get notifications when resource 1 changes, or how to use resources 2 and 3, read the [mbed Device Connector Quick Start](https://github.com/ARMmbed/mbed-connector-api-node-quickstart).
410
+
To learn how to get notifications when resource 1 changes, or how to use resources 2 and 3, read the [Mbed Device Connector Quick Start](https://github.com/ARMmbed/mbed-connector-api-node-quickstart).
411
411
412
412
## Known issues
413
413
414
+
### Mbed OS 5.4
415
+
416
+
* [UBLOX_EVK_ODIN_W2]: This example is not compiling with IAR. See [#194](https://github.com/ARMmbed/mbed-os-example-client/issues/194)
417
+
* [NUCLEO_F429ZI]: This example is not compiling with IAR. See [#194](https://github.com/ARMmbed/mbed-os-example-client/issues/194)
418
+
419
+
Fix for those issues coming via; [mbed-os PR 3920] (https://github.com/ARMmbed/mbed-os/pull/3920)
0 commit comments