Arduino Mego + RN-XV + XBee Shield - sending data to web doesn't work

I wonted to do what is in this page:
http://www.rovingnetworks.com/FAQs/Standalone_WiFi_modules_sending_data_to_web

1)My rn settings:

reboot
$$$
factory RESET
set wlan join 0 ;Stop device connecting while we set up
set wlan ssid TECHNIC-IKS ;Local SSID to connect to wait ‘AOK’
set wlan phrase ********* ;WLAN password for local access point
set wlan auth 4 ;Using WPA in this example
set sys iofunc 0x50 ;red for TCP connection, green for WLAN
set wlan join 1 ;Connect to LAN
set time zone 0 ;GMT / UTC time zone
set time enable 1 ;Enable RTC
set ip proto 18 ;turn on HTTP mode=0x10 + TCP mode = 0x2
set dns name http://127.0.0.1/ ;name of your webserver VertrigoServ
set ip host 0 ;so module will use DNS
set ip remote 80 ;standard webserver port
set com remote GET$/index.php?DATA= ;sample server application
set q sensor 0xff ;sets module to sample all 8 sensor channels
set sys auto 120 ;automatically make the connection every 60 seconds
set option format 0x1f ;send the header plus the sampled binary data converted to ASCII format
set option device PHPdemo ;Set an ID to identify this ‘application’
save
reboot

2)My web page (index.php):

Mesyries <?php $data=$_GET["DATA"]; $mac=$_GET["mac"]; $rtc=$_GET["rtc"]; $id=$_GET["id"]; $bss=$_GET["bss"]; $bat=$_GET["bat"]; $io=$_GET["io"]; $wake=$_GET["wake"]; $seq=$_GET["seq"]; $rtc_val=hexdec($rtc); $rtc_sec=$rtc_val % 60; $rtc_val/=60; $rtc_min=$rtc_val % 60; $rtc_val/=60; $rtc_hr =$rtc_val % 24; $rtc_val/=24; echo "Got data " . $data . " " . $rtc; $file_name="userdata.htm"; $dataf=fopen($file_name, 'w') or die(); flock($dataf, 2) or die(); fputs($dataf,"\n"); fputs($dataf,"\nMesyries user data\n"); fputs($dataf,"\n"); fputs($dataf,"Id: " . $id . " "); fputs($dataf,"Mac: " . $mac . " "); fputs($dataf,"Data: " . $data . " "); fputs($dataf,"RTC: " . $rtc . " "); fputs($dataf,"ID: " . $id . " "); fputs($dataf,"BSS: " . $bss . " "); fputs($dataf,"Bat: " . $bat . " "); fputs($dataf,"IO: " . $io . " "); fputs($dataf,"Wake: " . $wake . " "); fputs($dataf,"Seq: " . $seq . " "); fclose($dataf); ?>
  1. my serwer settings :
    I use VertrigoServ, where 127.0.0.1 is my server

http://vertrigo.sourceforge.net/

My question is what i do wrong becouse i have always connection failed?

index.php (1.35 KB)

I use VertrigoServ, where 127.0.0.1 is my server

127.0.0.1 is the computer that the client is running on, when the client and server are the same machine.

The Arduino can not connect to itself as both client and server.

Finally i manage with this thanks to RN_Product_Training2010v7.03.pdf
in → http://www.rovingnetworks.com/resources/show (it is good to make this step by step to understand)

The solution is:

1)My rn settings:
reboot
$$$
factory RESET
set wlan join 0 ;Stop device connecting while we set up
set wlan ssid TECHNIC-IKS ;Local SSID to connect to wait ‘AOK’
set wlan phrase ********* ;WLAN password for local access point
set wlan auth 4 ;Using WPA in this example
set sys iofunc 0x50 ;red for TCP connection, green for WLAN
set wlan join 1 ;Connect to LAN
set time zone 0 ;GMT / UTC time zone
set time enable 1 ;Enable RTC
set ip proto 18 ;turn on HTTP mode=0x10 + TCP mode = 0x2
set ip host 192.168.1.100
set ip remote 80 ;standard webserver port
set com remote GET$/MyProg.php?DATA= ;sample server application
set q sensor 0xff ;sets module to sample all 8 sensor channels
set sys auto 120 ;automatically make the connection every 60 seconds
set option format 0x1f ;send the header plus the sampled binary data converted to ASCII format
set option device PHPdemo ;Set an ID to identify this ‘application’
save
reboot

2)My web page (MyProg.php):

Sensor data <?php $data=$_GET["DATA"]; $mac=$_GET["mac"]; $rtc=$_GET["rtc"]; $id=$_GET["id"]; $bss=$_GET["bss"]; $bat=$_GET["bat"]; $io=$_GET["io"]; $wake=$_GET["wake"]; $seq=$_GET["seq"]; $rtc_val=hexdec($rtc); $rtc_sec=$rtc_val % 60; $rtc_val/=60; $rtc_min=$rtc_val % 60; $rtc_val/=60; $rtc_hr =$rtc_val % 24; $rtc_val/=24; echo "Got data " . $data . " " . $rtc; $file_name="userdata.htm"; $dataf=fopen($file_name, 'w') or die(); flock($dataf, 2) or die(); fputs($dataf,"\n"); fputs($dataf,"\nSensor data \n"); fputs($dataf,"\n"); fputs($dataf,"Id: " . $id . " "); fputs($dataf,"Mac: " . $mac . " "); fputs($dataf,"Data: " . $data . " "); fputs($dataf,"RTC: " . $rtc . " "); fputs($dataf,"ID: " . $id . " "); fputs($dataf,"BSS: " . $bss . " "); fputs($dataf,"Bat: " . $bat . " "); fputs($dataf,"IO: " . $io . " "); fputs($dataf,"Wake: " . $wake . " "); fputs($dataf,"Seq: " . $seq . " "); fclose($dataf); ?>
  1. my serwer settings :
    I use VertrigoServ, where 127.0.0.1 is my server, which corresponds to 192.168.1.100

MyProg.php (1.37 KB)

I am new to Arduino and RN-XV.

I have an RN-XV module and Arduino Mega 2500.

Is there a simple tutorial that shows me how to setup these two systems to allow Arduino to send and get data over WiFi?

I have done several searches on the forum and google but I need something that starts from the basics about configurations.

Please help as I need to get it working this week. I will really appreciate it.

Thanks Priyansha