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

Commit be5e65a

Browse files
author
Janne Kiiskilä
authored
Merge branch 'master' into update_gw_binaries
2 parents abf3a1d + d2bbf12 commit be5e65a

21 files changed

+257
-157
lines changed

Jenkinsfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def targets = [
1717
"NUCLEO_F429ZI",
1818
"UBLOX_EVK_ODIN_W2"
1919
]
20-
20+
2121
// Map toolchains to compilers
2222
def toolchains = [
2323
ARM: "armcc",
@@ -72,7 +72,7 @@ def buildStep(target, compilerLabel, toolchain, configName, connectiontype) {
7272
deleteDir()
7373
dir("mbed-os-example-client") {
7474
checkout scm
75-
75+
7676
if ("${configName}" == "thd") {
7777
// Change device type to Thread router
7878
execute("sed -i 's/\"NANOSTACK\", \"LOWPAN_ROUTER\", \"COMMON_PAL\"/\"NANOSTACK\", \"THREAD_ROUTER\", \"COMMON_PAL\"/' mbed_app.json")
@@ -89,7 +89,10 @@ def buildStep(target, compilerLabel, toolchain, configName, connectiontype) {
8989
execute ("sed -i 's/\"value\": \"ETHERNET\"/\"value\": \"MESH_LOWPAN_ND\"/' mbed_app.json")
9090

9191
// Change channel for HW tests
92-
execute ("sed -i 's/\"mbed-mesh-api.6lowpan-nd-channel\": 12/\"mbed-mesh-api.6lowpan-nd-channel\": 18/' mbed_app.json")
92+
execute ("sed -i 's/\"mbed-mesh-api.6lowpan-nd-channel\": 12/\"mbed-mesh-api.6lowpan-nd-channel\": 17/' mbed_app.json")
93+
94+
//Use PANID filter
95+
execute ("sed -i '/6lowpan-nd-channel\":/a \"mbed-mesh-api.6lowpan-nd-panid-filter\": \"0xABBA\",' mbed_app.json")
9396
}
9497

9598
if ("${connectiontype}" == "MCR20") {

README.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ The application:
2525
* NUCLEO_F429ZI + ATMEL AT233 15.4 shield (mesh `LOWPAN_ROUTER` mode)
2626
* K64F (Ethernet)
2727
* NUCLEO_F429ZI (Ethernet)
28-
* UBLOX_EVK_ODIN_W2 (Ethernet)
28+
* UBLOX_EVK_ODIN_W2 (WiFi & Ethernet - use the supplied `configs/eth_v4.json` for Ethernet)
2929
* K64F + GROVE SEEED shield (Wifi)
3030
* NUCLEO_F429ZI + GROVE SEEED shield (Wifi)
3131

3232
Apart from this, 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 and the complete example configuration of mbed Client, selected network interface and mbed OS components fits into hardware's given memory size (Flash size and RAM size).
3333

34+
To see how different targets are built please see the supplied `build_all.sh script`.
35+
3436
## Requirements for non-K64F boards
3537

3638
* This example requires TLS functionality to be enabled on mbed TLS.
@@ -321,15 +323,17 @@ The application prints debug messages over the serial port, so you can monitor i
321323
After connecting, you should see messages about connecting to mbed Device Connector:
322324
323325
```
324-
Starting mbed Client example...
325-
Using <Network Interface>
326+
Starting mbed Client example in IPv4 mode
327+
[EasyConnect] Using Ethernet
328+
[EasyConnect] Connected to Network successfully
329+
[EasyConnect] IP address 192.168.8.110
330+
[EasyConnect] MAC address 5c:cf:7f:86:de:bf
326331

327-
Connected to Network successfully
328-
IP address xxx.xxx.xxx.xxx
332+
SOCKET_MODE : TCP
329333

330-
SOCKET_MODE : UDP
331334
Connecting to coap://api.connector.mbed.com:5684
332335

336+
Registered object succesfully!
333337
```
334338
335339
<span class="notes">**Note:** Device name is the endpoint name you will need later on when [testing the application](https://github.com/ARMmbed/mbed-os-example-client#testing-the-application).</span>
@@ -370,3 +374,39 @@ The application exposes three [resources](https://docs.mbed.com/docs/mbed-device
370374
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).
371375
372376
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).
377+
378+
#### Compilation problems?
379+
380+
If you encounter a problem like this when compiling the application:
381+
382+
```
383+
Building project mbed-os-example-client (K64F, GCC_ARM)
384+
Scan: .
385+
Scan: FEATURE_LWIP
386+
Scan: FEATURE_UVISOR
387+
Scan: FEATURE_COMMON_PAL
388+
Scan: FEATURE_BLE
389+
Scan: FEATURE_STORAGE
390+
Scan: FEATURE_THREAD_BORDER_ROUTER
391+
Scan: FEATURE_THREAD_ROUTER
392+
Scan: FEATURE_LOWPAN_BORDER_ROUTER
393+
Scan: FEATURE_LOWPAN_ROUTER
394+
Scan: FEATURE_LOWPAN_HOST
395+
Scan: FEATURE_NANOSTACK_FULL
396+
Scan: FEATURE_NANOSTACK
397+
Scan: FEATURE_THREAD_END_DEVICE
398+
Scan: mbed
399+
Scan: env
400+
Compile [ 0.3%]: NanostackRfPhyAtmel.cpp
401+
[ERROR] ./atmel-rf-driver/source/NanostackRfPhyAtmel.cpp:18:44: fatal error: nanostack/platform/arm_hal_phy.h: No such file or directory
402+
compilation terminated.
403+
```
404+
405+
You probably have the LWIP stack in use with Ethernet or WiFi and you have the mesh RF stacks in the root of this example. You need to tell mbed NOT to compile the related files. To do that, set up a `.mbedignore` file. An example file is available in the `configs` folder.
406+
407+
This should resolve the issue:
408+
409+
```
410+
cp configs/eth-wifi-mbedignore ./.mbedignore
411+
```
412+

atmel-rf-driver.lib

Lines changed: 0 additions & 1 deletion
This file was deleted.

build_all.sh

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,52 @@ set -e
44
TOOL=GCC_ARM
55

66
echo Compiling with $TOOL
7+
echo Ethernet v4
78
cp configs/eth_v4.json ./mbed_app.json
89
cp configs/eth-wifi-mbedignore ./.mbedignore
910
mbed compile -m K64F -t $TOOL
10-
cp BUILD/K64F/GCC_ARM/mbed-os-example-client.bin k64f-$TOOL-eth-v4.bin
11+
cp BUILD/K64F/$TOOL/mbed-os-example-client.bin k64f-$TOOL-eth-v4.bin
1112
mbed compile -m NUCLEO_F439ZI -t $TOOL
12-
cp ./BUILD/NUCLEO_F439ZI/GCC_ARM/mbed-os-example-client.bin f439zi-$TOOL-eth-v4.bin
13+
cp ./BUILD/NUCLEO_F439ZI/$TOOL/mbed-os-example-client.bin f439zi-$TOOL-eth-v4.bin
14+
mbed compile -m UBLOX_EVK_ODIN_W2 -t $TOOL
15+
cp ./BUILD/UBLOX_EVK_ODIN_W2/$TOOL/mbed-os-example-client.bin ublox-odin-$TOOL-eth-v4.bin
1316

17+
echo Ethernet v6
1418
cp configs/eth_v6.json ./mbed_app.json
1519
cp configs/eth-wifi-mbedignore ./.mbedignore
1620
mbed compile -m K64F -t $TOOL
17-
cp BUILD/K64F/GCC_ARM/mbed-os-example-client.bin k64f-$TOOL-eth-v6.bin
21+
cp BUILD/K64F/$TOOL/mbed-os-example-client.bin k64f-$TOOL-eth-v6.bin
1822
mbed compile -m NUCLEO_F439ZI -t $TOOL
19-
cp ./BUILD/NUCLEO_F439ZI/GCC_ARM/mbed-os-example-client.bin f439zi-$TOOL-eth-v4.bin
23+
cp ./BUILD/NUCLEO_F439ZI/$TOOL/mbed-os-example-client.bin f439zi-$TOOL-eth-v4.bin
24+
mbed compile -m UBLOX_EVK_ODIN_W2 -t $TOOL
25+
cp ./BUILD/UBLOX_EVK_ODIN_W2/$TOOL/mbed-os-example-client.bin ublox-odin-$TOOL-eth-v6.bin
2026

21-
cp configs/wifi_v4.json ./mbed_app.json
27+
echo WIFI - ESP8266
28+
cp configs/wifi_esp8266_v4.json ./mbed_app.json
2229
cp configs/eth-wifi-mbedignore ./.mbedignore
2330
mbed compile -m K64F -t $TOOL
24-
cp BUILD/K64F/GCC_ARM/mbed-os-example-client.bin k64f-$TOOL-wifi-v4.bin
31+
cp BUILD/K64F/$TOOL/mbed-os-example-client.bin k64f-$TOOL-esp-wifi-v4.bin
32+
mbed compile -m NUCLEO_F439ZI -t $TOOL
33+
cp ./BUILD/NUCLEO_F439ZI/$TOOL/mbed-os-example-client.bin f439zi-$TOOL-esp-wifi-v4.bin
34+
35+
echo WIFI - ODIN for UBLOX_EVK_ODIN_W2
36+
cp configs/wifi_odin_v4.json ./mbed_app.json
37+
cp configs/eth-wifi-mbedignore ./.mbedignore
2538
mbed compile -m UBLOX_EVK_ODIN_W2 -t $TOOL
26-
cp ./BUILD/UBLOX_EVK_ODIN_W2/GCC_ARM/mbed-os-example-client.bin ublox-odin-$TOOL-wifi-v4.bin
39+
cp ./BUILD/UBLOX_EVK_ODIN_W2/$TOOL/mbed-os-example-client.bin ublox-odin-$TOOL-wifi-v4.bin
2740

41+
echo 6-Lowpan builds
2842
cp configs/mesh_6lowpan.json ./mbed_app.json
2943
cp configs/mesh-mbedignore ./.mbedignore
3044
mbed compile -m K64F -t $TOOL
31-
cp BUILD/K64F/GCC_ARM/mbed-os-example-client.bin k64f-$TOOL-6lowpan.bin
45+
cp BUILD/K64F/$TOOL/mbed-os-example-client.bin k64f-$TOOL-6lowpan.bin
3246
mbed compile -m NUCLEO_F439ZI -t $TOOL
33-
cp ./BUILD/NUCLEO_F439ZI/GCC_ARM/mbed-os-example-client.bin f439zi-$TOOL-6lowpan.bin
47+
cp ./BUILD/NUCLEO_F439ZI/$TOOL/mbed-os-example-client.bin f439zi-$TOOL-6lowpan.bin
3448

49+
echo Thread builds
3550
cp configs/mesh_thread.json ./mbed_app.json
3651
cp configs/mesh-mbedignore ./.mbedignore
3752
mbed compile -m K64F -t $TOOL
38-
cp BUILD/K64F/GCC_ARM/mbed-os-example-client.bin k64f-$TOOL-Thread.bin
53+
cp BUILD/K64F/$TOOL/mbed-os-example-client.bin k64f-$TOOL-Thread.bin
3954
mbed compile -m NUCLEO_F439ZI -t $TOOL
40-
cp ./BUILD/NUCLEO_F439ZI/GCC_ARM/mbed-os-example-client.bin f439zi-$TOOL-Thread.bin
55+
cp ./BUILD/NUCLEO_F439ZI/$TOOL/mbed-os-example-client.bin f439zi-$TOOL-Thread.bin

configs/eth-wifi-mbedignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
atmel-rf-driver/*
2-
mcr20a-rf-driver/*
1+
easy-connect/atmel-rf-driver/*
2+
easy-connect/mcr20a-rf-driver/*
33

configs/eth_v4.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
{
22
"config": {
33
"network-interface":{
4-
"help": "options are ETHERNET,WIFI,MESH_LOWPAN_ND,MESH_THREAD",
4+
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN, MESH_LOWPAN_ND, MESH_THREAD",
55
"value": "ETHERNET"
66
}
77
},
88
"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
99
"target_overrides": {
1010
"*": {
1111
"target.features_add": ["LWIP", "COMMON_PAL"],
12+
"platform.stdio-baud-rate": 115200,
13+
"platform.stdio-convert-newlines": true,
1214
"lwip.ipv4-enabled": true,
1315
"lwip.ipv6-enabled": false,
1416
"mbed-trace.enable": 0
17+
},
18+
"UBLOX_EVK_ODIN_W2": {
19+
"target.device_has_remove": ["EMAC"]
1520
}
1621
}
1722
}

configs/eth_v6.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
{
22
"config": {
33
"network-interface":{
4-
"help": "options are ETHERNET,WIFI,MESH_LOWPAN_ND,MESH_THREAD",
4+
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN, MESH_LOWPAN_ND, MESH_THREAD",
55
"value": "ETHERNET"
66
}
77
},
88
"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
99
"target_overrides": {
1010
"*": {
1111
"target.features_add": ["LWIP", "COMMON_PAL"],
12+
"platform.stdio-baud-rate": 115200,
13+
"platform.stdio-convert-newlines": true,
1214
"lwip.ipv4-enabled": false,
1315
"lwip.ipv6-enabled": true,
1416
"mbed-trace.enable": 0
17+
},
18+
"UBLOX_EVK_ODIN_W2": {
19+
"target.device_has_remove": ["EMAC"]
1520
}
1621
}
1722
}

configs/mesh-mbedignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
esp8266-driver/*
1+
easy-connect/esp8266-driver/*

configs/mesh_6lowpan.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"config": {
33
"network-interface":{
4-
"help": "options are ETHERNET,WIFI,MESH_LOWPAN_ND,MESH_THREAD",
4+
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN, MESH_LOWPAN_ND, MESH_THREAD",
55
"value": "MESH_LOWPAN_ND"
66
},
77
"mesh_radio_type": {
@@ -13,8 +13,10 @@
1313
"target_overrides": {
1414
"*": {
1515
"target.features_add": ["NANOSTACK", "LOWPAN_ROUTER", "COMMON_PAL"],
16+
"platform.stdio-baud-rate": 115200,
17+
"platform.stdio-convert-newlines": true,
1618
"mbed-mesh-api.6lowpan-nd-channel-page": 0,
17-
"mbed-mesh-api.6lowpan-nd-channel": 18,
19+
"mbed-mesh-api.6lowpan-nd-channel": 12,
1820
"mbed-trace.enable": 0
1921
}
2022
}

configs/mesh_thread.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"config": {
33
"network-interface":{
4-
"help": "options are ETHERNET,WIFI,MESH_LOWPAN_ND,MESH_THREAD",
4+
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN, MESH_LOWPAN_ND, MESH_THREAD",
55
"value": "MESH_THREAD"
66
},
77
"mesh_radio_type": {
@@ -13,8 +13,10 @@
1313
"target_overrides": {
1414
"*": {
1515
"target.features_add": ["NANOSTACK", "THREAD_ROUTER", "COMMON_PAL"],
16-
"mbed-mesh-api.thread-config-channel": 18,
17-
"mbed-mesh-api.thread-config-panid": "0xBAAB",
16+
"platform.stdio-baud-rate": 115200,
17+
"platform.stdio-convert-newlines": true,
18+
"mbed-mesh-api.thread-config-channel": 12,
19+
"mbed-mesh-api.thread-config-panid": "0xDEFA",
1820
"mbed-trace.enable": 0
1921
}
2022
}

0 commit comments

Comments
 (0)