This is the stock function that will fetch current IP address of IoTaaP module. We are showing this IP on the OLED to be able to connect to the server.
This line will start TCP server on port 344, we must be connected to the WiFi before this!
iotaap.wifiClient = iotaap.wifiServer.available();
Sistem will wait for the client to connect and then it will serve the client (as you can se in the while() operation)
Testing the code
In order to test the code we have to use TCP Client software or program, we recommend Hercules.This is the most complete terminal software for testing connectivity. But there are a lot of various solutions on the internet for this purpose.
Install Hercules on your PC, and run it, PC and IoTaaP MUST be on the same network! Click on TCP Client tab and enter IoTaaP’s IP address and port 344, click Connect. You will be able to send messages to the IoTaaP TCP server, and IoTaaP TCP server will return your messages back to you. Congrats, you have built your TCP server with IoTaaP!
Post your modifications and examples to our community page.