This example use mbed-os default network interface through Cellular PDP context class . It use UDP or TCP socket with the given echo server and performs an echo transaction. This program can be used on the C027, C030-U201 and C030-R412M boards.
Diff: mbed_app.json
- Revision:
- 0:b0d61d94aba5
- Child:
- 1:7527ba444133
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed_app.json Fri Sep 20 11:53:43 2019 +0500 @@ -0,0 +1,38 @@ +{ + "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": false, + "platform.stdio-convert-newlines": true, + "platform.stdio-baud-rate": 115200, + "platform.default-serial-baud-rate": 115200, + "platform.stdio-buffered-serial": true, + "cellular.debug-at": true, + "nsapi.default-cellular-plmn": 0, + "nsapi.default-cellular-sim-pin": "\"0000\"", + "nsapi.default-cellular-apn": 0, + "nsapi.default-cellular-username": 0, + "nsapi.default-cellular-password": 0 + } + } +}