IPv6 - Set up IPv6 Server/Client over UDP
Materials
- AmebaD [ AMB23 / AMB21 / AMB22 / BW16 / AW-CU488 Thing Plus ] x 2
Example
Introduction
This example shows how Ameba can communicate on the local network using Internet Protocol version 6 over UDP.
Note that this example only works after you have set up the server and then configure the client accordingly.
Procedure
Step 1. IPv6UDPServer
Open the example, “Files” -> “Examples” -> “WiFi” -> “IPv6UDPServer”.
In the sample code, modify the highlighted section to enter the information required (ssid, password) to connect to your WiFi network.
Next, upload the code and press the reset button on Ameba once the upload is finished.
Open Serial Monitor and copy the IPv6 address of the Server (the highlighted area) for later use,
Step 2. IPv6UDPClient
Now take the second Ameba D and open another example, “Files” -> “Examples” -> “WiFi” -> “IPv6UDPClient”.
In the sample code, modify the highlighted section to enter the information required (ssid, password) to connect to your WiFi network.
From the previous step, we have obtained the Server’s IPv6 address, now we copy the server’s IPv6 address to “IPv6UDPClient” example in the highlighted area below,
Next, upload the code and press the reset button on Ameba once the upload is finished.
Open Serial Monitor on the port to the second Ameba D, you should see server and client are sending text message to each other at the same time.