Go Down

Topic: RN-XV Wifly with Wireless SD Shield - Can't Connect (Read 2345 times) previous topic - next topic

gohn67

Feb 16, 2013, 12:55 am Last Edit: Feb 16, 2013, 12:59 am by gohn67 Reason: 1
I've read nearly all of the posts on WiFly issues on this forum and have searched extensively on Google, but I am still having trouble with mine. It doesn't help that I'm new to hardware and electronics. I mostly do software.

Here is my current hardware setup:

1. Arduino UNO with Arduino IDE 1.03
2. Wireless SD Shield
3. RN-XV WiFly Rev 3 (RN-171) (Not sure what the firmware version is. I read that 2.20 or less can have trouble entering command mode if not associated)

My main goal at this point is to verify that my WiFly is not bricked.

I have tried connecting to the WiFly directly using the USB switch on the Wireless SD shield, but when connect with CoolTerm and send "$$$", I get no response. On the Wireless SD Shield, I see the RX led flash quickly. But the yellow WiFly led (D2) never lights up. So I'm assuming the command is not reaching the WiFly.

My WiFly only does rapid red led blinks and looks to be doing slow green led blinks.

- Rapid red means that the WiFly is "Not Associated"
- Slow green means that the WiFly is "IP Address OK"

I'm not sure what this combination means?

Additionally, the "PWR" led on the Wireless SD Shield does not light up. Does this mean something is wrong with the Wireless SD Shield? I have seen some tutorials were this led is on.

Also I want to use Hardware Serial and not Software Serial.


I have also tried connect via telnet using the defaults: IP 169.254.1.1 and port 2000. That didn't work, but I think is expected.

I am tempted to do a Factory Reset, but I'm not sure to do it since I can't enter cmd mode.

-----

I've tried the WiFly and WiFlyHQ libraries, but have had no success. Both libraries cannot reach the cmd prompt. They send "$$$," but get no response.

----

Thanks for the help.

oric_dan

You didn't say which Wireless SD Shield you are using. They're all a little different.

Also, there is always a connection problem with UNO boards and XBee shields. Mainly,
since the atmega328 has only 1 h.w. UART, they normally use the Rx,Tx pins 0,1 for
both USB development, and then set the switch or jumpers to use the UART with
the wireless module. You cannot do both at the same time, as USB and XBee will
conflict.

To talk to the XBee/wifly module directly over the USB port from the PC, you have to
pull the 328 chip or else hold it in reset, and then "swap" the Rx,Tx wires going to the RF
module. Not all wireless shields allow this.


gohn67

Thanks for the response oric_dan. You've given me some new ideas to look into. I definitely think this issue has something to do with the shield and not the WiFly now.

Sorry about not being more specific on the Wireless SD Shield. I'm using the one made by Arduino (http://arduino.cc/en/Main/ArduinoWirelessShield).

I have a few clarification questions.

1. On the page I linked above, it says that if I move the switch to "USB" with an empty sketch, I will be able to bypass the microcontroller. Is this not possible with UNO unless I do what you specified?

Yesterday I was able to access the WiFly in AdHoc mode and set it up with my network*, so connecting to my WiFly directly is less of an issue now. But I'm still confused on why it is not working.

