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:
16:ed9b9c28f860
Parent:
15:abc12b228291
Child:
17:0bf3c49a83d5
diff -r abc12b228291 -r ed9b9c28f860 main.cpp
--- a/main.cpp	Tue May 27 01:36:56 2014 +0000
+++ b/main.cpp	Fri May 30 08:32:20 2014 +0000
@@ -13,28 +13,33 @@
 #include "LM75B.h"
 #include "C12832_lcd.h"
 
+#include "PowerControl/EthernetPowerControl.h"
+
 MMA7660 axl(p28, p27);
 LM75B tmp(p28, p27);
 C12832_LCD lcd;
 
 #include "logo.h"
 
-#if 0
+#if 1
 #define DEMO_AP_SSID                  "muRata12345"
 #define DEMO_AP_SECURITY_TYPE         e_SEC_WPA2_AES
 #define DEMO_AP_SECUTIRY_KEY          "12345678"
-#define DEMO_AP_SECUTIRY_KEY_LEN  8
+#define DEMO_AP_SECUTIRY_KEY_LEN      8
 #else
 #define DEMO_AP_SSID                  "E2N1-Lab-Buffalo-D302"
-#define DEMO_AP_SECURITY_TYPE         e_SEC_WPA2_AES
-#define DEMO_AP_SECUTIRY_KEY          "12345678"
-#define DEMO_AP_SECUTIRY_KEY_LEN  8
+#define DEMO_AP_SECURITY_TYPE         e_SEC_OPEN
+#define DEMO_AP_SECUTIRY_KEY          ""
+#define DEMO_AP_SECUTIRY_KEY_LEN      0
 #endif
 /** Wi-Fi SNIC UART Interface*/
 C_SNIC_WifiInterface     mSNICwifi( p9, p10, NC, NC, p30 );
 Serial pc(USBTX, USBRX);
  
 int main() {
+    
+    PHY_PowerDown();
+    
     pc.baud( 115200 );
     printf("main\r\n");
     lcd_print_xively_logo();
@@ -62,7 +67,7 @@
                         , DEMO_AP_SECUTIRY_KEY
                         , DEMO_AP_SECUTIRY_KEY_LEN );
     lcd_printf("connect();\r\n");
-    if( s != 0 )
+   if( s != 0 )
     {
         lcd_printf( "Could not connect. Will halt!\n" );
         return -1;