User manual

WiFly GSX/EZX
www.rovingnetworks.com WiFly-RN-UM 11/9/2011
809 University Avenue Los Gatos, CA 95032 Tel (408) 395-6539 info@RovingNetworks.com
~ 57 ~
13.1. Built-in HTML Client Modes
WiFly can be setup to automatically post data to and get data from a web server without any external HOST
CPU. The advanced web features are enabled using the “set option format <mask>” command. This is a bit
mapped register. The functions of the bits are described in the table below:
set option format <mask> Bitmapped value.
The wake reason value is described in the table below:
Value
Wake Reason
0
Not defined
1
Power ON or Hardware Reset (battery install or power up)
2
Sleep (wake up when sleep timer expired)
3
SENSOR
4
Not Defined
5
Button (On the RN-370 serial adapter)
6
Software Reboot
7
Watchdog
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
To append ALL key value pairs to sensor data, the command is set option format 11
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 the following key value pairs to the HTTP message:
&rtc=<time>, &mac=<mac addr>, &bss= <mac addr of AP>,
&bat=<battery voltage>, &io=<GPIO in HEX>, &wake=<wake
reason>, &seq=<sequence number>, where time is real time clock
value in message as 32 bit HEX value in format aabbccddeeff,
sequence number is a rolling counter of how many web posts have
been sent.