Wifly Driver  V1.0
Macros | Functions
WiFly.h File Reference
This graph shows which files directly or indirectly include this file:

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)
 

Macro Definition Documentation

#define ADHOCM   6

Ad hoc Mode.

Definition at line 44 of file WiFly.h.

#define AOK   "AOK"
#define CLOSE_CON   "*CLOS*"

Definition at line 72 of file WiFly.h.

Referenced by Wifly_close().

#define CMD   "CMD"

Definition at line 65 of file WiFly.h.

#define CMD_DELAY   600

Definition at line 51 of file WiFly.h.

Referenced by Wifly_close(), Wifly_factoryReset(), and Wifly_save().

#define CMD_M   1

Wifly command mode */.

Definition at line 14 of file WiFly.h.

#define DATA_M   0
#define ECHO_DELAY   1000

Definition at line 55 of file WiFly.h.

Referenced by Wifly_reset().

#define EXIT   "EXIT"

Definition at line 66 of file WiFly.h.

#define GET_DELAY   700
#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

Protocol not configured.

Definition at line 26 of file WiFly.h.

Referenced by Wifly_reset().

#define MODE_HTTP   3

HTTP Protocol configured.

Definition at line 29 of file WiFly.h.

Referenced by Wifly_HTTPConfig().

#define MODE_TCP   2

TCP Protocol configured.

Definition at line 28 of file WiFly.h.

Referenced by Wifly_TCPConfig().

#define MODE_UDP   1

UDP Protocol configured.

Definition at line 27 of file WiFly.h.

Referenced by Wifly_UDPConfig().

#define OK   "OK"

Definition at line 73 of file WiFly.h.

#define OPEN   0

Open.

Definition at line 39 of file WiFly.h.

#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
#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

WEP-128.

Definition at line 40 of file WiFly.h.

Referenced by Wifly_WLANConfigConnect().

#define WIFLYBUFSIZE   (BUFSIZE_WIFLY)

Wifly buffer size

Definition at line 33 of file WiFly.h.

Referenced by Wifly_UDPReceive().

#define WLAN_APCON   2

AP connected.

Definition at line 23 of file WiFly.h.

Referenced by Wifly_ConfigAPMode().

#define WLAN_CON   1

Wlan connected.

Definition at line 22 of file WiFly.h.

Referenced by Wifly_WLANConfigConnect().

#define WLAN_DISCON   0

Wlan disconnected.

Definition at line 21 of file WiFly.h.

Referenced by Wifly_reset().

#define WPA1   2

WPA1.

Definition at line 41 of file WiFly.h.

Referenced by Wifly_WLANConfigConnect().

#define WPA2   4

WPA2-PSK.

Definition at line 43 of file WiFly.h.

Referenced by Wifly_WLANConfigConnect().

#define WPE64   8

WPE-64.

Definition at line 45 of file WiFly.h.

Function Documentation

uint8_t Wifly_APMode ( char *  ssid,
uint8_t  channel 
)

Creates a soft AP network on channel.

Parameters
ssidSSID name.
channelConnection channel number.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE. /Caution Only use with firmware 2.45 or higher

Definition at line 1133 of file WiFly.c.

References AOK, AP_MODE, FALSE, SET_DELAY, and TRUE.

uint8_t Wifly_ChangeBaudRate ( uint32_t  baudrate)

Change the UART and wifly baud rate communication

Parameters
baudrateUART port baud rate.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

uint8_t Wifly_close ( )

Close a TCP connection.

Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

uint8_t Wifly_ConfigAPMode ( char *  ssid,
uint8_t  channel,
char *  ipAddress,
char *  subnetMask,
char *  gateway 
)

Sending the command settings necessary to AP mode.

Parameters
ssidSSID name.
channelConnection channel number.
ipAddressLocal IP address
subnetMaskLocal IP subnet mask.
gatewayLocal gateway address.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE. /Caution Only use with firmware 2.45 or higher

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.

Here is the call graph for this function:

uint8_t Wifly_factoryReset ( )

factory Reset

Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 349 of file WiFly.c.

