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
describes the basics of BSD sockets and figure
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
the next step in the process is to connect both the EV boards to the AP as described in
section
. 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+ s o c k e t =INET ,DGRAM,UDP
+ s o c k e t : 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+ b i n d =0 , INET , 8 8 8 8 , 1 9 2 . 1 6 8 . 1 . 1 6 9
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 , 8 8 8 8 , 1 9 2 . 1 6 8 . 1 . 1 6 9 , 0 , 3 2 , 3 U0fRSk9UaYx00ABvhPU1vBH7tgnGIqW
OK
5. To receive the data packets, use the
AT+recvfrom
command as shown below
AT+recvFrom =0 , INET , 8 8 8 8 , 1 9 2 . 1 6 8 . 1 . 1 4 0 , 0 , 3 2
OK
+recvFrom : 0 , 0 , 3 2 , 3 U0fRSk9UaYx00ABvhPU1vBH7tgnGIqW
OK
Calypso reference manual version 1.2
© April 2019
www.we-online.com/wireless-connectivity
80