+ e v e n t s t a r t u p :2610011025000 ,0 x31000019 , c8 : f d : 1 9 : 0 5 : 5 4 : b4 , 1 . 0 . 0
4.5.5. Connect to an access point
1. In this example an access point with the following settings is used.
SSID : WE_calypso
Security method : WPA2_PSK
Key : calypsowlan
2. Type in the following command into the terminal to connect to the access point.
AT+ wlanconnect =WE_calypso , ,WPA_WPA2, calypsowlan , , ,
OK
+ eventwlan : connect , WE_calypso , 0 x24 : 0 x f 5 : 0 xa2 : 0 x28 : 0 x97 : 0 x21
+ eventnetapp : i p v 4 _ a c q u i r e d , 1 9 2 . 1 6 8 . 1 . 1 6 8 , 1 9 2 . 1 6 8 . 1 . 1 , 1 9 2 . 1 6 8 . 1 . 1
3. The above log indicate a successful WLAN connect and subsequent IP acquisition.
The WLAN connection process typically takes a few seconds to complete.
4. Repeat the process for module B and note the two different IP addresses assigned to
the modules.
In the current example, the modules have the following addresses,
Module
MAC Address
IP Address
Role
A
0xc8:0xfd:0x19:0x05:0x54:0xb4
192.168.1.168
TCP server
B
0xc8:0xfd:0x19:0x05:0x74:0x98
192.168.1.140
TCP client
Table 12: Quick start addresses and roles
The MAC addresses are unique to every module and the IP address is as set
by the DHCP server at the access point.
4.5.6. Creating a TCP server
The next step is to create a TCP server on module A.
1. Create a TCP socket using the following command. The modules returns a socket ID.
AT+ s o c k e t =INET ,STREAM, TCP
+ s o c k e t : 0
OK
2. Bind the TCP socket with the corresponding ID to the module IP and port:8888.
AT+ b i n d =0 , INET , 8 8 8 8 , 1 9 2 . 1 6 8 . 1 . 1 6 8
OK
Calypso reference manual version 1.2
© April 2019
www.we-online.com/wireless-connectivity
24