This is an example based on mbed-os cellular APIs that demonstrates a TCP or UDP echo transaction with a public echo server.

mbed_app.json

Committer:
mbed_official
Date:
2018-11-22
Revision:
27:97054be1a741
Parent:
26:348eec457e58
Child:
28:232da3ce8a88

File content as of revision 27:97054be1a741:

{
    "config": {
        "sock-type": "TCP",
        "echo-server-hostname": {
            "help": "Echo server host name.",
            "value": "\"echo.mbedcloudtesting.com\""
        },
        "echo-server-port": {
            "help": "Echo server port number.",
            "value": 7
        },
        "trace-level": {
            "help": "Options are TRACE_LEVEL_ERROR,TRACE_LEVEL_WARN,TRACE_LEVEL_INFO,TRACE_LEVEL_DEBUG",
            "macro_name": "MBED_TRACE_MAX_LEVEL",
            "value": "TRACE_LEVEL_INFO"
        }
  },
    "target_overrides": {
        "*": {
            "mbed-trace.enable": false,
            "lwip.ipv4-enabled": true,
            "lwip.ethernet-enabled": false,
            "lwip.ppp-enabled": true,
            "lwip.tcp-enabled": true,
            "platform.stdio-convert-newlines": true,
            "platform.stdio-baud-rate": 115200,
            "platform.default-serial-baud-rate": 115200,
            "platform.stdio-buffered-serial": true,
            "cellular.debug-at": false,
            "nsapi.default-cellular-plmn": 0,
            "nsapi.default-cellular-sim-pin": "\"1234\"",
            "nsapi.default-cellular-apn": 0,
            "nsapi.default-cellular-username": 0,
            "nsapi.default-cellular-password": 0
        }
    }
}