Go Down

Topic: WiFly shield hanging at "if (!WiFly.join(ssid, passphrase)) " (Read 2 times) previous topic - next topic

pylon

Are you sure you use the current version of the library? The new version has timeouts for all functions and join() must return after some time. Can you check that you're using that version. It's important also because only the new version does support the SPI version of the shield (which you have).

Spandy19

I have checked, I am using the latest version of the library.
So since then I have been running "SpiUartTerminal" to manually connect to the WiFi first.
(I am using TeraTerm VT instead of Arduino serial monitor)
Code: [Select]

get wlan
SSID=TechnicalTest
Chan=0
ExtAnt=0
Join=0
Auth=WPA2
Mask=0x1fff
Rate=12, 24 Mb
Linkmon=1
Passphrase=5*****8085
<2.23> scan
<2.23>
SCAN:Found 1
Num            SSID   Ch  RSSI   Sec    MAC Address     Suites
1        TechnicalTest 11 -31 WPA2PSK 00:60:64:3e:07:1c AESM-AES  310c    0
join
Auto-Assoc TechnicalTest chan=11 mode=WPA2 SCAN OK
Joining TechnicalTest now..
<2.23> Associated!
DHCP: Start
DHCP in 17ms, lease=86400s
IF=UP
DHCP=ON
IP=192.168.2.167:80
NM=255.255.255.0
GW=192.168.2.254
Listen on 80
show net
SSid=TechnicalTest
Chan=11
Assoc=OK
Rate=12, 24Mb
Auth=OK
Mode=WPA2
DHCP=OK,renew=64792
Boot=242017
Time=FAIL
Links=1
[b]<2.23> Disconn from TechnicalTest,LOST-AP[/b]

disconnects after 30 sec or so.
Nothing wrong with Wifi AP. I am have connected my phone to it and it works fine!

pylon

You probably should set wlan linkmon to a value greater than 1. If it's greater than 0 the WiFly checks the connection to the AP once a second. If the value is 1 (as it is for your module) one failure is enough to terminate the connection. Try setting it to 10 or so.

Go Up