I’m trying to configure a WiFly (RN-XV) to wake up every 10 minutes, connect to my WLAN, report values from 2 analog inputs to my server and go back to sleep. I’ve read in the data sheets for similar products, such as the RN-131 that they are capable of performing these operations in less than 100ms (http://www.microchip.com/wwwproducts/De … e=en558369). I can’t get mine to perform them in less than about 17 seconds. The RN-XV is based on a different chip (the RN-171), but I would still assume the performance would be similar, or at least within an order of magnitude.
In my testing, the WiFly sleeps for the correct amount of time. Once it wakes up, the green LED comes on and the serial output almost immediately shows:
MAC Addr=00:06:66:72:44:0b
Auto-Assoc chan=1 mode=WPA2 SCAN OK
Joining now…
READY
Disconn from ,2:8
Auto-Assoc chan=1 mode=WPA2 SCAN OK
Joining now…
Associated!
Using Static IP
Listen on 2000
OPEN
After it connects, it waits about 10 seconds, then the amber LED blinks once or twice (this is when my Apache log first shows activity). Then the serial output shows
HTTP/1.1 200 OK
Date: Thu, 24 Jan 2013 01:23:01 GMT
Server: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4
X-Powered-By: PHP/5.4.4
Content-Length: 3
Connection: close
Content-Type: text/html
CLOS
all at once. After sending data, it stays awake for another, about, 7 seconds with the green LED blinking at about 1Hz, but no other apparent activity before going back to sleep.
I have tried reducing the duration of the idle timer (the time with no transmit or receive activity before the connection is closed), but when I have it much less than it is now, the WiFly disconnects and goes to sleep before it sends data to the server.
My current WiFly settings are:
wlan phrase xxxx
wlan ssid
ip address 192.168.1.30
ip dhcp 0
ip host 192.168.1.29
ip remote 8888
ip proto 18
com remote GET$/thepage2.php?DATA=
q sensor 0x0C
option format 7
sys autoconn 1
com idle 10
sys sleep 10
wan rate 3
wan tx 6
The WiFly is connecting to a Netgear 802.11 b/g/n access point (WN802T) using WPA2 then to my local Apache server running on an iMac.
I have read the RN-XV manual over and over, searched online for hours with no resolution found. I can’t figure out why the WiFly is waiting so long after it connects to send data, then so long to go back to sleep. Can anyone point me in the right direction to have my WiFly awake for a shorter duration?