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:
- pimco01
- Date:
- 2019-12-25
- Revision:
- 51:f4b4b186f3a2
- Parent:
- 50:5378d3f64df1
File content as of revision 51:f4b4b186f3a2:
{ "config": { "sock-type": "UDP", "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": { "*": { "target.network-default-interface-type": "CELLULAR", "mbed-trace.enable": true, "lwip.ipv4-enabled": true, "lwip.ethernet-enabled": false, "lwip.ppp-enabled": false, "lwip.tcp-enabled": true, "platform.stdio-convert-newlines": true, "platform.stdio-baud-rate": 115200, "platform.default-serial-baud-rate": 9600, "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 }, "DISCO_L475VG_IOT01A": { "target.macros_add": [ "CELLULAR_DEVICE=SERCOMM_TPB23" ], "target.components_add": ["SERCOMM_TPB23"], "SERCOMM_TPB23.tx":"D1", "SERCOMM_TPB23.rx":"D0", "SERCOMM_TPB23.provide-default":"true" } } }