Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Commit 15b6779

Browse files
author
Antti Yli-Tokola
committed
Merge pull request #59 from ARMmbed/IOTCLT-639
Update README.md
2 parents d635cb8 + 50b7521 commit 15b6779

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

README.md

+19-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Getting started with mbed Client on mbed OS
22

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're unfamiliar with mbed Device Connector, we recommend 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.
44

55
The application:
66

@@ -36,17 +36,17 @@ To build the example application:
3636

3737
1. Clone [this](https://github.com/ARMmbed/mbed-client-examples) repository.
3838
1. Go to [mbed Device Connector](https://connector.mbed.com) and log in with your mbed account.
39-
1. On mbed Device Connector, go to [My Devices>Security credentials](https://connector.mbed.com/#credentials), and get new credentials for your device by clicking the *Get my device security credentials* button.
39+
1. On mbed Device Connector, go to [My Devices > Security credentials](https://connector.mbed.com/#credentials), and get new credentials for your device by clicking the **Get my device security credentials** button.
4040
1. Store the credentials as `source/security.h` in this project's directory.
4141
1. Open a command line tool and navigate to the project’s directory.
42-
1. Set yotta's build target. For example, if you're targeting the FRDM-K64F board: `yotta target frdm-k64f-gcc`.
42+
1. Set yotta's build target. For example, if you are targeting the FRDM-K64F board: `yotta target frdm-k64f-gcc`.
4343
1. Build the application by using the command `yotta build`. yotta builds a binary file in the project’s directory.
4444
1. Plug the Ethernet cable into the board.
45-
1. Plug the micro-USB cable into the *OpenSDA* port. The board is listed as a mass-storage device.
45+
1. Plug the micro-USB cable into the **OpenSDA** port. The board is listed as a mass-storage device.
4646
1. Drag the binary `build/frdm-k64f-gcc/source/mbed-client-examples.bin` to the board to flash the application.
47-
1. 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..
48-
1. Press the *RESET* button to run the program.
49-
1. For verification, continue to [here](#monitoring-the-application).
47+
1. 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.
48+
1. Press the **RESET** button to run the program.
49+
1. For verification, continue to the [Monitoring the application](#monitoring-the-application) chapter.
5050

5151
### IP address setup (optional)
5252

@@ -60,17 +60,17 @@ Your device can connect to mbed Device Connector via one of two binding modes: U
6060

6161
To change the binding mode:
6262

63-
1. In `simpleclient.h`, find the parameter ``SOCKET_MODE``.
64-
1. The default is ``M2MInterface::UDP``.
65-
1. To switch to TCP, change it to ``M2MInterface::TCP``.
63+
1. In the `simpleclient.h` file, find the parameter `SOCKET_MODE`.
64+
1. The default is `M2MInterface::UDP`.
65+
1. To switch to TCP, change it to `M2MInterface::TCP`.
6666

6767
Then re-build and flash the application.
6868

6969
**Tip:** The instructions in this document remain the same, irrespective of the socket mode you select.
7070

7171
## Monitoring the application
7272

73-
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.
73+
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.
7474

7575
**Note:** Instructions to set this up are located [here](https://developer.mbed.org/handbook/SerialPC#host-interface-and-terminal-applications).
7676

@@ -81,9 +81,10 @@ In app_start()
8181
IP address 10.2.15.222
8282
Device name 6868df22-d353-4150-b90a-a878130859d9
8383
```
84+
8485
**Note:** Device name is the endpoint name you will need later on [Testing the application](https://github.com/ARMmbed/mbed-client-quickstart#testing-the-application) chapter.
8586

86-
And after you click the `SW2` button on your board you should see messages about the value changes:
87+
After you click the `SW2` button on your board you should see messages about the value changes:
8788

8889
```
8990
handle_button_click, new value of counter is 1
@@ -92,14 +93,14 @@ handle_button_click, new value of counter is 1
9293
## Testing the application
9394

9495
1. Flash the application.
95-
1. Verify that registration succeeded. You should see `Registered object successfully!` printed to the serial port.
96-
1. On mbed Device Connector, go to [My devices>Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here.
96+
1. Verify that the registration succeeded. You should see `Registered object successfully!` printed to the serial port.
97+
1. On mbed Device Connector, go to [My devices > Connected devices](https://connector.mbed.com/#endpoints). Your device should be listed here.
9798
1. Press the `SW2` button on the device a number of times (make a note of how many times you did that).
98-
1. Go to [Device Connector>API Console](https://connector.mbed.com/#console).
99-
1. Enter `https://api.connector.mbed.com/endpoints/DEVICE_NAME/3200/0/5501` in the URI field and click *TEST API*.
99+
1. Go to [Device Connector > API Console](https://connector.mbed.com/#console).
100+
1. Enter `https://api.connector.mbed.com/endpoints/DEVICE_NAME/3200/0/5501` in the URI field and click **TEST API**. Replace `DEVICE_NAME` with your actual endpoint name. The device name can be found in the `source/security.h` file, see variable `MBED_ENDPOINT_NAME` or it can be found from the traces [Monitoring the application](https://github.com/ARMmbed/mbed-client-quickstart#monitoring-the-application).
100101
1. The number of times you pressed `SW2` is shown.
101-
1. Press `SW3` button to unregister from mbed Device Connector. You should see `Unregistered Object Successfully` printed to the serial port and LED starts blinking.
102-
This will also end your application run. Press `RESET` button to run the program again.
102+
1. Press the `SW3` button to unregister from mbed Device Connector. You should see `Unregistered Object Successfully` printed to the serial port and LED starts blinking.
103+
This will also stop your application. Press the `RESET` button to run the program again.
103104

104105

105106
![SW2 pressed five times, as shown by the API Console](clicks.png)

0 commit comments

Comments
 (0)