User manual
009
}
In the Arduino program, the function configUDP() is particularly decisive for the
communication path. The settings important for transmission are made there. First,
use CIPMODE to set the data transparency mode to 0. Finally, use CIPMUX=0 to
set that only one single connection is permitted. The decisive command is CIP-
START. It is used to establish a commutation, specifically to IP 192.168.4.2, i.e. to
your PC, and to PORT 90, where the program Packet Sender is listening with its
UDP-server. These are the steps that are initially necessary to establish the first
communication.
2.2 | Sending and receiving data with UDP
In the preceding project, the UDP communication was tested in one direction, i.e.
from the board to the PC. In this program, the module is set so that communication
in the other direction is possible as well, almost like in a chat.
The program
This program generally only contains a very small change that has a great effect
on the communication with the UDP protocol. When you upload the program, an-
other access point with which you can connect to a PC is generated. Again, you
will need Packet Sender or a comparable program. Start the program and make
the same settings as before (File -> Settings -> Network: Enable UDP Server, Port
90). Then you need to enter the address of the module in the main window in the
IP Address field (192.168.4.1), set the Port to 91 and select the item UDP in the
dropdown menu farther to the right. When these settings have been made and the
serial monitor has been opened, you can send the first message to the module by
entering, e.g., Hi in the field labelled ASCII.
If you click Send now, the Serial Monitor will show:
001
+IPD,2:Hi
002
OK