So here is the problem:
With xbee wifi module under transparent mode, the DIO12 can be set up to indicate TCP link status. This is no problem. But the problem is when a short server response is received, the TCP link status is turned on and then off before the first character even shows up on the serial port.
My mechanism is to send data to server then sit and wait for server to respond by looking at TCP link status and serial port available data. If both are false, I skip out of wait loop and consider server has finished. When the server only responds short messages, the TCP link status is turned off by xbee before the first character is completely transmitted via serial port, resulting in a false test.
My request is to add a “wait until first character is sent over serial to turn off TCP link status”. Thanks.