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.
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.
39
39
40
40
### Connection type
41
41
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:
43
43
44
44
```
45
45
#undef ETHERNET
@@ -51,23 +51,23 @@ By default the application uses Ethernet as the default connection type. The con
51
51
52
52
### Client credentials
53
53
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.
55
55
56
56
1. Go to [mbed Device Connector](https://connector.mbed.com) and log in with your mbed account.
57
57
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.
58
58
1. Replace the contents in `security.h` of this project's directory with content copied above.
59
59
60
60
### 6LoWPAN ND and Thread settings
61
61
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.
63
63
64
64
#### mbed gateway
65
65
66
66
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.
67
67
68
68
#### Channel settings
69
69
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:
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.
87
87
88
-
#### Threadspecific settings
88
+
#### Thread-specific settings
89
89
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:
91
91
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`.
92
93
93
94
### Ethernet settings
94
95
95
96
For running the example application using Ethernet, you need:
96
97
97
-
1. An Ethernet cable.
98
-
1. An Ethernet connection to the internet.
98
+
- An Ethernet cable.
99
+
- An Ethernet connection to the internet.
99
100
100
101
### Cellular settings
101
102
102
103
TBD
103
104
104
105
### Wi-Fi settings
105
106
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:
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.
121
116
122
117
123
118
### IP address setup
@@ -128,15 +123,13 @@ If your network does not have DHCP enabled, you have to manually assign a static
128
123
129
124
### Changing socket type
130
125
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.
132
127
133
128
To change the binding mode:
134
129
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`.
137
131
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.
140
133
141
134
<spanclass="tips">**Tip:** The instructions in this document remain the same, irrespective of the socket mode you select.</span>
142
135
@@ -148,7 +141,7 @@ To build the example application:
148
141
1. Open a command line tool and navigate to the project’s directory.
149
142
1. Update mbed-os sources using the `mbed update` command.
150
143
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.
152
145
1. Plug the Ethernet cable into the board if you are using Ethernet mode.
153
146
1. If you are using 6LoWPAN ND or Thread mode, connect and power on the gateway first.
154
147
1. Plug the micro-USB cable into the **OpenSDA** port. The board is listed as a mass-storage device.
0 commit comments