User's Manual
WiFly GSX
www.rovingnetworks.com WiFlyRN171-um 2/23/2011
809 University Avenue • Los Gatos, CA 95032 •Tel (408) 395-6539 •info@RovingNetworks.com
~50~
Example#2: Posting UART data to web server
The WiFly module is capable of auto posting serial UART data in ASCII or Binary format. In this example
we will configure the WiFly module such that when the serial UART data comes in, the WiFly will connect
and automatically send data to the web server in the following format:
GET /mike.php?ID=<user serial data> \n\n
The other parameters that need to be set are described below:
setdns name www.rovingnetworks.com //set up the URL of the server
setip host 0 //instructs RN-370 to use DNS address of host server
setip remote 80 //standard web server port
setip proto 18 //enable HTTP and TCP protocols
set com remote GET$/mike.php?ID= //set up the string
set sys auto 10 //auto connect every 10 seconds
setuart mode 2 //automatically connect using data Trigger mode
save //save the configurations in config file
reboot //reboot so that the settings take effect
With the above settings enabled, the WiFly module will connect out to the web server every time it receives
data on the RX line. Serial data is sent to the host web server according to the flush timer and the flush size.
.
NOTE: You cannot append the sampled sensor data to the UART data. Enabling “option format 7”
along with “set uart mode 2” will result in erroneous data being sent.