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

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Thu Apr 09 01:28:01 2015 +0000
Parent:
30:de5a32932408
Commit message:
Initial rev of murata demo, all API's are used and broken out.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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");