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
+25-25Lines changed: 25 additions & 25 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
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.
214
+
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.
215
215
216
216
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/).
217
217
218
-
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).
218
+
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).
219
219
220
220
<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>
221
221
@@ -224,15 +224,15 @@ Also, the complete example configuration of mbed Client, the selected network in
224
224
225
225
### Client credentials
226
226
227
-
To register the application with the mbed Device Connector service, you need to create and set the client side certificate.
227
+
To register the application with the Mbed Device Connector service, you need to create and set the client side certificate.
228
228
229
-
1. Go to [mbed Device Connector](https://connector.mbed.com) and log in with your mbed account.
230
-
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.
229
+
1. Go to [Mbed Device Connector](https://connector.mbed.com) and log in with your Mbed account.
230
+
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.
231
231
1. Replace the contents in the `security.h` file of this project's folder with the content copied above.
232
232
233
233
### IP address setup
234
234
235
-
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:
235
+
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:
236
236
237
237
```
238
238
"target_overrides": {
@@ -252,7 +252,7 @@ If your network does not have DHCP enabled, you have to manually assign a static
252
252
253
253
### Changing the socket type
254
254
255
-
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.
255
+
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.
256
256
257
257
To change the binding mode:
258
258
@@ -274,7 +274,7 @@ Possible socket types per connection:
274
274
275
275
## Building the example
276
276
277
-
To build the example using mbed CLI:
277
+
To build the example using Mbed CLI:
278
278
279
279
1. Open a command line tool and navigate to the project’s directory.
280
280
@@ -327,9 +327,9 @@ Import this repository in the Online IDE and continue from step 3 onwards.
327
327
328
328
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.
329
329
330
-
<span class="notes">**Note:** Instructions to set this up are located [here](https://developer.mbed.org/handbook/SerialPC#host-interface-and-terminal-applications).</span>
330
+
<span class="notes">**Note:** Instructions to set this up are located [here](https://os.mbed.com/handbook/SerialPC#host-interface-and-terminal-applications).</span>
331
331
332
-
After connecting, you should see messages about connecting to mbed Device Connector:
332
+
After connecting, you should see messages about connecting to Mbed Device Connector:
333
333
334
334
```
335
335
Starting mbed Client example
@@ -358,14 +358,14 @@ handle_button_click, new value of counter is 1
358
358
359
359
1. Flash the application.
360
360
2. Verify that the registration succeeded. You should see `Registered object successfully!` printed to the serial port.
361
-
3. On mbed Device Connector, go to [My devices > Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here.
361
+
3. On Mbed Device Connector, go to [My devices > Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here.
362
362
4. Press the **SW2** button on the device a number of times (make a note of how many times you did that).
363
363
5. Go to [Device Connector > API Console](https://connector.mbed.com/#console).
364
364
6. Click the **Endpoint directory lookups** drop down menu.
365
365

366
366
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**.
367
367
8. The number of times you pressed **SW2** is shown.
368
-
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.
368
+
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.
369
369
370
370
<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>
371
371
@@ -383,11 +383,11 @@ The application exposes three [resources](https://docs.mbed.com/docs/mbed-device
383
383
2. `3201/0/5850`. Blink function, blinks **LED1** when executed (POST).
384
384
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).
385
385
386
-
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).
386
+
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).
387
387
388
388
## Known issues
389
389
390
-
### mbed OS 5.4
390
+
### Mbed OS 5.4
391
391
392
392
* [UBLOX_EVK_ODIN_W2]: This example is not compiling with IAR. See [#194](https://github.com/ARMmbed/mbed-os-example-client/issues/194)
393
393
* [NUCLEO_F429ZI]: This example is not compiling with IAR. See [#194](https://github.com/ARMmbed/mbed-os-example-client/issues/194)
0 commit comments