Skip to content

Commit 303001a

Browse files
committed
Configurable echo server
1 parent 4ab2352 commit 303001a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
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: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@
2121
"help": "The password string to use for this APN, set to 0 if none",
2222
"value": 0
2323
},
24-
"trace-level": {
25-
"help": "Options are TRACE_LEVEL_ERROR,TRACE_LEVEL_WARN,TRACE_LEVEL_INFO,TRACE_LEVEL_DEBUG",
26-
"macro_name": "MBED_TRACE_MAX_LEVEL",
27-
"value": "TRACE_LEVEL_INFO"
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
2831
}
2932
},
3033
"target_overrides": {

0 commit comments

Comments
 (0)