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: DnsQuery ESP8266Interface NetworkSocketAPI mbed
Fork of HelloESP8266Interface by
Revision 4:cb8a17dd6746, committed 2015-05-28
- Comitter:
- sam_grove
- Date:
- Thu May 28 20:01:52 2015 +0000
- Parent:
- 3:95de30d399d8
- Child:
- 5:455deb196c7f
- Commit message:
- Update example: Now functional but failing implementation
Changed in this revision
--- a/NetworkSocketAPI.lib Thu May 28 16:48:17 2015 +0000 +++ b/NetworkSocketAPI.lib Thu May 28 20:01:52 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/#ce08986b18b5 +http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/#167dd63981b6
--- a/main.cpp Thu May 28 16:48:17 2015 +0000
+++ b/main.cpp Thu May 28 20:01:52 2015 +0000
@@ -24,28 +24,30 @@
// or
//NetworkInterface *wifi = new WiFiInterface;
-TCPSocket tcp(wifi.getInstance());
+//TCPSocket tcp(wifi.getInstance());
// or
//SocketInterface tcp = new TCPSocket(wifi->getInstance();
-UDPSocket udp(wifi.getInstance());
+//UDPSocket udp(wifi.getInstance());
// or
//SocketInterface udp = new UDPSocket(wifi->getInstance();
int main()
{
puts("NetworkSocketAPI Example");
-
+
wifi.init();
- wifi.connect("apname", "phrase", WPA2);
+ wifi.connect("apname", "phrase", NetworkInterface::NI_WPA2);
+ printf("Wifi is %s\n", (wifi.isConnected() > 0) ? "Connected" : "Disconnected");
+
printf("IP: %s\n", wifi.getIPAddress());
printf("Gateway: %s\n", wifi.getGateway());
printf("Mask: %s\n", wifi.getNetworkMask());
printf("MAC: %s\n", wifi.getMACAddress());
wifi.disconnect();
-
+
while(1) {
myled = !myled;
}
--- a/mbed.bld Thu May 28 16:48:17 2015 +0000 +++ b/mbed.bld Thu May 28 20:01:52 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/cbbeb26dbd92 \ No newline at end of file
--- a/wifi_interface.lib Thu May 28 16:48:17 2015 +0000 +++ b/wifi_interface.lib Thu May 28 20:01:52 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/NetworkSocketAPI/code/wifi_interface/#4d5d60de745a +http://developer.mbed.org/teams/NetworkSocketAPI/code/wifi_interface/#323f42baa75a