References AOK, CMD_DELAY, FACTORY_RESET, FALSE, and TRUE.

uint8_t Wifly_getChannel ( )

Get wlan command to known wlan channel.

Returns
Channel number.

Definition at line 766 of file WiFly.c.

References FALSE, GET_DELAY, GET_WLAN, Log_log(), LV_INFO, string, and TRUE.

Here is the call graph for this function:

char* Wifly_getIp ( )

Get ip command to known IP address.

Returns
IP address.

Definition at line 752 of file WiFly.c.

References GET_DELAY, GET_IP, Log_log(), LV_INFO, string, and TRUE.

Referenced by Arpalab_sendValue().

Here is the call graph for this function:

char* Wifly_getMac ( )

Get Mac Address.

Returns
MAC Address.

Definition at line 829 of file WiFly.c.

References GET_DELAY, GET_MAC, Log_log(), LV_INFO, string, and TRUE.

Here is the call graph for this function:

int32_t Wifly_getRSSI ( )

Show rssi command to known rssi signal.

Returns
rssi signal (dBm).

Definition at line 799 of file WiFly.c.

References GET_DELAY, Log_log(), LV_INFO, SHOW_RSSI, string, and TRUE.

Here is the call graph for this function:

uint32_t Wifly_getTime ( )

Show time up command response.Return time in seconds since wifly start up.

Returns
time since last start up (s).

Definition at line 814 of file WiFly.c.

References GET_DELAY, Log_log(), LV_INFO, SHOW_TIME, string, and TRUE.

Here is the call graph for this function:

uint8_t Wifly_getTx ( )

Get wlan tx command to known wlan tx power level.

Returns
tx power.

Definition at line 783 of file WiFly.c.

References GET_DELAY, GET_WLAN, Log_log(), LV_INFO, string, and TRUE.

Here is the call graph for this function:

double Wifly_getVer ( )

Get Wifly version

Returns
Wifly firmware version

Definition at line 860 of file WiFly.c.

References GET_DELAY, GET_VER, Log_log(), LV_INFO, string, and TRUE.

Referenced by Wifly_ConfigAPMode().

Here is the call graph for this function:

char* Wifly_getWlan ( )

Get SSID connection name.

Returns
SSID

Definition at line 845 of file WiFly.c.

References GET_DELAY, GET_WLAN, Log_log(), LV_INFO, string, and TRUE.

Here is the call graph for this function:

uint8_t Wifly_HTTPConfig ( char *  dnsAddress,
char *  getCommand,
uint32_t  port,
uint8_t  proto 
)

Sending the command settings necessary to HTTP connection.

Parameters
dnsAddressweb page DNS address.
getCommandget command string format.
portWeb server port connection.
protoIp protocol configuration number.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

char* Wifly_HTTPReceive ( char *  dnsAddress,
char *  getCommand,
uint32_t  port,
uint8_t  proto 
)

Send a HTTP command and receive the server response.

Parameters
dnsAddressweb page DNS address.
getCommandget command string format.
portWeb server port connection.
protoIp protocol configuration number.
Returns
string response.

Definition at line 891 of file WiFly.c.

References DATA_M, HTTP_HEAD, TRUE, Wifly_HTTPConfig(), Wifly_open(), and xMutexWifly.

Referenced by Arpalab_receiveValue().

Here is the call graph for this function:

uint8_t Wifly_HTTPSend ( char *  dnsAddress,
char *  getCommand,
uint32_t  port,
uint8_t  proto 
)

Send a HTTP command to send values.

Parameters
dnsAddressweb page DNS address.
getCommandget command string format.
portWeb server port connection.
protoIp protocol configuration number.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 912 of file WiFly.c.

References DATA_M, FALSE, TRUE, Wifly_HTTPConfig(), Wifly_open(), and xMutexWifly.

Referenced by Arpalab_sendValue().

Here is the call graph for this function:

uint8_t Wifly_leave ( )

Leave a join connection

Returns
Returns whether the connection was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 414 of file WiFly.c.

