19 #define TCP_SEND "SET VALUE=%d\r\n"
20 #define TCP_RECEIVE "GET RANDOM VALUE\r\n"
21 #define TCP_SET_RESPONSE "SET OK"
22 #define TCP_GET_RESPONSE "GET OK"
30 static uint32_t TcpAuthMode;
41 uint8_t
Tcp_start(
char *ssid, uint32_t AuthMode,
char *passw)
49 xSemaphoreTakeRecursive(
xMutexTcp, portMAX_DELAY );
52 TcpAuthMode =AuthMode;
60 uint8_t
Tcp_sendValue(
char *ipAddress, uint32_t remotePort, uint32_t value)
65 xSemaphoreTakeRecursive(
xMutexTcp, portMAX_DELAY );
85 xSemaphoreTakeRecursive(
xMutexTcp, portMAX_DELAY );
91 resp=strstr(resp,
"VALUE=") + strlen(
"VALUE=");
92 value = strtol(resp , &resp, 10);
xSemaphoreHandle xMutexTcp
uint8_t Wifly_WLANConnectPing(uint32_t AuthMode, char *ssid, char *passw, char *pingIP)
uint8_t Tcp_start(char *ssid, uint32_t AuthMode, char *passw)
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,...)
int32_t Tcp_receiveValue(char *address, uint32_t remotePort)
uint8_t Tcp_sendValue(char *ipAddress, uint32_t remotePort, uint32_t value)