M6E Nano with Redboard and ESP8266 wifi shield

I am not sure what you try to do in this ClientDemo(). The connection as as a station/client. I would expect you try to write the found EPC number to a server. After sending the GET command, you are reading/printing the response. Not sure what you are getting and what is printed as that is depending on the server code, BUT after sending the response by the server the instruction as part of GET : Connection: close(d) will close the connection once all has been sent (if anything). The next step is to check whether it is closed…and then close the connection on the client. However that connection is not opened again for later communication as part of the loop() and it’s subroutines. The connection is only established as part of setup. So you should not include the instruction Connection: close(d) and do not check on close, OR re-establish the connection each time. I would opt for the first option…do NOT close…