WiFly RN-XV Reliability Issues

I've been wrestling with the RN-XV and the WiFlyHQ library. I can only assume I am doing something wrong but not sure what I could be missing.

I'm using an Arduino UNO, and a WiFly RN-XV (2.32). I have multiple boards of each to rule out any random hardware issue. First I tried the sample HTTP Server Sketch that comes with the WiFly HQ library but it would periodically not respond. I then tried the TCP Client Sketch and after about 20 seconds I would get a message that the WiFly crashed and needed to be restarted.

Finally, I tried writing my own sketch using UDP. I can send packets back and forth between the Arduino and an Xcode project on my Mac, but while TCPDump shows the packet going out of the Mac's network interface, the WiFly seems to receive a garbled packet many more times than a correct one.

So I've put in my on error recovery to resend "bad" UDP packets, and I've gotten it to work but the result is extremely slow because so many packets seem to be bad.

And yes, I'm using an modern, up-to-date Airport Extreme WiFi Network.

I have my WiFly connected to my Arduino using the Wireless SD Shield. I cut off pins 1&2 on the SD shield and ran jumpers to Pins 6&7. I'm using SoftwareSerial to communicate to the WiFly on pins 6&7 at 9600 baud.

I just have to assume I'm doing something really wrong.....as the HTTP Server Sketch was spotty at best and the TCP Client Sketch crashed repeatedly after about 20 seconds, and my custom UDP sketch works but once again it only does so because I wrote my own packet-resending routine and error check that handles the fact that most packets don't arrive as expected.

Any help or advice would be appreciated.

I cut off pins 1&2 on the SD shield and ran jumpers to Pins 6&7.

I hope you meant pins 0 and 1.

I had similar problems with my RN-XV. They went away when I swapped the serial connections (RN-XV to hardware serial, debugging to SoftwareSerial). I don't know the exact reason for this, seems like the RN-XV is a bit picky about serial timings because since it's running on the hardware serial it's doing like a charm.

Hi! Thanks. I was wondering about that. I realize this is probably a silly question, but how to do move the debugging over to Software Serial? I did a quick google search and it seemed that you have to buy some sort of special cable to do it. Is there a recommend way to do this??? Thanks in advance.

pylon: I had similar problems with my RN-XV. They went away when I swapped the serial connections (RN-XV to hardware serial, debugging to SoftwareSerial). I don't know the exact reason for this, seems like the RN-XV is a bit picky about serial timings because since it's running on the hardware serial it's doing like a charm.

You were right! I haven't figured out how to use SoftwareSerial for debugging yet (?) but to test your theory I used a Mega board in place of the Uno and sure enough when the WiFly is on hardware serial it works perfectly!

pylon: I had similar problems with my RN-XV. They went away when I swapped the serial connections (RN-XV to hardware serial, debugging to SoftwareSerial). I don't know the exact reason for this, seems like the RN-XV is a bit picky about serial timings because since it's running on the hardware serial it's doing like a charm.

I use a USB2Serial Light adapter (an original Arduino board) but you could use any of the available adapters that gives you a TTL level serial interface on a USB port (Foca, USB Bee, FTDI cable to name just a few). Just connect it to RX/TX and GND and you have serial connection. The SoftwareSerial does fine for debugging but bad for the RN-XV.