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

Commit e837888

Browse files
committed
Editorial changes.
1 parent b7d41c4 commit e837888

File tree

1 file changed

+25
-32
lines changed

1 file changed

+25
-32
lines changed

README.md

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is the mbed Client example for mbed OS (we also have one for [Linux](https:
44

55
The application:
66

7-
* Connects to network with either WiFi, Ethernet, Cellular, 6LoWPAN ND or Thread connection.
7+
* Connects to network with WiFi, Ethernet, Cellular, 6LoWPAN ND or Thread connection.
88
* Registers with mbed Device Connector.
99
* Gives mbed Device Connector access to its resources (read and write).
1010
* Records the number of clicks on the device’s button and sends the number to mbed Device Connector.
@@ -28,18 +28,18 @@ The application:
2828

2929
To configure the example application, please:
3030

31-
1. [Choose connection type](#connection-type).
32-
1. [Set client credentials](#client-credentials).
31+
1. [Select the connection type](#connection-type).
32+
1. [Set the client credentials](#client-credentials).
3333
1. [Change 6LoWPAN ND & Thread settings](#6lowpan-nd-and-thread-settings).
3434
1. [Change Ethernet settings](#ethernet-settings).
3535
1. [Change cellular settings](#cellular-settings).
3636
1. [Change Wi-Fi settings](#wi-fi-settings).
3737
1. [Set up an IP address](#ip-address-setup). This step is optional.
38-
1. [Change socket type](#changing-socket-type). This step is optional.
38+
1. [Change the socket type](#changing-socket-type). This step is optional.
3939

4040
### Connection type
4141

42-
By default the application uses Ethernet as the default connection type. The connection type can be changed in the beginning of the `main.cpp` file by setting one of the five connection types as defined and all the rest as undefined. For example to enable 6LoWPAN ND mode:
42+
The application uses Ethernet as the default connection type. To change the connection type, set one of them as defined and all the rest as undefined in the beginning of the `main.cpp` file. For example, to enable 6LoWPAN ND mode:
4343

4444
```
4545
#undef ETHERNET
@@ -51,23 +51,23 @@ By default the application uses Ethernet as the default connection type. The con
5151

5252
### Client credentials
5353

54-
The client side certificate needs to be created and set in order for the application to register to the Connector service.
54+
To register the application to the Connector service, you need to create and set the client side certificate.
5555

5656
1. Go to [mbed Device Connector](https://connector.mbed.com) and log in with your mbed account.
5757
1. On mbed Device Connector, go to [My Devices > Security credentials](https://connector.mbed.com/#credentials) and click the **Get my device security credentials** button to get new credentials for your device.
5858
1. Replace the contents in `security.h` of this project's directory with content copied above.
5959

6060
### 6LoWPAN ND and Thread settings
6161

62-
As both 6LoWPAN ND and Thread use IPv6 for connectivity, you need to verify first that you have a working IPv6 connection. You can do this by pinging the Connector IPv6 address `2607:f0d0:2601:52::20` from your network.
62+
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.
6363

6464
#### mbed gateway
6565

6666
To connect the example application in 6LoWPAN ND or Thread mode to Connector, you need to set up an mbed 6LoWPAN gateway router. Clone the [mbed-client-example-6lowpan](https://github.com/ARMmbed/mbed-client-example-6lowpan) repository and follow the [gateway configuration](https://github.com/ARMmbed/mbed-client-example-6lowpan#gateway-configuration) instructions. Use the dynamic binary in both cases for IPv6 autoconfiguration.
6767

6868
#### Channel settings
6969

70-
In both 6LoWPAN ND and Thread mode you need to set the channel settings to match the mbed gateway settings. Channel settings can be found in the `MACROS.txt` file. For 2.4GHz shields (AT86RF233) use the following values:
70+
In 6LoWPAN ND and Thread mode, you need to set the channel settings to match the mbed gateway settings. Channel settings can be found in the `MACROS.txt` file. For 2.4GHz shields (AT86RF233), use the following values:
7171

7272
```
7373
YOTTA_CFG_MBED_MESH_API_6LOWPAN_ND_CHANNEL_PAGE=0
@@ -83,41 +83,36 @@ YOTTA_CFG_MBED_MESH_API_6LOWPAN_ND_CHANNEL_PAGE=2
8383
YOTTA_CFG_MBED_MESH_API_6LOWPAN_ND_CHANNEL=1
8484
```
8585

86-
For more information about the radio shields, please see the [mbed-client-example-6lowpan](https://github.com/ARMmbed/mbed-client-example-6lowpan#radio-module-identification) documentation.
86+
For more information about the radio shields, see the [mbed-client-example-6lowpan](https://github.com/ARMmbed/mbed-client-example-6lowpan#radio-module-identification) documentation.
8787

88-
#### Thread specific settings
88+
#### Thread-specific settings
8989

90-
With Thread you can change device operating mode between a router and a sleepy end device by opening `MACROS.txt` and changing the `YOTTA_CFG_MBED_MESH_API_THREAD_DEVICE_TYPE` to either `MESH_DEVICE_TYPE_THREAD_ROUTER` or `MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE`.
90+
With Thread, you can change the operating mode of the device between a router and a sleepy end device as follows:
9191

92+
In the `MACROS.txt` file, change the `YOTTA_CFG_MBED_MESH_API_THREAD_DEVICE_TYPE` to either `MESH_DEVICE_TYPE_THREAD_ROUTER` or `MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE`.
9293

9394
### Ethernet settings
9495

9596
For running the example application using Ethernet, you need:
9697

97-
1. An Ethernet cable.
98-
1. An Ethernet connection to the internet.
98+
- An Ethernet cable.
99+
- An Ethernet connection to the internet.
99100

100101
### Cellular settings
101102

102103
TBD
103104

104105
### Wi-Fi settings
105106

106-
The example application uses ESP8266 WiFi Interface for managing Wireless connectivity. For running this application using WiFi you need:
107+
The example application uses ESP8266 WiFi Interface for managing the wireless connectivity. To run this application using WiFi, you need to:
107108

108-
1. [ESP8266](https://en.wikipedia.org/wiki/ESP8266) WiFi module running [Espressif Firmware](https://codeload.github.com/espressif/ESP8266_AT/zip/master)
109+
1. Have [ESP8266](https://en.wikipedia.org/wiki/ESP8266) WiFi module running [Espressif Firmware](https://codeload.github.com/espressif/ESP8266_AT/zip/master)
109110
1. Mount WiFi module onto [K64F Grove Shield v2](https://developer.mbed.org/platforms/FRDM-K64F/#supported-seeed-studio-grove-extension)
110-
1. Attach shield onto K64F board.
111-
1. In `main.cpp` , change
112-
```
113-
#undef ETHERNET
114-
#define WIFI
115-
#undef CELLULAR
116-
#undef MESH_LOWPAN_ND
117-
#undef MESH_THREAD
118-
```
119-
1. In `main.cpp`, remove `#error "Remember to provide your WiFi credentials and provide in esp.connect("ssid","password");"`
120-
1. In next line `esp.connect("ssid", "password");` , replace `ssid` and `password` with your WiFi SSID and WiFi password respectively.
111+
1. Attach the shield on the K64F board.
112+
1. In the `main.cpp` file:
113+
- set WIFI as defined and other connection types as undefined.
114+
- remove `#error "Remember to provide your WiFi credentials and provide in esp.connect("ssid","password");"`
115+
- `esp.connect("ssid", "password");` , replace `ssid` and `password` with your WiFi SSID and WiFi password respectively.
121116

122117

123118
### IP address setup
@@ -128,15 +123,13 @@ If your network does not have DHCP enabled, you have to manually assign a static
128123

129124
### Changing socket type
130125

131-
Your device can connect to mbed Device Connector via one of two binding modes: UDP or TCP. The default is UDP. Binding mode cannot be changed in 6LoWPAN ND or Thread mode.
126+
Your device can connect to mbed Device Connector via UDP or TCP binding mode. The default is UDP. The binding mode cannot be changed in 6LoWPAN ND or Thread mode.
132127

133128
To change the binding mode:
134129

135-
1. In the `simpleclient.h` file, find the parameter `SOCKET_MODE`.
136-
1. The default is `M2MInterface::UDP`.
130+
1. In the `simpleclient.h` file, find the parameter `SOCKET_MODE`. The default is `M2MInterface::UDP`.
137131
1. To switch to TCP, change it to `M2MInterface::TCP`.
138-
139-
Then re-build and flash the application.
132+
1. Rebuild and flash the application.
140133

141134
<span class="tips">**Tip:** The instructions in this document remain the same, irrespective of the socket mode you select.</span>
142135

@@ -148,7 +141,7 @@ To build the example application:
148141
1. Open a command line tool and navigate to the project’s directory.
149142
1. Update mbed-os sources using the `mbed update` command.
150143
1. [Configure](#application-setup) the client application.
151-
1. Build the application by selecting the hardware board and build toolchain using the command `mbed compile -m K64F -t GCC_ARM -c -j0`. mbed-cli builds a binary file under the project’s `.build` directory.
144+
1. Build the application by selecting the hardware board and build the toolchain using the command `mbed compile -m K64F -t GCC_ARM -c -j0`. mbed-cli builds a binary file under the project’s `.build` directory.
152145
1. Plug the Ethernet cable into the board if you are using Ethernet mode.
153146
1. If you are using 6LoWPAN ND or Thread mode, connect and power on the gateway first.
154147
1. Plug the micro-USB cable into the **OpenSDA** port. The board is listed as a mass-storage device.

0 commit comments

Comments
 (0)