References AOK, FALSE, LEAVE, Log_log(), LV_ERR, LV_INFO, SET_DELAY, and TRUE.

Here is the call graph for this function:

uint8_t Wifly_logStart ( uint32_t  PortNum,
uint32_t  baudrate,
uint32_t  logSeverity 
)

Wifly start Log module to send log information

Parameters
PortNum
baudrateUART port baud rate.
logSeverity
Returns
Returns the result of log initialisation. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 249 of file WiFly.c.

References FALSE, Log_log(), Log_start(), LV_ERR, NULL, and xMutexWifly.

Here is the call graph for this function:

uint8_t Wifly_open ( char *  dnsAddress,
uint32_t  port 
)

Open a TCP connection.

Parameters
dnsAddressdestination DNS or IP address.
portremote port number.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

uint8_t Wifly_ping ( char *  ip)

Ping an IP address

Parameters
ipIP address
Returns
Returns whether the ping was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

void Wifly_reset ( uint8_t  typeReset)

Reset wifly device to ensure to start from know state

Parameters
typeResetReset 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().

Here is the call graph for this function:

uint8_t Wifly_save ( )

Save the configuration settings.

Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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.

Parameters
valueString to send to the remote TCP client.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
valueDNS Name max 32 charecters.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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.

Parameters
addressIP address
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
addressIP address
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.
uint8_t Wifly_setIpDHCP ( uint8_t  value)

Enables/disables DHCP mode.

Parameters
valueDisabled=0, enabled=1
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
maskis a hex number referring to a bit-mapped register. see Figure 2-1 Wifly manual.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
addressIP gateway address.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
addressremote host's IP address
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
valueis a decimal number representing the port.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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.

Parameters
addressIP subnet address.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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)

Sets the network mask.

Parameters
address
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 578 of file WiFly.c.

References AOK, FALSE, SET_DELAY, SET_IP_NETMASK, and TRUE.

uint8_t Wifly_setIpProtocol ( uint32_t  value)

Sets the IP protocol.

Parameters
valueis a bit-mapped register. UDP=0, TCP=2, HTTP... See Figure 2-2 Wifly manual.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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.

Parameters
valueport number
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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)

Controls the TCP connect timers, DNSpreferences, and remote configuration options.

Parameters
value
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 608 of file WiFly.c.

References AOK, FALSE, SET_DELAY, SET_IP_TCP_MODE, and TRUE.

uint8_t Wifly_setOptionFormat ( uint32_t  value)

Sets the HTTP client/web server information.

Parameters
valueis a bitmapped register as shown in Figure 2-4 of wifly manual.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
valueis 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, or 921600
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
valueis 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, or 921600
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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)

Sets Uart mode.

Parameters
valueis a hex number masking a bit-mapped value as shown in Figure 2-7 of wifly manual.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 638 of file WiFly.c.

References AOK, FALSE, SET_DELAY, SET_UART_MD, and TRUE.

uint8_t Wifly_setWlanAuth ( uint32_t  value)

Sets the authentication mode.

Parameters
valueis a decimal value as shown in Figure 2-13 Wifly manual
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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.

Parameters
valueis a decimal number from 1 to 13 representing a fixed channel
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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.

Parameters
value0= 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.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
passwordis 26 ASCII chars in hex without the preceding 0x.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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

Parameters
passwordis an alphanumeric pass phrase.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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.

Parameters
valueis 1 to 32 characters that represents SSID name.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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)

Set wlan tx command to set wlan tx power level

Parameters
txtx power value (dBm)
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 672 of file WiFly.c.

References AOK, FALSE, SET_DELAY, SET_WLAN_TX, and TRUE.

uint32_t Wifly_showConnection ( )

Get the connection status in the hex format 8(XYZ).

Returns
Return 8(XYZ) is a bit-mapped register providing the information shown in Figure 2-8 of the wifly manual.

Definition at line 876 of file WiFly.c.

References FALSE, GET_DELAY, SHOW_CONNECTION, and string.

uint8_t Wifly_sleep ( )

Puts the module to sleep mode

Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 358 of file WiFly.c.

