Reference Manual

Table Of Contents
10. Typical application use cases
In this section some of the typical use cases for the Calypso module are considered and a
simple example is described in each case.
10.1. UDP communication
UDP is a connectionless transport layer protocol used to exchange data between peers in
an IP network. Section
8.4
describes the basics of BSD sockets and figure
8
shows the
work flow for UDP communication.
10.1.1. Prerequisites
The following hardware is required to go through the quick start example.
1. Two Calypso evaluation boards.
2. An IEEE 802.11b/g/n compatible access point working in the 2.4 GHz band.
3. Computer with a serial terminal emulator like Tera Term.
Assuming that the EV boards have the hardware configuration as described in section
4.5.2
,
the next step in the process is to connect both the EV boards to the AP as described in
section
4.5.5
. In this example, the modules have the IP addresses 192.168.1.169 and
192.168.1.140.
10.1.2. UDP socket communication
1. Create a UDP socket using the following command. Note the socket ID returned for
use in future commands (in this case "0").
AT+socket=INET ,DGRAM,UDP
+socket :0
OK
2. Although the bind on a UDP socket is optional, it is essential here to know the desti-
nation port to send to at the peer (in this case port 8888). A bind can be done using
the following command. Where "0" is the socket ID from the socket creation command
above.
AT+bind =0 ,INET ,8888 ,192.168.1.169
OK
3. Repeat the above steps on the second module.
4. Use the
AT+sendTo
commands with destination port and address to send data packets.
AT+sendTo=0 ,INET ,8888 ,192.168.1.169 ,0 ,32 ,3U0fRSk9UaYx00ABvhPU1vBH7tgnGIqW
OK
5. To receive the data packets, use the
AT+recvfrom
command as shown below
AT+recvFrom =0 ,INET ,8888 ,192.168.1.140 ,0 ,32
OK
+recvFrom :0 ,0 ,32 ,3U0fRSk9UaYx00ABvhPU1vBH7tgnGIqW
OK
Calypso reference manual version 1.2 © April 2019
www.we-online.com/wireless-connectivity 80