Example program for simple-mbed-client, connecting a device to mbed Device Connector.

Dependencies:   simple-mbed-client

Fork of simple-mbed-client-example by Jan Jongboom

This is an example on how to connect to mbed Device Connector using simple-mbed-client. It can connect over Ethernet, WiFi (using an ESP8266 module or an ODIN board), Thread and 6LoWPAN.

After cloning this repository update `mbed_app.json` to reflect your connectivity method. For docs on configuring connectivity, see easy-connect.

End to end example

For an end-to-end example of using Simple mbed Client to connect devices to mbed Device Connector see Building an internet connected lighting system.

Entropy (or lack thereof)

On all platforms except the K64F and K22F the library is compiled without TLS entropy sources. This means that your code is inherently unsafe and should not be deployed to any production systems. To enable entropy, remove the MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES and MBEDTLS_TEST_NULL_ENTROPY macros from mbed_app.json.

Committer:
Jan Jongboom
Date:
Tue Sep 06 14:19:41 2016 +0200
Revision:
30:36236b00a869
Parent:
29:dd6231df71bb
Child:
34:1e8d914a2876
Move TX/RX to target dependent vars as well

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jan Jongboom 17:6d69aa1b393f 1 {
Jan Jongboom 17:6d69aa1b393f 2 "config": {
Jan Jongboom 17:6d69aa1b393f 3 "network-interface":{
Jan Jongboom 23:16f397924e3d 4 "help": "options are ETHERNET,WIFI_ESP8266,MESH_LOWPAN_ND,MESH_THREAD",
Jan Jongboom 25:b93913439b93 5 "value": "ETHERNET"
Jan Jongboom 17:6d69aa1b393f 6 },
Jan Jongboom 23:16f397924e3d 7 "esp8266-tx": {
Jan Jongboom 23:16f397924e3d 8 "help": "Pin used as TX (connects to ESP8266 RX)",
Jan Jongboom 30:36236b00a869 9 "value": "D1"
Jan Jongboom 23:16f397924e3d 10 },
Jan Jongboom 23:16f397924e3d 11 "esp8266-rx": {
Jan Jongboom 23:16f397924e3d 12 "help": "Pin used as RX (connects to ESP8266 TX)",
Jan Jongboom 30:36236b00a869 13 "value": "D0"
Jan Jongboom 23:16f397924e3d 14 },
Jan Jongboom 23:16f397924e3d 15 "esp8266-ssid": {
Jan Jongboom 17:6d69aa1b393f 16 "value": "\"SSID\""
Jan Jongboom 17:6d69aa1b393f 17 },
Jan Jongboom 23:16f397924e3d 18 "esp8266-password": {
Jan Jongboom 17:6d69aa1b393f 19 "value": "\"Password\""
Jan Jongboom 23:16f397924e3d 20 },
Jan Jongboom 23:16f397924e3d 21 "esp8266-debug": {
Jan Jongboom 23:16f397924e3d 22 "value": true
Jan Jongboom 29:dd6231df71bb 23 },
Jan Jongboom 29:dd6231df71bb 24 "button": {
Jan Jongboom 29:dd6231df71bb 25 "help": "Pin which you'll use as button (can be overriden per target below)",
Jan Jongboom 29:dd6231df71bb 26 "value": "BUTTON1"
Jan Jongboom 23:16f397924e3d 27 }
Jan Jongboom 23:16f397924e3d 28 },
Jan Jongboom 23:16f397924e3d 29 "target_overrides": {
Jan Jongboom 23:16f397924e3d 30 "*": {
Jan Jongboom 25:b93913439b93 31 "target.features_add": ["IPV4", "IPV6"]
Jan Jongboom 29:dd6231df71bb 32 },
Jan Jongboom 29:dd6231df71bb 33 "K64F": {
Jan Jongboom 29:dd6231df71bb 34 "button": "SW2"
Jan Jongboom 29:dd6231df71bb 35 },
Jan Jongboom 29:dd6231df71bb 36 "HEXIWEAR": {
Jan Jongboom 30:36236b00a869 37 "button": "PTA12",
Jan Jongboom 30:36236b00a869 38 "esp8266-tx": "PTD3",
Jan Jongboom 30:36236b00a869 39 "esp8266-rx": "PTD2"
Jan Jongboom 29:dd6231df71bb 40 },
Jan Jongboom 29:dd6231df71bb 41 "NUCLEO_F401RE": {
Jan Jongboom 30:36236b00a869 42 "button": "USER_BUTTON",
Jan Jongboom 30:36236b00a869 43 "esp8266-tx": "D8",
Jan Jongboom 30:36236b00a869 44 "esp8266-rx": "D2"
Jan Jongboom 17:6d69aa1b393f 45 }
Jan Jongboom 17:6d69aa1b393f 46 }
Jan Jongboom 17:6d69aa1b393f 47 }