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
~ 59 ~
13.4. Posting binary data:
Web servers expect ASCII data, so if the User data is binary, WiFly can convert binary data to ASCII
format before sending it to the web server.
Example: using the same settings as above but this time use the
set ip proto 18 // turn on HTTP mode=0x10 + TCP mode = 0x2
set dns name www.webserver.com //name of your webserver
set ip host 0 // so WiFly will use DNS
set ip remote 80 // standard webserver port
set com remote GET$/userprog.php?DATA= // sample server application
set option format 1 //Converts user binafy data in ASCII hex format
If incoming UART data = 6 bytes of binary data with hex values 0x01 0xAB 0x03 0xFF 0x05 0x06
WiFly will send this string to the webserver:
GET /userprog.php?DATA=01AB03FF0506 \n\n
13.5. Auto posting sensor data:
WiFly module can send the value of the GPIO and sensor pins:
The data will come as 18 bytes of ASCII HEX: <2 bytes GPIO><channel 0 thru 7 sensor data>
set ip proto 18 // turn on HTTP mode=0x10 + TCP mode = 0x2
set dns name www.webserver.com //name of your webserver
set ip host 0 // so WiFly will use DNS
set ip remote 80 // standard webserver port
set com remote GET$/userprog.php?DATA= // sample server application
set q sensor 0xff // sets WiFly to sample all 8 sensor channels
set sys auto 30 // automatically make the connection every 30 seconds
set option format 7 // send the header plus the sampled binary data converted to ASCII format
The Resulting string sent to the server will be
GET /userprog.php?DATA=0F3000001111222233334444555566667777\n\n