WiFly GSX
www.rovingnetworks.com
WiFlyGSX-um 9/16/2010
809 University Avenue
•
Los Gatos, CA 95032
•
Tel (408) 395-6539
•
~ 46 ~
set option format <value>
Bitmapped value.
Example:
To automatically send HTML data header, the command is
set option format 1
To append sensor data in ASCII hex format, the command is
set option format 7
13.2.
Automatically periodically connect to web server
WiFly module can be setup to automatically post data to a web server. The auto connect feature is enabled
by the
set sys auto <seconds>
command. For example, the WiFly module can be configured to connect to
the web server every 10 seconds by using the
set sys auto 10.
The example below illustrates the commands to configure WiFly for connecting to the web server every 30
seconds.
set com remote GET$/ob.php?obvar=WEATHER
// setup the string
set sys auto 30
// auto connect every 30 seconds.
set option format 1
// auto send the header once connection is open
set ip proto 18
// turn on HTTP mode=0x10 + TCP mode = 0x2
NOTE1:
when HTTP mode is set, the WiFly automatically appends the \n\n to the end of the packet.
NOTE2:
if the html header contains spaces, the $ is required when entering the string. Space is the
command delimiter. When WiFly command parser sees $ it will convert this to a SPACE character.
13.3.
Automatically connect to web server on uart data
WiFly GSX supports a mode in which it can connect to the web server when it receives uart data. In this
mode, connection to the web server will be triggered on uart data.
Bit of Format reg
Function
0
Automatically send HTML data header based on broadcast interval.
1
Send users BINARY data (converted to ASCII hex )
2
Sample the GPIO and AtoD pins and format to ASCII hex
3
Appends
&id= < value>
, where
value
is the device ID string set with
set opt device <string>
4
Appends
&rtc=<time>
, where
time
is real time clock value in
message as 32 bit HEX value in format aabbccddeeff