WiFly doesn't connect to WAP 2

Hello, I’ve got a problem…

I use the WiFly Shield with an Arduino Uno.

I can connect to my wireless network using the SpiUartTerminal only if the network is open. But if I use WPA 2 encryption it doesn’t connect.

if I try it, I get this:

SPI UART on WiFly Shield terminal tool
--------------------------------------

This is a tool to help you troubleshoot problems with the WiFly shield.
For consistent results unplug & replug power to your Arduino and WiFly shield.
(Ensure the serial monitor is not open when you remove power.)

Attempting to connect to SPI UART...
Connected to SPI UART.

 * Use $$ (with no line ending) to enter WiFly command mode. ("CMD")
 * Then send each command followed by a carriage return.

Waiting for input.

uto-Assoc roving1 chan=0 mode=NONE FAILED
*READY*
Auto-Assoc roving1 chan=0 mode=NONE FAILED
Auto-Assoc roving1 chan=0 mode=NONE FAILED
CMD
scan
<2.21>
SCAN:Found 1
Num            SSID   Ch  RSSI   Sec    MAC Address     Suites
 1               martin 01 -67 WPA2PSK 00:15:0c:c7:8b:a5 AESM-AES  5104    4
set wlan ssid martin
AOK
<2.21> set wlan auth 4
AOK
<2.21> set wlan phrase XXXXXXX
AOK
<2.21> set wlan chan 01
AOK
<2.21> get wlan
SSID=martin
Chan=1
ExtAnt=0
Join=1
Auth=WPA2
Mask=0x1fff
Rate=12, 24 Mb
Linkmon=0
Passphrase=XXXXXXX
<2.21> join # 1
Auto-Assoc martin chan=1 mode=WPA2 SCAN OK
Joinin),9 %2 2.21, 07-11-2010
 $2=00:06:66:13:#&:14
),9 %2 2.21, 07-11-2010
 $2=00:06:66:13:#&:14
),9 %2 2.21, 07-11-2010
 $2=00:06:66:13:#&:14
),9 %2 2.21, 07-11-2010
 $2=00:06:66:13:#&:14
),9 %2 2.21, 07-11-2010
 $2=00:06:66:13:#&:14

I hope someone can help me…

thank’s :frowning:

The output is nothing like Ive seen before, but try ruling out the possibility of a bug by setting set wlan auth 3 (mixed WPA1 and WPA2)

I use this on my WPA2 network and things work fine.

I have tried that but it doesn’t make a differnce.

I don’t know! You can try a few things, but I’m definitely reaching here…

  • make sure there are no spaces in the network name (although it looks like its working). if there are, replace them with a $ character.

  • set w c 0 (automatically detect channel)

  • or… you have “set w c 01”. data sheet says it takes arguements 1-13. so either do “set w c 0” or “set w c 1”, but not “set w c 01”.

  • before joining, save, then reboot

  • add some delays between commands to the wifly

  • add a delay after you join the network. make sure youre never sending any characters during joining.

My output looks like this:

WiFly Ver 2.21, 07-11-2010
MAC Addr=00:06:66:13:c8:5a
Auto-Assoc BELL138 chan=11 mode=WEP SCAN OK
Joining BELL138 now..
*READY*
Associated!
Using Static IP
Listen on 80

Other than having a different setup than you (static IP), notice how it says “Joining BELL138 now…”

Yours says : “Joinin),9 %2 2.21, 07-11-2010”

Maybe theres an issue with your communication (also makes me wonder if there are spaces in the network name)

Hey, I changed the ssid and the passphrase an now it works… Sometimes…

Is it normal that it can’t connect sometimes?

I’m not sure. When I use the wifly at my house, it works all the time. At my girlfriend’s house, I guess her internet is shotty, and when looking at the output of the wifly, I see it sometimes disconnects. but it always attempts to reconnect, and eventually it gets it. I don’t know much more about that issue. Maybe try moving your router closer to the wifly, or use it in a room without many obstructions (particularly metal ones, or thick concrete as may be the case in an apartment). Im glad you got it working though!