Go Down

Topic: Can't get Wifly RN-XV into command mode (Read 1 time) previous topic - next topic

mikejonesab1



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.

Code: [Select]


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


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

void loop ()

{
  Serial.read();
}
 

mikejonesab1

No, it's powered at 3.3v

I am sure the code is wrong.

pylon

Quote
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.

Code: [Select]
#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.

mikejonesab1



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.

Quote


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!

PaulS

Quote
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?

Go Up