Wifly Driver
V1.0
|
Go to the source code of this file.
Macros | |
#define | DATA_M 0 |
Wifly data mode */. More... | |
#define | CMD_M 1 |
Wifly command mode */. More... | |
#define | RESET_HARDWARE 0 |
Hardware reset mode */. More... | |
#define | RESET_SOFTWARE 1 |
Software reset mode */. More... | |
#define | WLAN_DISCON 0 |
Wlan disconnected. More... | |
#define | WLAN_CON 1 |
Wlan connected. More... | |
#define | WLAN_APCON 2 |
AP connected. More... | |
#define | MODE_DISCON 0 |
Protocol not configured. More... | |
#define | MODE_UDP 1 |
UDP Protocol configured. More... | |
#define | MODE_TCP 2 |
TCP Protocol configured. More... | |
#define | MODE_HTTP 3 |
HTTP Protocol configured. More... | |
#define | WIFLYBUFSIZE (BUFSIZE_WIFLY) |
#define | RST_WIFLY_PIN (WIFLY_RST_PIN) |
#define | OPEN 0 |
Open. More... | |
#define | WEP 1 |
WEP-128. More... | |
#define | WPA1 2 |
WPA1. More... | |
#define | MIXED 3 |
Mixed WPA1 and WPA2-SK. More... | |
#define | WPA2 4 |
WPA2-PSK. More... | |
#define | ADHOCM 6 |
Ad hoc Mode. More... | |
#define | WPE64 8 |
WPE-64. More... | |
#define | UART_MD 0x01 |
#define | CMD_DELAY 600 |
#define | RST_DELAY 3000 |
#define | JOIN_DELAY 8000 |
#define | SET_DELAY 700 |
#define | ECHO_DELAY 1000 |
#define | PING_DELAY 4000 |
#define | GET_DELAY 700 |
#define | OPEN_DELAY 6000 |
#define | UDP_DELAY 3000 |
#define | TCP_DELAY 2000 |
#define | READY "*READY*" |
#define | CMD "CMD" |
#define | EXIT "EXIT" |
#define | AOK "AOK" |
#define | JOIN_OK "Associated!" |
#define | PING_OK "reply" |
#define | OPEN_CON "*OPEN*" |
#define | HELLO_CON "*HELLO*" |
#define | CLOSE_CON "*CLOS*" |
#define | OK "OK" |
#define | HTTP_HEAD "HTTP/1.0" |
#define | SAVE_OK "Storing in config" |
Functions | |
uint8_t | Wifly_start (uint32_t portNum, uint32_t baudrate) |
uint8_t | Wifly_logStart (uint32_t PortNum, uint32_t baudrate, uint32_t logSeverity) |
uint8_t | Wifly_ChangeBaudRate (uint32_t baudrate) |
uint8_t | Wifly_save () |
uint8_t | Wifly_factoryReset () |
uint8_t | Wifly_sleep () |
void | Wifly_reset (uint8_t typeReset) |
uint8_t | Wifly_WLANConnect (uint32_t AuthMode, char *ssid, char *passw) |
uint8_t | Wifly_WLANConnectPing (uint32_t AuthMode, char *ssid, char *passw, char *pingIP) |
uint8_t | Wifly_leave () |
uint8_t | Wifly_setIpAddress (char *address) |
uint8_t | Wifly_setIpBackup (char *address) |
uint8_t | Wifly_setIpDHCP (uint8_t value) |
uint8_t | Wifly_setIpNET (char *address) |
uint8_t | Wifly_setIpFlags (uint32_t mask) |
uint8_t | Wifly_setIpGateway (char *address) |
uint8_t | Wifly_setIpHost (char *address) |
uint8_t | Wifly_setIpLocalPort (uint32_t value) |
uint8_t | Wifly_setIpnetmask (char *address) |
uint8_t | Wifly_setIpProtocol (uint32_t value) |
uint8_t | Wifly_setIpRemote (uint32_t value) |
uint8_t | Wifly_setIpTcpMode (uint32_t value) |
uint8_t | Wifly_setComRemote (char *value) |
uint8_t | Wifly_setOptionFormat (uint32_t value) |
uint8_t | Wifly_setUartMode (uint32_t value) |
uint8_t | Wifly_setUartInstant (uint32_t value) |
uint8_t | Wifly_setUartBaud (uint32_t value) |
uint8_t | Wifly_setWlanTX (uint32_t tx) |
uint8_t | Wifly_setWlanAuth (uint32_t value) |
uint8_t | Wifly_setWlanChannel (uint8_t value) |
uint8_t | Wifly_setWlanJoin (uint32_t value) |
uint8_t | Wifly_setWlanKey (char *password) |
uint8_t | Wifly_setWlanPhrase (char *password) |
uint8_t | Wifly_setWlanSSID (char *value) |
uint8_t | Wifly_setDNSName (char *value) |
uint8_t | Wifly_ping (char *ip) |
char * | Wifly_getIp () |
uint8_t | Wifly_getChannel () |
uint8_t | Wifly_getTx () |
char * | Wifly_getMac () |
char * | Wifly_getWlan () |
double | Wifly_getVer () |
int32_t | Wifly_getRSSI () |
uint32_t | Wifly_getTime () |
uint8_t | Wifly_WLANConfigConnect (uint32_t AuthMode, char *ssid, char *passw) |
char * | Wifly_HTTPReceive (char *dnsAddress, char *getCommand, uint32_t port, uint8_t proto) |
uint8_t | Wifly_HTTPSend (char *dnsAddress, char *getCommand, uint32_t port, uint8_t proto) |
uint8_t | Wifly_HTTPConfig (char *dnsAddress, char *getCommand, uint32_t port, uint8_t proto) |
char * | Wifly_UDPReceive (char *address, uint32_t localPort, uint32_t remotePort, const char *restrict command,...) |
uint8_t | Wifly_UDPSend (char *address, uint32_t localPort, uint32_t remotePort, char *exResp, const char *restrict command,...) |
uint8_t | Wifly_UDPConfig (char *address, uint32_t localPort, uint32_t remotePort) |
char * | Wifly_TCPReceive (char *address, uint32_t remotePort, const char *restrict command,...) |
uint8_t | Wifly_TCPSend (char *address, uint32_t remotePort, char *exResp, const char *restrict command,...) |
void | Wifly_TCPTimeOpen (uint32_t time, char *address, uint32_t remotePort, char *exResp, const char *restrict command,...) |
void | Wifly_TCPTimeOpenDisc () |
uint8_t | Wifly_TCPConfig (char *address, uint32_t port) |
uint32_t | Wifly_showConnection () |
uint8_t | Wifly_open (char *dnsAddress, uint32_t port) |
uint8_t | Wifly_close () |
uint8_t | Wifly_APMode (char *ssid, uint8_t channel) |
uint8_t | Wifly_ConfigAPMode (char *ssid, uint8_t channel, char *ipAddress, char *subnetMask, char *gateway) |
#define AOK "AOK" |
Definition at line 67 of file WiFly.h.
Referenced by Wifly_APMode(), Wifly_factoryReset(), Wifly_leave(), Wifly_reset(), Wifly_setComRemote(), Wifly_setDNSName(), Wifly_setIpAddress(), Wifly_setIpDHCP(), Wifly_setIpFlags(), Wifly_setIpGateway(), Wifly_setIpHost(), Wifly_setIpLocalPort(), Wifly_setIpNET(), Wifly_setIpnetmask(), Wifly_setIpProtocol(), Wifly_setIpRemote(), Wifly_setIpTcpMode(), Wifly_setOptionFormat(), Wifly_setUartBaud(), Wifly_setUartMode(), Wifly_setWlanAuth(), Wifly_setWlanChannel(), Wifly_setWlanJoin(), Wifly_setWlanKey(), Wifly_setWlanPhrase(), Wifly_setWlanSSID(), Wifly_setWlanTX(), and Wifly_sleep().
#define CLOSE_CON "*CLOS*" |
Definition at line 72 of file WiFly.h.
Referenced by Wifly_close().
#define CMD_DELAY 600 |
Definition at line 51 of file WiFly.h.
Referenced by Wifly_close(), Wifly_factoryReset(), and Wifly_save().
#define DATA_M 0 |
Wifly data mode */.
Definition at line 13 of file WiFly.h.
Referenced by Wifly_HTTPReceive(), Wifly_HTTPSend(), Wifly_reset(), Wifly_setUartBaud(), Wifly_setUartInstant(), Wifly_TCPReceive(), and Wifly_TCPSend().
#define ECHO_DELAY 1000 |
Definition at line 55 of file WiFly.h.
Referenced by Wifly_reset().
#define GET_DELAY 700 |
Definition at line 57 of file WiFly.h.
Referenced by Wifly_getChannel(), Wifly_getIp(), Wifly_getMac(), Wifly_getRSSI(), Wifly_getTime(), Wifly_getTx(), Wifly_getVer(), Wifly_getWlan(), and Wifly_showConnection().
#define HELLO_CON "*HELLO*" |
Definition at line 71 of file WiFly.h.
Referenced by Wifly_TCPConfig().
#define HTTP_HEAD "HTTP/1.0" |
Definition at line 74 of file WiFly.h.
Referenced by Wifly_HTTPReceive().
#define JOIN_DELAY 8000 |
Definition at line 53 of file WiFly.h.
Referenced by Wifly_WLANConnect().
#define JOIN_OK "Associated!" |
Definition at line 68 of file WiFly.h.
Referenced by Wifly_WLANConnect().
#define MIXED 3 |
Mixed WPA1 and WPA2-SK.
Definition at line 42 of file WiFly.h.
Referenced by Wifly_WLANConfigConnect().
#define MODE_DISCON 0 |
#define MODE_HTTP 3 |
#define MODE_TCP 2 |
#define MODE_UDP 1 |
#define OPEN_CON "*OPEN*" |
Definition at line 70 of file WiFly.h.
Referenced by Wifly_open().
#define OPEN_DELAY 6000 |
Definition at line 58 of file WiFly.h.
Referenced by Wifly_open().
#define PING_DELAY 4000 |
Definition at line 56 of file WiFly.h.
Referenced by Wifly_ping().
#define PING_OK "reply" |
Definition at line 69 of file WiFly.h.
Referenced by Wifly_ping().
#define READY "*READY*" |
Definition at line 64 of file WiFly.h.
Referenced by Wifly_reset().
#define RESET_HARDWARE 0 |
Hardware reset mode */.
Definition at line 17 of file WiFly.h.
Referenced by Wifly_start(), and Wifly_WLANConnect().
#define RESET_SOFTWARE 1 |
Software reset mode */.
Definition at line 18 of file WiFly.h.
Referenced by Wifly_ChangeBaudRate(), Wifly_ConfigAPMode(), and Wifly_WLANConfigConnect().
#define RST_DELAY 3000 |
Definition at line 52 of file WiFly.h.
Referenced by Wifly_reset().
#define RST_WIFLY_PIN (WIFLY_RST_PIN) |
Definition at line 36 of file WiFly.h.
Referenced by Wifly_reset().
#define SAVE_OK "Storing in config" |
Definition at line 75 of file WiFly.h.
Referenced by Wifly_save().
#define SET_DELAY 700 |
Definition at line 54 of file WiFly.h.
Referenced by Wifly_APMode(), Wifly_leave(), Wifly_setComRemote(), Wifly_setDNSName(), Wifly_setIpAddress(), Wifly_setIpDHCP(), Wifly_setIpFlags(), Wifly_setIpGateway(), Wifly_setIpHost(), Wifly_setIpLocalPort(), Wifly_setIpNET(), Wifly_setIpnetmask(), Wifly_setIpProtocol(), Wifly_setIpRemote(), Wifly_setIpTcpMode(), Wifly_setOptionFormat(), Wifly_setUartBaud(), Wifly_setUartInstant(), Wifly_setUartMode(), Wifly_setWlanAuth(), Wifly_setWlanChannel(), Wifly_setWlanJoin(), Wifly_setWlanKey(), Wifly_setWlanPhrase(), Wifly_setWlanSSID(), Wifly_setWlanTX(), and Wifly_sleep().
#define TCP_DELAY 2000 |
Definition at line 60 of file WiFly.h.
Referenced by Wifly_TCPReceive(), and Wifly_TCPSend().
#define UART_MD 0x01 |
Definition at line 47 of file WiFly.h.
Referenced by Wifly_reset().
#define UDP_DELAY 3000 |
Definition at line 59 of file WiFly.h.
Referenced by Wifly_UDPReceive(), and Wifly_UDPSend().
#define WEP 1 |
#define WIFLYBUFSIZE (BUFSIZE_WIFLY) |
#define WLAN_APCON 2 |
#define WLAN_CON 1 |
#define WLAN_DISCON 0 |
#define WPA1 2 |
#define WPA2 4 |
uint8_t Wifly_APMode | ( | char * | ssid, |
uint8_t | channel | ||
) |
uint8_t Wifly_ChangeBaudRate | ( | uint32_t | baudrate | ) |
Change the UART and wifly baud rate communication
baudrate | UART port baud rate. |
Definition at line 274 of file WiFly.c.
References FALSE, Log_log(), LV_ERR, LV_INFO, PrintF_delayMs(), PrintF_start(), RESET_SOFTWARE, TRUE, Wifly_reset(), Wifly_save(), and Wifly_setUartBaud().
uint8_t Wifly_close | ( | ) |
Close a TCP connection.
Definition at line 493 of file WiFly.c.
References CLOSE, CLOSE_CON, CMD_DELAY, FALSE, Log_log(), LV_INFO, and TRUE.
Referenced by Wifly_TCPReceive(), and Wifly_TCPSend().
uint8_t Wifly_ConfigAPMode | ( | char * | ssid, |
uint8_t | channel, | ||
char * | ipAddress, | ||
char * | subnetMask, | ||
char * | gateway | ||
) |
Sending the command settings necessary to AP mode.
ssid | SSID name. |
channel | Connection channel number. |
ipAddress | Local IP address |
subnetMask | Local IP subnet mask. |
gateway | Local gateway address. |
Definition at line 1144 of file WiFly.c.
References FALSE, Log_log(), LV_ERR, RESET_SOFTWARE, TRUE, Wifly_getVer(), Wifly_reset(), Wifly_save(), Wifly_setIpAddress(), Wifly_setIpDHCP(), Wifly_setIpGateway(), Wifly_setIpNET(), Wifly_setWlanChannel(), Wifly_setWlanJoin(), Wifly_setWlanSSID(), WLAN_APCON, and xMutexWifly.
uint8_t Wifly_factoryReset | ( | ) |
uint8_t Wifly_getChannel | ( | ) |
char* Wifly_getIp | ( | ) |
char* Wifly_getMac | ( | ) |
int32_t Wifly_getRSSI | ( | ) |
uint32_t Wifly_getTime | ( | ) |
uint8_t Wifly_getTx | ( | ) |
double Wifly_getVer | ( | ) |
char* Wifly_getWlan | ( | ) |
uint8_t Wifly_HTTPConfig | ( | char * | dnsAddress, |
char * | getCommand, | ||
uint32_t | port, | ||
uint8_t | proto | ||
) |
Sending the command settings necessary to HTTP connection.
dnsAddress | web page DNS address. |
getCommand | get command string format. |
port | Web server port connection. |
proto | Ip protocol configuration number. |
Definition at line 932 of file WiFly.c.
References FALSE, MODE_HTTP, TRUE, Wifly_setComRemote(), Wifly_setDNSName(), Wifly_setIpProtocol(), Wifly_setIpRemote(), and Wifly_setOptionFormat().
Referenced by Wifly_HTTPReceive(), and Wifly_HTTPSend().
char* Wifly_HTTPReceive | ( | char * | dnsAddress, |
char * | getCommand, | ||
uint32_t | port, | ||
uint8_t | proto | ||
) |
Send a HTTP command and receive the server response.
dnsAddress | web page DNS address. |
getCommand | get command string format. |
port | Web server port connection. |
proto | Ip protocol configuration number. |
Definition at line 891 of file WiFly.c.
References DATA_M, HTTP_HEAD, TRUE, Wifly_HTTPConfig(), Wifly_open(), and xMutexWifly.
Referenced by Arpalab_receiveValue().
uint8_t Wifly_HTTPSend | ( | char * | dnsAddress, |
char * | getCommand, | ||
uint32_t | port, | ||
uint8_t | proto | ||
) |
Send a HTTP command to send values.
dnsAddress | web page DNS address. |
getCommand | get command string format. |
port | Web server port connection. |
proto | Ip protocol configuration number. |
Definition at line 912 of file WiFly.c.
References DATA_M, FALSE, TRUE, Wifly_HTTPConfig(), Wifly_open(), and xMutexWifly.
Referenced by Arpalab_sendValue().
uint8_t Wifly_leave | ( | ) |
uint8_t Wifly_logStart | ( | uint32_t | PortNum, |
uint32_t | baudrate, | ||
uint32_t | logSeverity | ||
) |
Wifly start Log module to send log information
PortNum | |
baudrate | UART port baud rate. |
logSeverity |
Definition at line 249 of file WiFly.c.
References FALSE, Log_log(), Log_start(), LV_ERR, NULL, and xMutexWifly.
uint8_t Wifly_open | ( | char * | dnsAddress, |
uint32_t | port | ||
) |
Open a TCP connection.
dnsAddress | destination DNS or IP address. |
port | remote port number. |
Definition at line 478 of file WiFly.c.
References FALSE, Log_log(), LV_INFO, OPEN_CON, OPEN_CONN, OPEN_DELAY, and TRUE.
Referenced by Wifly_HTTPReceive(), Wifly_HTTPSend(), Wifly_TCPReceive(), and Wifly_TCPSend().
uint8_t Wifly_ping | ( | char * | ip | ) |
Ping an IP address
ip | IP address |
Definition at line 465 of file WiFly.c.
References FALSE, Log_log(), LV_INFO, PING, PING_DELAY, PING_OK, and TRUE.
Referenced by Wifly_WLANConnect().
void Wifly_reset | ( | uint8_t | typeReset | ) |
Reset wifly device to ensure to start from know state
typeReset | Reset type: HARDWARE=0, SOFTWARE=1 |
Definition at line 299 of file WiFly.c.
References AOK, DATA_M, ECHO_DELAY, FALSE, Log_log(), LV_INFO, MODE_DISCON, PrintF_ChkScan(), PrintF_delayMs(), READY, REBOOT, RST_DELAY, RST_WIFLY_PIN, SET_UART_MD, TRUE, UART_MD, and WLAN_DISCON.
Referenced by Wifly_ChangeBaudRate(), Wifly_ConfigAPMode(), Wifly_start(), Wifly_WLANConfigConnect(), and Wifly_WLANConnect().
uint8_t Wifly_save | ( | ) |
Save the configuration settings.
Definition at line 340 of file WiFly.c.
References CMD_DELAY, FALSE, SAVE, SAVE_OK, and TRUE.
Referenced by Wifly_ChangeBaudRate(), Wifly_ConfigAPMode(), and Wifly_WLANConfigConnect().
uint8_t Wifly_setComRemote | ( | char * | value | ) |
Sets the ASCI string that is sent to the remote TCP client when the TCP port is opened.
value | String to send to the remote TCP client. |
Definition at line 618 of file WiFly.c.
References AOK, FALSE, SET_COM_REM, SET_DELAY, and TRUE.
Referenced by Wifly_HTTPConfig(), and Wifly_TCPConfig().
uint8_t Wifly_setDNSName | ( | char * | value | ) |
sets the name of the host for TCP/IP connections
value | DNS Name max 32 charecters. |
Definition at line 742 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_DNS_NAME, and TRUE.
Referenced by Wifly_HTTPConfig().
uint8_t Wifly_setIpAddress | ( | char * | address | ) |
Sets the WiFly module's IP address.
address | IP address |
Definition at line 508 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_ADDRESS, and TRUE.
Referenced by Wifly_ConfigAPMode().
uint8_t Wifly_setIpBackup | ( | char * | address | ) |
Sets the WiFly module's IP address
address | IP address |
uint8_t Wifly_setIpDHCP | ( | uint8_t | value | ) |
Enables/disables DHCP mode.
value | Disabled=0, enabled=1 |
Definition at line 518 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_DHCP, and TRUE.
Referenced by Wifly_ConfigAPMode(), and Wifly_WLANConfigConnect().
uint8_t Wifly_setIpFlags | ( | uint32_t | mask | ) |
Sets the TCP/IP functions
mask | is a hex number referring to a bit-mapped register. see Figure 2-1 Wifly manual. |
Definition at line 538 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_FLAGS, and TRUE.
uint8_t Wifly_setIpGateway | ( | char * | address | ) |
Sets the gateway IP address
address | IP gateway address. |
Definition at line 548 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_GATEWAY, and TRUE.
Referenced by Wifly_ConfigAPMode().
uint8_t Wifly_setIpHost | ( | char * | address | ) |
Sets the remote host's IP address
address | remote host's IP address |
Definition at line 558 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_HOST, and TRUE.
Referenced by Wifly_TCPConfig(), and Wifly_UDPConfig().
uint8_t Wifly_setIpLocalPort | ( | uint32_t | value | ) |
Sets the local port number
value | is a decimal number representing the port. |
Definition at line 568 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_LOCAL_PORT, and TRUE.
Referenced by Wifly_UDPConfig().
uint8_t Wifly_setIpNET | ( | char * | address | ) |
Sets the network mask.
address | IP subnet address. |
Definition at line 528 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_NET, and TRUE.
Referenced by Wifly_ConfigAPMode().
uint8_t Wifly_setIpnetmask | ( | char * | address | ) |
uint8_t Wifly_setIpProtocol | ( | uint32_t | value | ) |
Sets the IP protocol.
value | is a bit-mapped register. UDP=0, TCP=2, HTTP... See Figure 2-2 Wifly manual. |
Definition at line 588 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_PROTO, and TRUE.
Referenced by Wifly_HTTPConfig(), Wifly_TCPConfig(), and Wifly_UDPConfig().
uint8_t Wifly_setIpRemote | ( | uint32_t | value | ) |
Sets the remote host port number.
value | port number |
Definition at line 598 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_IP_REMOTE, and TRUE.
Referenced by Wifly_HTTPConfig(), Wifly_TCPConfig(), and Wifly_UDPConfig().
uint8_t Wifly_setIpTcpMode | ( | uint32_t | value | ) |
uint8_t Wifly_setOptionFormat | ( | uint32_t | value | ) |
Sets the HTTP client/web server information.
value | is a bitmapped register as shown in Figure 2-4 of wifly manual. |
Definition at line 628 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_OP_FORMAT, and TRUE.
Referenced by Wifly_HTTPConfig(), Wifly_TCPConfig(), and Wifly_UDPConfig().
uint8_t Wifly_setUartBaud | ( | uint32_t | value | ) |
Change the baud rate
value | is 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, or 921600 |
Definition at line 660 of file WiFly.c.
References AOK, DATA_M, FALSE, SET_DELAY, SET_UART_BAUD, and TRUE.
Referenced by Wifly_ChangeBaudRate().
uint8_t Wifly_setUartInstant | ( | uint32_t | value | ) |
Immediately changes the baud rate
value | is 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, or 921600 |
Definition at line 648 of file WiFly.c.
References DATA_M, FALSE, SET_DELAY, SET_UART_INST, and TRUE.
uint8_t Wifly_setUartMode | ( | uint32_t | value | ) |
uint8_t Wifly_setWlanAuth | ( | uint32_t | value | ) |
Sets the authentication mode.
value | is a decimal value as shown in Figure 2-13 Wifly manual |
Definition at line 682 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_WLAN_AUTH, and TRUE.
Referenced by Wifly_WLANConfigConnect().
uint8_t Wifly_setWlanChannel | ( | uint8_t | value | ) |
Sets the WLAN channel.
value | is a decimal number from 1 to 13 representing a fixed channel |
Definition at line 692 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_WLAN_CHAN, and TRUE.
Referenced by Wifly_ConfigAPMode().
uint8_t Wifly_setWlanJoin | ( | uint32_t | value | ) |
Sets the policy for automatically associating with network access points,where
is one of the options.
value | 0= Manual, 1= Associate with the access point that matches the stored SSID, 2= Associated with any, 4= Create an ad hoc network, 5=Associaed an Soft AP. |
Definition at line 702 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_WLAN_JOIN, and TRUE.
Referenced by Wifly_ConfigAPMode(), and Wifly_WLANConfigConnect().
uint8_t Wifly_setWlanKey | ( | char * | password | ) |
sets the WEP-64 or WEP-128 key
password | is 26 ASCII chars in hex without the preceding 0x. |
Definition at line 712 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_WLAN_KEY, and TRUE.
Referenced by Wifly_WLANConfigConnect().
uint8_t Wifly_setWlanPhrase | ( | char * | password | ) |
sets the passphrase for WPA and WPA2 security modes
password | is an alphanumeric pass phrase. |
Definition at line 722 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_WLAN_PHRASE, and TRUE.
Referenced by Wifly_WLANConfigConnect().
uint8_t Wifly_setWlanSSID | ( | char * | value | ) |
sets the SSID with which the module associates.
value | is 1 to 32 characters that represents SSID name. |
Definition at line 732 of file WiFly.c.
References AOK, FALSE, SET_DELAY, SET_WLAN_SSID, and TRUE.
Referenced by Wifly_ConfigAPMode(), and Wifly_WLANConfigConnect().
uint8_t Wifly_setWlanTX | ( | uint32_t | tx | ) |
uint32_t Wifly_showConnection | ( | ) |
uint8_t Wifly_sleep | ( | ) |
uint8_t Wifly_start | ( | uint32_t | portNum, |
uint32_t | baudrate | ||
) |
Wifly start Printf module and connection parameters
portNum | UART id |
baudrate | UART baudrate |
Definition at line 224 of file WiFly.c.
References FALSE, Log_log(), LV_ERR, NULL, PrintF_start(), RESET_HARDWARE, Wifly_reset(), and xMutexWifly.
uint8_t Wifly_TCPConfig | ( | char * | address, |
uint32_t | port | ||
) |
Sending the command settings necessary to UDP connection.
address | destination IP address. |
port | remote port number. |
Definition at line 1109 of file WiFly.c.
References FALSE, HELLO_CON, MODE_TCP, TRUE, Wifly_setComRemote(), Wifly_setIpHost(), Wifly_setIpProtocol(), Wifly_setIpRemote(), and Wifly_setOptionFormat().
Referenced by Wifly_TCPReceive(), and Wifly_TCPSend().
char* Wifly_TCPReceive | ( | char * | address, |
uint32_t | remotePort, | ||
const char *restrict | command, | ||
... | |||
) |
Send a TCP command and receive the server response.
address | remote IP address. |
remotePort | remote port number connection. |
command | string to send. |
Definition at line 1026 of file WiFly.c.
References DATA_M, TCP_DELAY, TRUE, Wifly_close(), Wifly_open(), Wifly_TCPConfig(), and xMutexWifly.
Referenced by Tcp_receiveValue().
uint8_t Wifly_TCPSend | ( | char * | address, |
uint32_t | remotePort, | ||
char * | exResp, | ||
const char *restrict | command, | ||
... | |||
) |
Send a TCP command to send values.
address | IP address. |
remotePort | remote port number. |
exResp | expected string response. |
command | string to send. |
Definition at line 1053 of file WiFly.c.
References DATA_M, FALSE, TCP_DELAY, TRUE, Wifly_close(), Wifly_open(), Wifly_TCPConfig(), and xMutexWifly.
Referenced by Tcp_sendValue(), and Wifly_TCPTimeOpen().
void Wifly_TCPTimeOpen | ( | uint32_t | time, |
char * | address, | ||
uint32_t | remotePort, | ||
char * | exResp, | ||
const char *restrict | command, | ||
... | |||
) |
Send every time interval a TCP command to send values.
/attention To disable Wifly_TCPTimeOpen you should to call Wifly_TCPTimeOpenDisc in a different task.
time | time interval in seconds |
address | IP address. |
remotePort | remote port number. |
exResp | expected string response. |
command | string to send. |
Definition at line 1081 of file WiFly.c.
References FALSE, PrintF_delayMs(), TRUE, and Wifly_TCPSend().
void Wifly_TCPTimeOpenDisc | ( | ) |
uint8_t Wifly_UDPConfig | ( | char * | address, |
uint32_t | localPort, | ||
uint32_t | remotePort | ||
) |
Sending the command settings necessary to UDP connection
address | Remote IP address. |
localPort | Local port number. |
remotePort | Remote port number connection. |
Definition at line 1002 of file WiFly.c.
References FALSE, MODE_UDP, TRUE, Wifly_setIpHost(), Wifly_setIpLocalPort(), Wifly_setIpProtocol(), Wifly_setIpRemote(), and Wifly_setOptionFormat().
Referenced by Wifly_UDPReceive(), and Wifly_UDPSend().
char* Wifly_UDPReceive | ( | char * | address, |
uint32_t | localPort, | ||
uint32_t | remotePort, | ||
const char *restrict | command, | ||
... | |||
) |
Send a UDP command and receive the server response.
address | remote IP address. |
localPort | local port number. |
remotePort | remote port number connection. |
command | Command string to send. |
Definition at line 955 of file WiFly.c.
References PrintF_delayMs(), TRUE, UDP_DELAY, Wifly_UDPConfig(), WIFLYBUFSIZE, and xMutexWifly.
Referenced by Udp_receiveValue().
uint8_t Wifly_UDPSend | ( | char * | address, |
uint32_t | localPort, | ||
uint32_t | remotePort, | ||
char * | exResp, | ||
const char *restrict | command, | ||
... | |||
) |
Send a UDP command to send values.
address | Remote IP address. |
localPort | Local port number. |
remotePort | Remote port number connection. |
exResp | Expected string response. |
command | Command string to send. |
Definition at line 978 of file WiFly.c.
References FALSE, PrintF_delayMs(), TRUE, UDP_DELAY, Wifly_UDPConfig(), and xMutexWifly.
Referenced by Udp_sendValue().
uint8_t Wifly_WLANConfigConnect | ( | uint32_t | AuthMode, |
char * | ssid, | ||
char * | passw | ||
) |
Sending the command settings necessary to establish WLAN connection.
AuthMode | is a decimal that represents the authentication mode. |
ssid | SSID name. |
passw | password of the SSID connection. |
Definition at line 428 of file WiFly.c.
References FALSE, Log_log(), LV_INFO, MIXED, RESET_SOFTWARE, TRUE, WEP, Wifly_reset(), Wifly_save(), Wifly_setIpDHCP(), Wifly_setWlanAuth(), Wifly_setWlanJoin(), Wifly_setWlanKey(), Wifly_setWlanPhrase(), Wifly_setWlanSSID(), WLAN_CON, WPA1, and WPA2.
Referenced by Wifly_WLANConnect().
uint8_t Wifly_WLANConnect | ( | uint32_t | AuthMode, |
char * | ssid, | ||
char * | passw | ||
) |
Connect to WLAN ssid
AuthMode | WLAN auth mode |
ssid | Name of WLAN connection |
passw | WLAN Password |
Definition at line 367 of file WiFly.c.
References FALSE, JOIN, JOIN_DELAY, JOIN_OK, Log_log(), LV_ERR, RESET_HARDWARE, TRUE, Wifly_ping(), Wifly_reset(), Wifly_WLANConfigConnect(), and xMutexWifly.
Referenced by Wifly_WLANConnectPing().
uint8_t Wifly_WLANConnectPing | ( | uint32_t | AuthMode, |
char * | ssid, | ||
char * | passw, | ||
char * | pingIP | ||
) |
Connect to WLAN ssid and change IP Ping used to check connection
AuthMode | WLAN auth mode |
ssid | Name of WLAN connection |
passw | WLAN Password |
pingIP | Ping address |
Definition at line 408 of file WiFly.c.
References Wifly_WLANConnect().
Referenced by Arpalab_receiveValue(), Arpalab_sendValue(), Tcp_receiveValue(), Tcp_sendValue(), Udp_receiveValue(), and Udp_sendValue().