This is an example based on mbed-os cellular APIs that demonstrates a TCP or UDP echo transaction with a public echo server.
Diff: mbed_app.json
- Revision:
- 51:f4b4b186f3a2
- Parent:
- 50:5378d3f64df1
--- a/mbed_app.json Wed Dec 04 12:02:03 2019 +0000 +++ b/mbed_app.json Wed Dec 25 16:18:24 2019 +0000 @@ -1,6 +1,6 @@ { "config": { - "sock-type": "TCP", + "sock-type": "UDP", "echo-server-hostname": { "help": "Echo server host name.", "value": "\"echo.mbedcloudtesting.com\"" @@ -18,30 +18,30 @@ "target_overrides": { "*": { "target.network-default-interface-type": "CELLULAR", - "mbed-trace.enable": false, + "mbed-trace.enable": true, "lwip.ipv4-enabled": true, - "lwip.ipv6-enabled": true, "lwip.ethernet-enabled": false, - "lwip.ppp-enabled": true, + "lwip.ppp-enabled": false, "lwip.tcp-enabled": true, "platform.stdio-convert-newlines": true, "platform.stdio-baud-rate": 115200, - "platform.default-serial-baud-rate": 115200, + "platform.default-serial-baud-rate": 9600, "platform.stdio-buffered-serial": true, "cellular.debug-at": false, - "cellular.use-apn-lookup": true, - "nsapi.default-cellular-sim-pin": null, - "nsapi.default-cellular-plmn": null, - "nsapi.default-cellular-apn": null, - "nsapi.default-cellular-username": null, - "nsapi.default-cellular-password": null + "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_L496AG": { + "DISCO_L475VG_IOT01A": { "target.macros_add": [ - "CELLULAR_DEVICE=STModCellular" + "CELLULAR_DEVICE=SERCOMM_TPB23" ], - "target.components_add": ["STMOD_CELLULAR"], - "stmod_cellular.provide-default": "true" + "target.components_add": ["SERCOMM_TPB23"], + "SERCOMM_TPB23.tx":"D1", + "SERCOMM_TPB23.rx":"D0", + "SERCOMM_TPB23.provide-default":"true" } } -} +} \ No newline at end of file