Reference Manual

Table Of Contents
+ f i l e g e t f i l e l i s t : /www/ images / icon / menu. png ,3656 ,2
+ f i l e g e t f i l e l i s t : /www/ images / icon / w irel e ss . png ,3656 ,2
+ f i l e g e t f i l e l i s t : /www/ ota . html ,11848 ,6
+ f i l e g e t f i l e l i s t : /www/ s et ti n g s . html ,11848 ,6
. . .
OK
To load a file onto the radio module a new file has to be generated on the radio module by
using the
AT+FileOpen
command. In this command, the file name has to be defined, as well
as the maximum file size and the options (create and write in this case) of the file.
AT+FileOpen =/www/ mytest . html ,WRITE|CREATE,3656
+ fi l eo pe n :1966156880 ,0
OK
It returns a file descriptor (1966156880 in this example) that has to be used in the following
actions.
To load the mentioned html file onto the module the
AT+FileWrite
command can be used,
that is prepended by the file descriptor, the data length and the file data itself.
AT+F il eW ri t e =1966156880 ,0 ,0,104 , < html ><head>< t i t l e >Simple web page </ t i t l e > </head
><body><div >This i s a simple webpage </ div > </body ></ html >
+ f i l e w r i t e :104
OK
After the transmission of the data to the radio module has been finished the file access must
be closed by an
AT+FileClose
command.
AT+FileClo s e =1966156880, ,
OK
More complex websites can be analogously put to the secure file system. Sim-
ply, several files have to be loaded to the module before accessing the web
page for the first time.
The following sub chapters demonstrate how to access the web page that has be stored on
the module.
10.5.2. Accessing the web site in station mode
Before accessing the new web page, we need to start the HTTP server:
AT+NetAppStart=HTTP_SERVER
OK
Then connect the radio module and your PC to the same network and call the new web page
under the module’s IP using a browser. In this example its "192.168.1.104/mytest.html":
Calypso reference manual version 1.2 © April 2019
www.we-online.com/wireless-connectivity 86