
A quick example of a simple WiFi application using the WiFi and network-socket APIs that is provided as a part of mbed-os.
Dependencies: WizFi310Interface_Draft
Fork of mbed-os-example-mbed5-wifi by
Revision 49:3df367a86ec7, committed 2017-12-18
- Comitter:
- kaizen
- Date:
- Mon Dec 18 23:46:25 2017 +0000
- Parent:
- 48:65f755d4b743
- Child:
- 50:31005695f3a3
- Commit message:
- This is example for WizFi310 library
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WizFi310Interface_Draft.lib Mon Dec 18 23:46:25 2017 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/kaizen/code/WizFi310Interface_Draft/#d0e3f515f99d
--- a/main.cpp Mon Dec 04 14:00:03 2017 +0000 +++ b/main.cpp Mon Dec 18 23:46:25 2017 +0000 @@ -19,6 +19,7 @@ #define WIFI_ESP8266 1 #define WIFI_IDW0XX1 2 +#define WIFI_WIZFI310 3 #if TARGET_UBLOX_EVK_ODIN_W2 #include "OdinWiFiInterface.h" @@ -36,6 +37,9 @@ #elif MBED_CONF_APP_WIFI_SHIELD == WIFI_IDW0XX1 #include "SpwfSAInterface.h" SpwfSAInterface wifi(MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX); +#elif MBED_CONF_APP_WIFI_SHIELD == WIFI_WIZFI310 +#include "WizFi310Interface.h" +WizFi310Interface wifi(MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX); #endif // MBED_CONF_APP_WIFI_SHIELD == WIFI_IDW0XX1 #endif @@ -137,11 +141,11 @@ printf("WiFi example\n\n"); - count = scan_demo(&wifi); - if (count == 0) { - printf("No WIFI APNs found - can't continue further.\n"); - return -1; - } + //count = scan_demo(&wifi); + //if (count == 0) { + // printf("No WIFI APNs found - can't continue further.\n"); + // return -1; + //} printf("\nConnecting to %s...\n", MBED_CONF_APP_WIFI_SSID); int ret = wifi.connect(MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD, NSAPI_SECURITY_WPA_WPA2);
--- a/mbed_app.json Mon Dec 04 14:00:03 2017 +0000 +++ b/mbed_app.json Mon Dec 18 23:46:25 2017 +0000 @@ -2,15 +2,15 @@ "config": { "wifi-shield": { "help": "Options are internal, WIFI_ESP8266, WIFI_IDW0XX1", - "value": "internal" + "value": "WIFI_WIZFI310" }, "wifi-ssid": { "help": "WiFi SSID", - "value": "\"SSID\"" + "value": "\"Dap\"" }, "wifi-password": { "help": "WiFi Password", - "value": "\"PASSWORD\"" + "value": "\"00001111\"" }, "wifi-tx": { "help": "TX pin for serial connection to external device", @@ -23,7 +23,9 @@ }, "target_overrides": { "*": { - "platform.stdio-convert-newlines": true + "platform.stdio-convert-newlines": true, + "platform.stdio-baud-rate": 115200, + "platform.default-serial-baud-rate": 115200 }, "UBLOX_EVK_ODIN_W2": { "target.device_has": ["EMAC"] @@ -32,6 +34,10 @@ "wifi-tx": "D8", "wifi-rx": "D2" }, + "NUCLEO_L073RZ": { + "wifi-tx": "D8", + "wifi-rx": "D2" + }, "NUCLEO_F401RE": { "wifi-tx": "D8", "wifi-rx": "D2"
--- a/wifi-x-nucleo-idw01m1.lib Mon Dec 04 14:00:03 2017 +0000 +++ b/wifi-x-nucleo-idw01m1.lib Mon Dec 18 23:46:25 2017 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/wifi-x-nucleo-idw01m1/#5871f7011d7ff2c50e3faf992ebab88e9f69dc95 \ No newline at end of file +https://github.com/ARMmbed/wifi-x-nucleo-idw01m1/#5871f7011d7ff2c50e3faf992ebab88e9f69dc95