Can't get Wifly RN-XV into command mode

The documentation simply says to send "$$$" to the wifi module and you will get "cmd" in return telling you that you are in command mode. I'm sending "$$$" via Serial.print() but I am not getting an response. What am I doing wrong?

The documentation says you have to send "$$$" to the module AND wait some time (as far as I remember 250ms) before that and after you've done it. Without that it will not change the mode.

So should I do a delay before sending "$$$" and then another delay before trying to read the response?

So should I do a delay before sending "$$$" and then another delay before trying to read the response?

You may use delay() to wait or some other way but you have to wait without sending anything to the module in this time. You can immediately try to read after sending the "$$$" but the module will wait with an answer until the guard time is over. If you send any character during that guard time, it will not see the "$$$" as a mode switch but as normal data.

oric_dan:
Sounds like the hardware setup is all wrong. OP hasn't described how "anything" is hooked up,
but the first guess is he has the RN-XV going to the same pins as the USB port on the Arduino,
so that will never ever work. Too much guessing. I hooked up my RN-XV this morning and
typed "$$$", and got back "OK" right off. Then, I typed "get e", and it displayed the complete
setup.

Sorry, you're right, I should have added more info. I am sure it is a stupid mistake.

The module I am using is Wifly RN-XV. I have it attached to my Arduino Uno R3 on pins 8 and 9 and I am using software serial in the code. I maybe going about this all wrong. But, I am using a delay and then serial.print to send "$$$" I then am using serial.read. Is this completely wrong?

I know I am a noob. My areas of expertise lay elsewhere, but I am more than capable of learning.

oric_dan:
There are a couple more issues here, and let me tell you, EVERYBODY has trouble
with these darn XBee shields. They really don't make it easy, plus many of the early
shields were poorly designed, and could blow your $40 RF modules.

First, which XBee shield are you using? They are many different ones, and all have
some serious muckups involved with using them.

Secondly, since you're doing it by sketch, you might post the code, as people often
make trivial mistakes that are easily rectified. Use the # icon to wrap the code.

Thirdly, I've never had any luck at all with SoftSerial for 2-way comms.

So, loads of gotchas with trying to get this thing to work.

I'm using this: https://www.sparkfun.com/products/10822 with this: http://www.ebay.com/itm/XBee-breakout-board-adapter-to-0-1-DIP-breadboard-/230860861800?ssPageName=ADME:L:OC:US:3160 The actual wifi chip not attached to the breakout board is wifly RN-171.

Below is my code. As you can see I am not sure where to start with this.

#include <SoftwareSerial.h>
SoftwareSerial wifiSerial(8,9);


void setup()
{
  Serial.begin(9600);
  delay(500);
  Serial.print("$$");
}

void loop ()

{
  Serial.read();
}

No, it's powered at 3.3v

I am sure the code is wrong.

I have it attached to my Arduino Uno R3 on pins 8 and 9 and I am using software serial in the code.

Don't use SoftwareSerial with the RN-XV. It's quite picky about the serial timing and the SoftwareSerial cannot fulfill the needs of the RN-XV. I never got it running using SoftwareSerial but it runs like a charm on the hardware serial.

#include <SoftwareSerial.h>
SoftwareSerial wifiSerial(8,9);


void setup()
{
  Serial.begin(9600);
  delay(500);
  Serial.print("$$");
}

void loop ()

{
  Serial.read();
}

You instantiate a SoftwareSerial instance but you're printing to the hardware serial interface and read from there.

From the hardware side mine is connected using an XBee shield (from Iteadstudio) that does the level conversion for the serial pins. Without that level conversion you may have destroyed the RN-XV already, the datasheet specifies "3V3 tolerant" whatever that may mean. In the electrical characteristics the voltage is specified with 3.7V max.

pylon:
Don't use SoftwareSerial with the RN-XV. It's quite picky about the serial timing and the SoftwareSerial cannot fulfill the needs of the RN-XV. I never got it running using SoftwareSerial but it runs like a charm on the hardware serial.

Ah I see.

You instantiate a SoftwareSerial instance but you're printing to the hardware serial interface and read from there.

From the hardware side mine is connected using an XBee shield (from Iteadstudio) that does the level conversion for the serial pins. Without that level conversion you may have destroyed the RN-XV already, the datasheet specifies "3V3 tolerant" whatever that may mean. In the electrical characteristics the voltage is specified with 3.7V max.

Ah, I see my mistake now. What voltage does the Uno digital write at? I thought it was around 3.3v?

And since I have not been writing to the digital pins this whole time my device appears to be fine.

And thank you!

What voltage does the Uno digital write at? I thought it was around 3.3v?

What does you multimeter tell you? Why would you expect a 5V device to output 3.3V on the digital pins?

Sketch Arduino for Wifly RN-XV modem configuration without Wifly library and
with front-end: https://dl.dropboxusercontent.com/u/101922388/WiflySanUSB.zip

DON'T CROSS-POST! Especially not if you're advertising, even if you advertise your own sketch.