Example program for the BSDInterface
Dependencies: BSDInterface NetworkSocketAPI
Fork of HelloLWIPInterface by
Revision 6:751245e265f6, committed 2015-06-17
- Comitter:
- sam_grove
- Date:
- Wed Jun 17 20:58:21 2015 +0000
- Parent:
- 5:455deb196c7f
- Child:
- 7:6787b920b496
- Commit message:
- updating base for wifi
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ESP8266Interface.lib Wed Jun 17 20:58:21 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/NetworkSocketAPI/code/wifi_interface/#80ece8d5aa2d
--- a/NetworkSocketAPI.lib Mon Jun 01 15:24:51 2015 -0500 +++ b/NetworkSocketAPI.lib Wed Jun 17 20:58:21 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/tip +http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/#b147c08301be
--- a/main.cpp Mon Jun 01 15:24:51 2015 -0500 +++ b/main.cpp Wed Jun 17 20:58:21 2015 +0000 @@ -15,12 +15,11 @@ */ #include "mbed.h" -#include "WiFiInterface.h" +#include "ESP8266Interface.h" DigitalOut myled(LED1); - -WiFiInterface wifi; +ESP8266Interface wifi; // or //NetworkInterface *wifi = new WiFiInterface; @@ -37,8 +36,8 @@ puts("NetworkSocketAPI Example"); wifi.init(); - wifi.connect("apname", "phrase", NetworkInterface::NI_WPA2); - + wifi.connect("apname", "phrase", WI_WPA2); + printf("Wifi is %s\n", (wifi.isConnected() > 0) ? "Connected" : "Disconnected"); printf("IP: %s\n", wifi.getIPAddress());
--- a/mbed.bld Mon Jun 01 15:24:51 2015 -0500 +++ b/mbed.bld Wed Jun 17 20:58:21 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/tip \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7 \ No newline at end of file
--- a/wifi_interface.lib Mon Jun 01 15:24:51 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://developer.mbed.org/teams/NetworkSocketAPI/code/wifi_interface/tip