References AOK, FALSE, SET_DELAY, SLEEP, and TRUE.

uint8_t Wifly_start ( uint32_t  portNum,
uint32_t  baudrate 
)

Wifly start Printf module and connection parameters

Parameters
portNumUART id
baudrateUART baudrate
Returns
Returns the result of wifly initialisation. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 224 of file WiFly.c.

References FALSE, Log_log(), LV_ERR, NULL, PrintF_start(), RESET_HARDWARE, Wifly_reset(), and xMutexWifly.

Here is the call graph for this function:

uint8_t Wifly_TCPConfig ( char *  address,
uint32_t  port 
)

Sending the command settings necessary to UDP connection.

Parameters
addressdestination IP address.
portremote port number.
Returns
Returns whether the configuration was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

char* Wifly_TCPReceive ( char *  address,
uint32_t  remotePort,
const char *restrict  command,
  ... 
)

Send a TCP command and receive the server response.

Parameters
addressremote IP address.
remotePortremote port number connection.
commandstring to send.
Returns
String response.

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().

Here is the call graph for this function:

uint8_t Wifly_TCPSend ( char *  address,
uint32_t  remotePort,
char *  exResp,
const char *restrict  command,
  ... 
)

Send a TCP command to send values.

Parameters
addressIP address.
remotePortremote port number.
exRespexpected string response.
commandstring to send.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

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.

Parameters
timetime interval in seconds
addressIP address.
remotePortremote port number.
exRespexpected string response.
commandstring to send.

Definition at line 1081 of file WiFly.c.

References FALSE, PrintF_delayMs(), TRUE, and Wifly_TCPSend().

Here is the call graph for this function:

void Wifly_TCPTimeOpenDisc ( )

Disable TCPTimeOpen

Definition at line 1104 of file WiFly.c.

References FALSE.

uint8_t Wifly_UDPConfig ( char *  address,
uint32_t  localPort,
uint32_t  remotePort 
)

Sending the command settings necessary to UDP connection

Parameters
addressRemote IP address.
localPortLocal port number.
remotePortRemote port number connection.
Returns
Returns whether the configuration was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

char* Wifly_UDPReceive ( char *  address,
uint32_t  localPort,
uint32_t  remotePort,
const char *restrict  command,
  ... 
)

Send a UDP command and receive the server response.

Parameters
addressremote IP address.
localPortlocal port number.
remotePortremote port number connection.
commandCommand string to send.
Returns
String response.

Definition at line 955 of file WiFly.c.

References PrintF_delayMs(), TRUE, UDP_DELAY, Wifly_UDPConfig(), WIFLYBUFSIZE, and xMutexWifly.

Referenced by Udp_receiveValue().

Here is the call graph for this function:

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.

Parameters
addressRemote IP address.
localPortLocal port number.
remotePortRemote port number connection.
exRespExpected string response.
commandCommand string to send.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

Definition at line 978 of file WiFly.c.

References FALSE, PrintF_delayMs(), TRUE, UDP_DELAY, Wifly_UDPConfig(), and xMutexWifly.

Referenced by Udp_sendValue().

Here is the call graph for this function:

uint8_t Wifly_WLANConfigConnect ( uint32_t  AuthMode,
char *  ssid,
char *  passw 
)

Sending the command settings necessary to establish WLAN connection.

Parameters
AuthModeis a decimal that represents the authentication mode.
ssidSSID name.
passwpassword of the SSID connection.
Returns
Returns whether the command was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

uint8_t Wifly_WLANConnect ( uint32_t  AuthMode,
char *  ssid,
char *  passw 
)

Connect to WLAN ssid

Parameters
AuthModeWLAN auth mode
ssidName of WLAN connection
passwWLAN Password
Returns
Returns whether the connection was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function:

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

Parameters
AuthModeWLAN auth mode
ssidName of WLAN connection
passwWLAN Password
pingIPPing address
Returns
Returns whether the connection was successful. SUCCESS = TRUE, ERROR = FALSE.

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().

Here is the call graph for this function: