4. Which is indicated by a +recv event in the client.
+ r e c v : 0 , 0 , 3 2 , YJaZ4yUGKRES7mE5ApBDo0zrFRtq56Jt
OK
5. The client can reply to this message also using the AT+send (with socket ID "0" to
address the server).
AT+send = 0 , 0 , 3 2 , i u w I H S i s 5 x T t t z f f b t f h j t f h 6 7 8 p S H J A
OK
6. Which is indicated by a +recv event in the server with socket ID 1.
+ r e c v : 1 , 0 , 3 2 , i u w I H S i s 5 x T t t z f f b t f h j t f h 6 7 8 p S H J A
OK
7. Close the sockets using the command and corresponding Socket ID.
AT+ c l o s e =0
+ c l o s e : 0
OK
10.4. Wi-Fi direct example
The Wi-Fi direct standard enables peer-to-peer communication between two compatible de-
vices without the need for an infrastructure AP. Wi-Fi direct enabled devices negotiate their
roles and one of them assumes the role of a Group Owner (GO) (equivalent to an AP)
and the other the role of a Client. The discovery of devices is done by sending/listening
broadcasting packets on channels 1, 6 and 11. This section demonstrates the Wi-Fi direct
capabilities of Calypso module by connecting two Calypso EV boards over Wi-Fi direct.
10.4.1. Prerequisites
The following hardware is required to go through this Wi-Fi direct example.
1. Two Calypso evaluation boards.
2. Computer with a serial terminal emulator like Tera Term.
10.4.2. Auto connection setup
First of all, the P2P settings of both devices have to be configured. Here we use the following
settings:
Connect to the first P2P device that is found.
AT+ w l a n p o l i c y s e t = c o n n e c t i o n , P2P ,
The role (client or group owner) and negotiation request strategy (active, passive or random
back-off) can be set as needed. Here we choose for simplicity to negotiate the role (client or
group owner) and send the negotiation request as soon as a P2P device has been found.
AT+ w l a n p o l i c y s e t =P2P , n e g o t i a t e , a c t i v e
Set the device to P2P mode.
AT+wlansetmode=P2P
Calypso reference manual version 1.2
© April 2019
www.we-online.com/wireless-connectivity
83