control the PIC32 eth kits client (leds turn on/off) from server socket.
I have a working code of tcpip tcp client, which is capable of sending a data (text) from PIC32 eth kit to server.
Here PIC32 as a client and Server socket as a server. I had define a IP and port in app.c,
appData.host = "192.168.1.102";
appData.socket = TCPIP_TCP_ClientOpen(IP_ADDRESS_TYPE_IPV4,2000,(IP_MULTI_ADDRESS*)&addr);
after that I had define a text message in
char buffer = "Welcome to the world of innovation where we enable the technologies....."
On server socket I received a message,
server PC@ 192.1468.1.102 is running on port 2000,
connection is established
Welcome to the world of innovation where we enable the technologies
Here I received the text.
PIC32 eth kit is working as a client which is sending a text, I want to use the client for receiving a text from server socket, first, it will send a text and after that it will receive a text from server socket which will turn the leds ON/OFF.
I need your help,
As data is send to server socket, a connection is already established, I want to know that, can I define the port and IP again,
I had define the following cases for tcpip tcp client// sending
case APP_TCPIP_WAITING_FOR_COMMAND: (define the ip and port)
case APP_TCPIP_WAIT_FOR_CONNECTION: (TEXT MESSAGE)
I had define the following cases for tcpip tcp client// receiving
I want to know that can I continue in the same switch(appData.state) or I have to define the another switch,
char App_Message_Buffer[MAX_URL_SIZE] = "START";
char App_Message_Buffer[MAX_URL_SIZE] = "STOP";
i = AppBuffer;
PLIB_PORTS_PinSet( PORTS_ID_0, PORT_CHANNEL_D, led);
PLIB_PORTS_PinClear( PORTS_ID_0, PORT_CHANNEL_D, led);
I want to use this function which will compare the received text and make the leds on/off. I need your help, please help me to implement this