pengfei wu
/
ESP8266Program
For test
Diff: ESP8266.h
- Revision:
- 31:ab3e7ca014c1
- Parent:
- 30:46a560b71e61
- Child:
- 32:91b3f3162c6a
--- a/ESP8266.h Wed Feb 04 15:03:52 2015 +0000 +++ b/ESP8266.h Wed Feb 04 15:32:20 2015 +0000 @@ -55,13 +55,42 @@ */ ESP8266(PinName tx, PinName rx, int baud_rate = 9600); + /** + * Set as station mode and join in ssid with pwd. + * + * @param ssid - SSID of AP to join in. + * @param pwd - PASSWORD of AP to join in. + * @return true if success, false for failure. + */ bool setStationMode(String ssid, String pwd); - bool setSoftAPMode(String ssid, String pwd, + + /** + * Set as softap mode and start softap. + * + * @param sap_ssid - SSID of its self softap. + * @param sap_pwd - PASSWORD of its self softap. + * @param chl - the channel can be 1, 2, 3, ..., 13. + * @param enc - the method of encrypstion. + * @return true if success, false for failure. + */ + bool setSoftAPMode(String sap_ssid, String sap_pwd, ESP8266Channel chl = ESP8266_CHANNEL_7, ESP8266Encrypstion ecn = ESP8266_ECN_WAP_WAP2_PSK); + /** + * Set as softap + station mode and start softap and join in ssid with pwd. + * + * @param ssid - SSID of AP to join in. + * @param pwd - PASSWORD of AP to join in. + * @param sap_ssid - SSID of its self softap. + * @param sap_pwd - PASSWORD of its self softap. + * @param chl - the channel can be 1, 2, 3, ..., 13. + * @param enc - the method of encrypstion. + * @return true if success, false for failure. + */ bool setStationSoftAPMode(String ssid, String pwd, String sap_ssid, String sap_pwd , ESP8266Channel chl = ESP8266_CHANNEL_7, ESP8266Encrypstion ecn = ESP8266_ECN_WAP_WAP2_PSK); + bool ipConfig(uint8_t type, String addr, int port, uint8_t mux = 0, uint8_t id = 0); //send data in sigle connection mode