Restart the network processor.
AT+ s t o p =0
AT+ s t a r t
And scan for P2P devices.
AT+wlanscan =0 ,5
As soon as a P2P device has been found, the connection is setup. In case of the group
owner, the output is as follows.
+ eventwlan : p2p_devfound , calypso , 0 x98 : 0 x84 : 0 xe3 : 0 x f 6 : 0 x8c : 0 x1 ,
+ eventwlan : p2p_request , calypso , 0 x98 : 0 x84 : 0 xe3 : 0 x f 6 : 0 x8c : 0 x1 , pbc
+ eventwlan : p 2 p _ c l i e n t _ a d d e d , 0 x98 : 0 x84 : 0 xe3 : 0 x f 6 : 0 x8c : 0 x1 , calypso , DIRECT
−
GJ
+ eventnetapp : dhcpv4_leased , 1 0 . 1 2 3 . 4 5 . 2 , 8 6 4 0 0 , 0 x98 : 0 x84 : 0 xe3 : 0 x f 6 : 0 x8c : 0 x1
In case of the client, the output is as follows.
+ eventwlan : p2p_devfound , calypso , 0 xc8 : 0 x f d : 0 x19 : 0 x5 : 0 x5e : 0 x e f ,
+ eventwlan : p2p_request , calypso , 0 xc8 : 0 x f d : 0 x19 : 0 x5 : 0 x5e : 0 x e f , pbc
+ eventwlan : p2p_connect , DIRECT
−
GJ, 0 xc8 : 0 x f d : 0 x19 : 0 x5 : 0 x5e : 0 x e f , c a l y p s o
+ eventnetapp : i p v 4 _ a c q u i r e d , 1 0 . 1 2 3 . 4 5 . 2 , 1 0 . 1 2 3 . 4 5 . 1 , 1 0 . 1 2 3 . 4 5 . 1
Now a socket can be created to transmit/receive data. Please refer to the chapters
and
to do so.
After data has been transmitted/received, the connection can be closed again.
AT+ w l a n d i s c o n n e c t
10.4.3. Manual connection setup
This chapter describes how to set-up a P2P connection between two Calypso radio mod-
ules. The goal is to establish a connection to the client (module B) initiated by the group
owner (module A).
First of all, the P2P settings of module A has to be configured. Here we use the follow-
ing settings: Furthermore we configure the role as "group owner" and negotiation request
strategy as "active".
AT+ w l a n p o l i c y s e t =P2P , group_owner , a c t i v e
Set the device to P2P mode.
AT+wlansetmode=P2P
Restart the network processor.
AT+ s t o p =0
AT+ s t a r t
Repeat the previous steps with module B. Use here "client" and "passive" in the
AT+wlanpolicyset
command.
AT+ w l a n p o l i c y s e t =P2P , c l i e n t , p a s s i v e
After both devices have been configured and the network processor has been restarted,
start the scan for P2P devices.
AT+wlanscan =0 ,5
As soon as a P2P device has been found, the following message occurs.
Calypso reference manual version 1.2
© April 2019
www.we-online.com/wireless-connectivity
84