Provide an easy-to-use way to manipulate ESP8266.

Dependencies:   ArduinoAPI

Dependents:   WeeESP8266_TCPClientMultiple WeeESP8266_TCPClientSingle WeeESP8266_TCPServer WeeESP8266_UDPClientMultiple ... more

Revision:
6:18eb2d9fb2ac
Parent:
5:5fa655d7212c
Child:
9:dec2cf52b744
--- a/ESP8266.h	Fri Feb 06 09:26:37 2015 +0000
+++ b/ESP8266.h	Fri Feb 06 12:25:40 2015 +0000
@@ -125,7 +125,7 @@
      *  2 - WPA_PSK, 3 - WPA2_PSK, 4 - WPA_WPA2_PSK, default: 0). 
      * @note This method should not be called when station mode. 
      */
-    bool setSoftAPParam(String ssid, String pwd, uint8_t chl = 7, uint8_t ecn = 0);
+    bool setSoftAPParam(String ssid, String pwd, uint8_t chl = 7, uint8_t ecn = 4);
     
     /**
      * Get the IP list of devices connected to SoftAP. 
@@ -339,15 +339,41 @@
     uint32_t recv(uint8_t *coming_mux_id, uint8_t *buffer, uint32_t len, uint32_t timeout = 1000);
 
  private:
-    String recvFind(String target, uint32_t timeout = 1000);
-    String recvFind(String target1, String target2, uint32_t timeout = 1000);
-    String recvFind(String target1, String target2, String target3, uint32_t timeout = 1000);
+    String recvString(String target, uint32_t timeout = 1000);
+    String recvString(String target1, String target2, uint32_t timeout = 1000);
+    String recvString(String target1, String target2, String target3, uint32_t timeout = 1000);
+    bool recvFind(String target, uint32_t timeout = 1000);
+    bool recvFindAndFilter(String target, String begin, String end, String &data, uint32_t timeout = 1000);
     
     bool eAT(void);
     bool eATRST(void);
-    String eATGMR(void);
+    bool eATGMR(String &version);
     
     bool sATCWMODE(uint8_t mode);
+    bool sATCWJAP(String ssid, String pwd);
+    bool eATCWLAP(String &list);
+    bool eATCWQAP(void);
+    bool sATCWSAP(String ssid, String pwd, uint8_t chl, uint8_t ecn);
+    bool eATCWLIF(String &list);
+    
+    bool eATCIPSTATUS(String &list);
+    bool sATCIPSTARTSingle(String type, String addr, uint32_t port);
+    bool sATCIPSTARTMultiple(uint8_t mux_id, String type, String addr, uint32_t port);
+    bool sATCIPSENDSingle(uint8_t *buffer, uint32_t len);
+    bool sATCIPSENDMultiple(uint8_t mux_id, uint8_t *buffer, uint32_t len);
+    bool sATCIPCLOSEMulitple(uint8_t mux_id);
+    bool eATCIPCLOSESingle(void);
+    bool eATCIFSR(String &list);
+    bool sATCIPMUX(uint8_t mode);
+    bool sATCIPSERVER(uint8_t mode, uint32_t port);
+    bool sATCIPSTO(uint32_t timeout);
+    
+    /*
+     * +IPD,len:data
+     * +IPD,id,len:data
+     */
+    
+    
     ArduinoSerial *m_puart; /* The UART to communicate with ESP8266 */
  
 };