Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ESP8266Interface
Dependents: Nucleo_i2c_OLED_BME280_copy
Fork of ESP8266_Test by
Diff: main.cpp
- Revision:
- 14:fc2ed219d4c9
- Parent:
- 13:7959d8fb9c39
--- a/main.cpp Fri Jun 24 03:47:28 2016 +0000
+++ b/main.cpp Fri Jun 24 05:09:26 2016 +0000
@@ -45,18 +45,27 @@
bool result;
wifi.init();
+
+ pc.printf("wifi init\r\n");
+
result = wifi.connect();
if ( !result ) {
pc.printf("wifi.connect error\r\n");
return 0;
}
+ pc.printf("wifi connect\r\n");
+
TCPSocketConnection socket;
+
+
while (socket.connect(TEST_SERVER_ADDRESS, TEST_SERVER_PORT) < 0) {
pc.printf("Unable to connect to (%s) on port (%d)\n", TEST_SERVER_ADDRESS, TEST_SERVER_PORT);
wait(1);
}
-
+
+ pc.printf("TCP connect\r\n");
+
char hello[] = "Hello World\r\n";
socket.send_all(hello, sizeof(hello) - 1);
socket.close();
