Skip to content

Commit b044853

Browse files
author
Ari Parkkila
authored
Merge pull request #79 from dhwalters423/echo_config
Configurable echo server
2 parents 216eb7a + d5cde79 commit b044853

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
OnboardCellularInterface iface;
4848

4949
// Echo server hostname
50-
const char *host_name = "echo.mbedcloudtesting.com";
50+
const char *host_name = MBED_CONF_APP_ECHO_SERVER_HOSTNAME;
5151

5252
// Echo server port (same for TCP and UDP)
53-
const int port = 7;
53+
const int port = MBED_CONF_APP_ECHO_SERVER_PORT;
5454

5555
static rtos::Mutex trace_mutex;
5656

mbed_app.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
"help": "The password string to use for this APN, set to 0 if none",
2222
"value": 0
2323
},
24+
"echo-server-hostname": {
25+
"help": "Echo server host name.",
26+
"value": "\"echo.mbedcloudtesting.com\""
27+
},
28+
"echo-server-port": {
29+
"help": "Echo server port number.",
30+
"value": 7
31+
},
2432
"trace-level": {
2533
"help": "Options are TRACE_LEVEL_ERROR,TRACE_LEVEL_WARN,TRACE_LEVEL_INFO,TRACE_LEVEL_DEBUG",
2634
"macro_name": "MBED_TRACE_MAX_LEVEL",

0 commit comments

Comments
 (0)