ACTUALIZED LIBRARY 0 Open (Default) 1 WEP-128 2 WPA1 3 Mixed WPA1 & WPA2-PSK 4 WPA2-PSK 5 Not Used 6 Adhoc, Join any Adhoc network
Dependents: mbed_Arduino_sensor
Fork of WiflyInterface by
Diff: Wifly/Wifly.h
- Revision:
- 11:002225507f44
- Parent:
- 8:9a3cd07ed7e8
--- a/Wifly/Wifly.h Thu Aug 23 14:08:08 2012 +0000 +++ b/Wifly/Wifly.h Fri Aug 24 12:29:57 2012 +0000 @@ -35,10 +35,14 @@ enum Security { NONE = 0, WEP_128 = 1, - WPA = 3 + WPA = 2, + MIX = 3, + WPA2 = 4, + Adhoc = 6 }; -class Wifly { +class Wifly +{ public: /* @@ -74,7 +78,7 @@ * @return true if connected, false otherwise */ bool join(); - + /* * Close a connection with the access point * @@ -100,14 +104,14 @@ * @return number of available characters */ int readable(); - + /* * Check if characters are available * * @return number of available characters */ int writeable(); - + /* * Check if a tcp link is active * @@ -148,14 +152,14 @@ * @return true if successful, false otherwise */ bool exit(); - + /* * Close a tcp connection * * @ returns true if successful */ bool close(); - + /* * Send a command to the wify module. Check if the module is in command mode. If not enter in command mode * @@ -166,10 +170,12 @@ * @returns true if successful */ bool sendCommand(const char * cmd, const char * ack = NULL, char * res = NULL, int timeout = DEFAULT_WAIT_RESP_TIMEOUT); - + bool dnsLookup(const char * host, char * ip); - - static Wifly * getInstance() {return inst;}; + + static Wifly * getInstance() { + return inst; + }; protected: Serial wifi; @@ -186,9 +192,9 @@ CircBuffer<char> buf_wifly; Security security; char * getStringSecurity(); - + bool cmd_mode; - + static Wifly * inst; void attach_rx(bool null);