Arduino + WiFly GSX

So im a beginner and i want to link Wifly to Arduino.

I followed the tutorial on http://cairohackerspace.blogspot.com/20 … 9683750803 this site, but it keeps reconnecting and i dont know why.

i also tryed the WiFly_Test example from the WiFlySerial.h library but it prints wird characters sometimes

Staer.
Free memory:901
Starting WiFly Tester.
Free memory:901
ERR: ?-Cmd
<2.23>Cmd:
set u m 0x1 
 Ind:
AOK
 
<2.23> 
ÿAOK
<2.23> 
Cmd:
set u b 9600
 Ind:
AOK
<2.23>5¦üAOK
<2.23>
<2.23> SþWiFly Ver 2.23, 04-26-2011 on 131C11
<2.23>GotPrompt:
<2.23>
Starting WiFly.
Free memory:901
WiFly begin mem:901
MAC: Cmd:
 get mac
 Ind:
Addr=
 
<2.23> 
ÿMac Addr=00:06:66:14:a9:d5
<2.23>00:06:66:14:a9:d5
Cmd:
get ip
 Ind:
F=
 
<2.23> 
ÿIF=UP
DHCP=ON
IP=192.168.0.102:2000
NM=255.255.255.0
GW=192.168.0.1
HOST=0.0.0.0:2000
PROTO=TCP,
MTU=1524
FLAGS=0x7
BACKUP=0.0.0.0
<2.23>IP: Cmd:
get ip
 Ind:
IP=
 
<2.23> 
ÿIF=UP
DHCP=ON
IP=192.168.0.102:2000
NM=255.255.255.0
GW=192.168.0.1
HOST=0.0.0.0:2000
PROTO=TCP,
MTU=1524
FLAGS=0x7
BACKUP=0.0.0.0
<2.23>192.168.0.102:2000
Netmask: Cmd:
get ip
 Ind:
NM=
 
<2.23>5¦üIF=UP
DHCP=ON
IP=192.168.0.102:2000
NM=255.255.255.0
GW=192.168.0.1
HOST=0.0.0.0:2000
PROTO=TCP,
MTU=1524
FLAGS=0x7
BACKUP=0.0.0.0
<2.23>255.255.255.0
Gateway: Cmd:
get ip
 Ind:
GW=
 
<2.23> 
ÿIF=UP
DHCP=ON
IP=192.168.0.102:2000
NM=255.255.255.0
GW=192.168.0.1
HOST=0.0.0.0:2000
PROTO=TCP,
MTU=1524
FLAGS=0x7
BACKUP=0.0.0.0
<2.23>192.168.0.1
DNS: Cmd:
get dns
 Ind:
DNS=
 
<2.23> 
ÿDNS=192.168.0.1
Name=server1
Backup=backup2
<2.23>192.168.0.1
 
Cmd:
show q 0x177 
 Ind:
>
<2.23>5¦ü83f857,841b28,84265d,8328a0,8329ad,83283e,
<2.23> 
WiFly Sensors: 5¦ü83f857,841b28,84265d,8328a0,8329ad,83283e,
<2.23>
Cmd:
show q t 
 Ind:
>
<2.23>5¦ü83f793,
<2.23> 
WiFly Temp: 5¦ü83f793,
<2.23>
Cmd:
show battery 
 Ind:
>
<2.23>5¦üBatt=3056
<2.23> 
WiFly battery: 5¦üBatt=3056
<2.23>
Cmd:
set comm remote 0
 Ind:
>
<2.23>5¦üAOK
ã&™³fÏ )þAOK
<2.23>k¦üAOK
<2.23>Cmd:
close
 Ind:
*CLOS*
 
<2.23> 
ÿERR: CMD K[aÏ2.›æYaÑ©R: CMD Fail
<2.23ÖLøERR: CMD Fail
<2.23>After Setup mem:901
 
Cmd:
exit
 Ind:
EXIT
<2.23>5¦üEXIT

Can someone help?

Thank u!

EDIT:

So I ran the code witch is in example WiFly_Time and figure out why it keep reconnecting. When i was pinging the ip it was stable for a short of time then lost connection and thats why it went to a while(! WifFly.Connected) witch reconnected it. So I just commented the whole while and its working ok but it still drops the connection sometimes…