2. Do you know if the "pwr" led is supposed to light up on this shield. In this tutorial using the Arduino Wireless SD Shield and an XBee (http://www.instructables.com/id/Arduino-Wireless-SD-Shield-Tutorial/step4/Program-the-receiver/), the "pwr" led is clearly on.

Is the "pwr" led for the shield or the Xbee?

3. Am I supposed to be able to upload a sketch with the switch in "MICRO" mode? In the product description, it says that uploading a sketch in MICRO mode is not possible. I am going to verify this again, but I'm pretty sure I was able to upload sketches in MICRO mode.

4. What do the the RX and TX leds on the Arduino Wireless SD Shield mean? Is it saying the board has received input? Or is it saying the WiFly has received input? If it is the latter, why do I not see the yellow led on the WiFly light up?


Thanks.


*Just for future visitors with this setup, I was able to able to get into AdHoc mode using the following steps.

- Start by plugging in a M/M jumper in 3.3V and holding the other end against pin 8 (GPIO9). This makes pin 8, HIGH. I believe the 3.3V on the Arduino is regulated, so I'm assuming this should be fine. Someone correct me if doing this is actually a bad idea.
-Then I powered on the module. This made all three (green, yellow, red) leds blink wildly.
- In about 10-15 seconds, the WiFly-GSX-XX network will show up in your list of available networks. Select it and wait a few seconds.
- You should be able to remove the jumper now.
- Sometimes the connection does not stick and you will have to try again.
- To test if you have a connection, ping 169.254.1.1. Sometimes you need to ping it a few times before the connection actually works.
- If you are able to ping the ip, you can telnet 169.254.1.1 2000.
- From there, I used this blog post as a guide. http://www.tinkerfailure.com/2012/02/setting-up-the-wifly-rn-xv/

oric_dan

#3
Feb 18, 2013, 01:11 am Last Edit: Feb 18, 2013, 01:13 am by oric_dan Reason: 1
Darn, this is one of those shields that I never could understand the logic of its design, sigh.

The good thing is, with the switch in USB position, the XBee module can talk to the PC over
the USB port if you remove the 328 chip, or simply hold it in reset [jumper Power header
Reset pin to gnd].

The bad thing is, Dout of the XBee is *always* wired to either RX or TX of the 328 chip, and
its normally feeding out 3.3V. Therefore, if the switch is set wrong [ie, to USB position and
the 328 is *not* held in reset], then 5V out of TX is directly tied to 3.3V out of Dout, and this
can blow the XBee module [I'm pretty sure]. The standard XBee module pins are not 5V tolerant,
and same with RN-XV.

I just don't understand why people design things this way, double-sigh.

The first thing I would do is cut the trace from the Dout pin and install a 1K resistor in series
there to protect the RF module.

Also, the schematic shows the PWR led goes to XBEE_ON, but I cannot find that callout
anywheres on the schematic. ???? Triple-sigh.

gohn67

#4
Feb 18, 2013, 11:06 am Last Edit: Feb 18, 2013, 11:07 am by gohn67 Reason: 1
Hmm, your response makes me think my WiFly or Wireless shield is defective. Maybe both. I definitely made the mistake of forgetting to switch USB/Micro modes and leaving the WiFly attached to the shield, especially early on.

I also tried using SoftwareSerial, but it didn't work for me.

How can I tell if I messed up my WiFly? Is this is a case of if it breaks, everything goes? Or is it possible that the RX/TX pins are defective? I am able to connect via telnet and I am getting power even though the pwr led is not on.

Or alternatively how I can tell if I messed up my shield? It doesn't seem to be operating as described on the product page.

I'm probably going to get a new shield at this point. Do you have any suggestions? I'm looking at the two options listed here (https://github.com/harlequin-tech/WiFlyHQ/wiki). But I am weary.

Thanks.

oric_dan


Hmm, your response makes me think my WiFly or Wireless shield is defective. Maybe both. I definitely made the mistake of forgetting to switch USB/Micro modes and leaving the WiFly attached to the shield, especially early on.

Personally, I think there should be a Surgeon General's warning on shields designed like this, but
I imagine the designers didn't take every eventuality into account, and probably didn't even
understand the gotcha. I've seen so many bad shield designs now, that I double check their
schematics for everything.

I've also never had any luck using SoftSerial myself. I ended up designing my own pcb with an
ATmega1284 chip, that has 2 h.w. UARTs, to get around those issues.

I doubt you've messed up the shield itself. You can check if the RN-XV works by simply doing
what I mentioned last time. Simply remove the 328 chip for good measure, and set shield
switch to USB. Then use a terminal emulator to talk to the RN-XV via the Arduino bd USB port.
You have to find the default settings, assuming you didn't change them - eg, 9600 baud, 8N1.

Also, I would *not* use the Arduino IDE Serial Monitor, as you have to press CR/Enter before
it will send any data. Use Hyperterminal, or "anything" else.

Try that first.

Quote
I also tried using SoftwareSerial, but it didn't work for me.

How can I tell if I messed up my WiFly? Is this is a case of if it breaks, everything goes? Or is it possible that the RX/TX pins are defective? I am able to connect via telnet and I am getting power even though the pwr led is not on.

Or alternatively how I can tell if I messed up my shield? It doesn't seem to be operating as described on the product page.

I'm probably going to get a new shield at this point. Do you have any suggestions? I'm looking at the two options listed here (https://github.com/harlequin-tech/WiFlyHQ/wiki). But I am weary.

Thanks.

gohn67

Ok, thanks. I understand what you mean now. I didn't realize that the R3 had a removable 328. I will give that a try when I get home.

gohn67

I removed the 328 and used CoolTerm for Mac. I got nothing at all. So I guess I broke the WiFly.

Oh well. At least I know why nothing I tried was working. Another lesson learned.

hb5fa

Have you seen this link below?

http://cairohackerspace.blogspot.com/2011/05/beginners-guide-to-connecting-and.html


Go Up