cc

Dependencies:   ATParser

Revision:
23:0b01aa59bb6f
Parent:
22:2eb9b3c54506
Child:
24:419285201dba
--- a/SPWFSA01.cpp	Mon Oct 24 10:37:26 2016 +0000
+++ b/SPWFSA01.cpp	Thu Nov 03 06:53:47 2016 +0000
@@ -58,6 +58,19 @@
             debug_if(dbg_on, "SPWF> error AT&F\r\n");
             return false;
         }
+        
+    /*set Wi-Fi mode and rate to b/g/n*/
+    if(!(_parser.send("AT+S.SCFG=wifi_ht_mode,%d\r",1) && _parser.recv("OK")))
+        {
+            debug_if(dbg_on, "SPWF> error setting ht_mode\r\n");
+            return false;
+        }
+        
+    if(!(_parser.send("AT+S.SCFG=wifi_opr_rate_mask,0x003FFFCF\r") && _parser.recv("OK")))
+        {
+            debug_if(dbg_on, "SPWF> error setting operational rates\r\n");
+            return false;
+        }
 
     /*set idle mode (0->idle, 1->STA,3->miniAP, 2->IBSS)*/
     if(!(_parser.send("AT+S.SCFG=wifi_mode,%d\r", mode) && _parser.recv("OK")))