RN-XV working only intermittently

I’m using the RN-XV connected to an Arduino mini-pro using a library to communicate with it. There is an intermittent problem connecting with wifi. it works only about 1 out of 4 times.

I’ve updated to the latest RN-XV firmware (2.38) and tried two different libraries, both fail intermittently:

https://github.com/sparkfun/WiFly-Shield

http://sourceforge.net/projects/arduinowifly/

Here’s a log of what I’m getting when it fails (using arduinowifly library)

<2.38>WiFly Ver 2.38, 12-11-2012 on RN-171

<2.38>Cmd:show conn

<2.38>8603

<2.38>Starting WebClientGetPost…WiFlySerial v1.08 RAM:686

MAC: Cmd: get mac

<2.38>Mac Addr=00:06:66:80:4d:9f

<2.38>00:06:66:80:4d:9f

Cmd:set u m 0x1

<2.38>AOKAOKAOK

<2.38>Cmd:set ip dhcp 3

<2.38>AOK

<2.38>Cmd:set comm remote 02.38>AOKAOKAOK

<2.38>Leaving current wifi …Cmd:leave

<2.38><2.38><2.38><2.38>

0

Cmd: set w p 12345678

<2.38>AOK

<2.38>Credentials Set, Joining foxtango

Cmd: set wlan s foxtango

<2.38>AOK

<2.38>Cmd:join foxtango

<2.38>Auto-Assoc foxtango chan=6 mode=WPA2 SCAN OK

Joining fo.WiFly Ver 2.38, 12-11-2012 on RN-171

MAC Addr=00:06:66:80:4d:9f

Auto-Assoc roving1 chan=6 mode=NONE FAILED

READY

Auto-Assoc roving1 chan=6 mode=NONE FAILED

Auto-Assoc roving1 chan=6 mode=NONE FAILED

Auto-Assoc roving1 chan=6 mode=NONE FAILED

Auto-Assoc roving1 chan=6 mode=NONE FAILED

Generally, in testing here when I have seen that issue, it is due to one of a few things. First, make sure you have a good, clean power supply running your module. Also, what antenna type does your module have? It may simply not have enough range to get a good, clean connection to the network.

Another thing to keep in mind is that you may be experiencing interference from other devices in the area as well. See if checkin any of these things could be part of the issue.