Please take note of the IP for both the devices, currently there are no other way to discover each other.

Now both the devices are connected to the WiFi network. Now we can make them talk each other. In this example we elect one board server and the other client. The client board will start a TCP communication toward the server board. Once connected they will able to exchange messages.

Setup the server

The server first setup the WiFi connection, then creates a socket server on port 1234 for receiving connection from the clients. When a connection is established it will print the messages coming from the client and will close the connection saying “I’m a server! Goodbye.”.

Setup the client

The client, after get ready with the WiFi connection, will try to connect to the server. When the connection is established it will send a “Hello I’m a client!” message and will wait for responses from the server.