10 years, 2 months ago.

Wifly RN-XV connection

Hi,

I am having trouble making an connection using the RN-XV. I am trying to use the code below to display the ip address on tera term, however it never displays it and hence I imagine it is not managing to connect. The hardware pin out is also mentioned.

include the mbed library with this snippet

#include "mbed.h"
#include "WiflyInterface.h"

Serial pc(USBTX, USBRX);

/* wifly object where:            mbed              - RN-XV
*     - p9 and p10 are for the serial communication - p3, p2
*     - p11 is for the reset pin                    - p5
*     - p26 is for the connection status            - p15
*     - "mbed" is the ssid of the network
*     - "password" is the password
*     - WPA is the security
*/
WiflyInterface wifly(p9, p10, p11, p26, "Home", "1234567890", WPA);

int main() {
    printf("IP Address is \n\r");
    wifly.init(); // use DHCP
    while (!wifly.connect()); // join the network
    printf("%s", wifly.getIPAddress());
    wifly.disconnect();
}

I suppose that either there is a mistake in the code or perhaps there is a problem with the security of my router, since its security type is: no authentication, and the encryption type is: WEP, so I am not sure if WPA applies. I have also tried using NONE but no luck. If anyone could point out any mistakes or could even try out the program to see if it is working I would be grateful.

5 Answers

10 years, 2 months ago.

Hi Johann, have you try to connect via serial commands sent to the wifly module in a terminal program to see if the wifly module connect that way?

Greetings

10 years, 2 months ago.

Hi, have you tried changing WPA to NONE when initialising the wifly?

Yes I have. I have even tried another router with no security and then with none and it still wont connect.

posted by Johann Hur 19 Feb 2014

Then I would advise using Ney Palma's suggestion of using the serial port to configure your wifly manualy. In the past I had connections issues similar to yours and I was able to fix it by trying the command manualy. I used the tool suggested by avnish Aggarwal and the wifly datasheet.

posted by christian b 19 Feb 2014
10 years, 2 months ago.

I am having the exact same problems - with 2 different modules.

I have been using this product over a year - a module that worked got lost. Over the past 3 months, I have bought two - and they fail in the same way as you. I cannot connect to my unsecure wifi.

BTW - I did find at one time if you use the built in small black antenna, it should be vertical. It gets shipped lying down and that seems to make it pick up noise.

I am ready to call it quits with this product unless someone at ARM can get to the bottom of this. I am not aware of a competitive product.

Avnish Aggarwal

A tool (not sure where I got it) that gets you connected to WIFLY in command mode. This one fails too with some cryptic error messgae from the fw.

http://mbed.org/users/avnisha/code/TOOLS-Wifly_configure/

The one i bought is like this, https://www.sparkfun.com/products/11048 , with a u.fl connector, however for some reason I was under the impression that it does not need an antenna, am I wrong about this?

posted by Johann Hur 19 Feb 2014
Johann Hur
poster
10 years, 1 month ago.

Tried configuring the module to use WEP but I got an error when ever I tried telling it the password. Have since changed the router security to WPA and got the antenna for it and it works fine now. Thanks for the feedback

10 years, 1 month ago.

I've been using a couple of these for a while, successfully. I do use WPA, and have not tried other security configurations.

Resources you may have already reviewed:

The biggest challenge I have had is trying to make it 100% robust. I have typically implemented a fairly simple Watchdog, in case I lose communications with the Wifly module I can force a reset.