+ eventwlan : p2p_devfound , calypso , 0 x98 : 0 x84 : 0 xe3 : 0 x f 6 : 0 x8c : 0 x1 ,
To setup a connection to the found P2P device a
AT+wlanconnect
command has to be
placed, including the name of the peer device using the Push Button Configuration (PBC)
for example.
AT+ wlanconnect = calypso , , P2P_PBC , , , ,
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.5. Running a web page on the radio module
The Calypso radio module offers a secure file system to store files in the radio module. In
combination with the HTTP(S) server function, a custom web site can be run on the module.
This chapter describes how to do so by loading a simple html file (see Code
) to the mod-
ule’s flash memory. Furthermore the customization of the web site access is demonstrated
in the subsequent sections.
<
html
>
<
head
>
<
meta
h t t p
−
e q u i v = " Content
−
Type "
content
= " t e x t / h t m l ; c h a r s e t = u t f
−
8" >
<
meta name
= " v i e w p o r t "
content
= " w i d t h = device
−
w i d t h ,
i n i t i a l
−
s c a l e =1 " >
<
t i t l e
>Simple web page< /
t i t l e
>
< /
head
>
<
body
>
T h i s i s a s i m p l e webpage
< /
body
>
< /
html
>
Code 1: Example html code
10.5.1. Load the web page files to the radio module
First of all the
AT+FileGetFileList
can be used to check the file system content of the radio
module.
AT+ F i l e G e t F i l e L i s t
+ f i l e g e t f i l e l i s t : / www/ h e l p . html , 3 6 5 6 , 2
+ f i l e g e t f i l e l i s t : / www/ images / i c o n / h e l p . png , 3 6 5 6 , 2
Calypso reference manual version 1.2
© April 2019
www.we-online.com/wireless-connectivity
85