demo of the murata wifi chip. This demo tries to connect to an open wifi access point and prints out all the relevant information about the connection. It then scans all wifi access points nearby and reports their information.

Dependencies:   SNICInterface mbed-rtos mbed

Fork of SNIC-xively-jumpstart-demo by muRata

Revision:
31:c42d189364b4
Parent:
30:de5a32932408
diff -r de5a32932408 -r c42d189364b4 main.cpp
--- a/main.cpp	Thu Apr 02 06:03:05 2015 +0000
+++ b/main.cpp	Thu Apr 09 01:28:01 2015 +0000
@@ -35,7 +35,8 @@
 
 C_SNIC_WifiInterface     wifi( D1, D0, NC, NC, D3 );
 
-
+// callback function used by scan()
+// this function will be called on every network scanned
 void scanCallbackFn(tagSCAN_RESULT_T *scan_result)
 {
     printf("\r\n");
@@ -48,7 +49,7 @@
     printf("ssid = %s \r\n"         ,scan_result->ssid);
 }
 
-
+// main loop
 int main()
 {
     // for built in debug printouts
@@ -130,7 +131,7 @@
                status.ssid );
     }
 
-    // scan for wifi
+    // scan for wifi, results will be called in callback function
     check = wifi.scan(NULL,NULL,scanCallbackFn);
     if(check != 0) {
         printf("scan failed! \r\n");