
This is an example based on mbed-os cellular APIs that demonstrates a TCP or UDP echo transaction with a public echo server.
Revision 2:0f644d6045cf, committed 2018-03-09
- Comitter:
- mbed_official
- Date:
- Fri Mar 09 14:00:19 2018 +0000
- Parent:
- 1:ccaceb0dbbaf
- Child:
- 3:3e4aaf05be68
- Commit message:
- Merge pull request #55 from ARMmbed/lib_and_server_update
lib and server update
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-cellular
Changed in this revision
README.md | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/README.md Fri Mar 09 09:30:19 2018 +0000 +++ b/README.md Fri Mar 09 14:00:19 2018 +0000 @@ -93,16 +93,16 @@ You should see an output similar to this: ``` -mbed-os-example-cellular, Connecting... - - +mbed-os-example-cellular +Establishing connection ...... + Connection Established. -UDP: Sent 4 Bytes to echo.u-blox.com +TCP: connected with echo.mbedcloudtesting.com server +TCP: Sent 4 Bytes to echo.mbedcloudtesting.com Received from echo server 4 Bytes - - + + Success. Exiting - ``` ## Troubleshooting
--- a/main.cpp Fri Mar 09 09:30:19 2018 +0000 +++ b/main.cpp Fri Mar 09 14:00:19 2018 +0000 @@ -46,13 +46,13 @@ OnboardCellularInterface iface; // Echo server hostname -const char *host_name = "echo.u-blox.com"; +const char *host_name = "echo.mbedcloudtesting.com"; // Echo server port (same for TCP and UDP) const int port = 7; Mutex PrintMutex; -Thread dot_thread; +Thread dot_thread(osPriorityNormal, 512); #define PRINT_TEXT_LENGTH 128 char print_text[PRINT_TEXT_LENGTH];