- Fri Aug 21, 2015 4:12 am
#184192
Hello i am using an rn-xv 171 and i am trying to upload data on an ftp server..
when i am using the module on gateway mode it works properly and does what i want...when i am trying to upload the commands as a code i am getting an err-?cmd and even if it connects to the wifi after a little bit it never sends the data...http://imgur.com/c1zrnRq this is the error and the code is this
when i am using the module on gateway mode it works properly and does what i want...when i am trying to upload the commands as a code i am getting an err-?cmd and even if it connects to the wifi after a little bit it never sends the data...http://imgur.com/c1zrnRq this is the error and the code is this
Code: Select all
is there someone that knows why this happends ? i read similar posts in the forum but i couldnt find an answer thats why i am doing this post.Thanksint cont;
char recv[512];
void setup()
{
Serial.begin(9600);
}
void loop()
{
while (Serial.available()>0) {}
// Enters in command mode
Serial.print("$$$"); check();
// Sets DHCP and TCP protocol
Serial.print("set ip dhcp 1\r"); check();
Serial.print("set ip protocol 2\r"); check();
// Configures the way to join the network AP, sets the encryption of the
// network and joins it
Serial.print("set wlan join 0\r"); check();
Serial.print("set wlan phrase 089F2DC06A\r"); check();
Serial.print("join Thomson81C748\r"); check();
Serial.print("set ftp address 185.4.135.79"); check();
Serial.print("set ftp user username"); check();
Serial.print("set ftp pass password"); check();
Serial.print("set ftp dir ./httpdocs/tasos/"); check();
Serial.print("ftp put anarxia.txt "); check();
Serial.print("hello");
Serial.print("set ftp timer 40"); check();
}
void check(){
cont=0; delay(1000);
// Receive the answer from the WIFI module.
while (Serial.available()>0)
{
recv[cont]=Serial.read(); delay(100);
cont++;
}
recv[cont]='\0';
// Print the answer.
Serial.println(recv);
// Clean the buffer to be able to send a command.
Serial.flush(); delay(1000);
}
Last edited by Markos13 on Sat Aug 22, 2015 3:12 am, edited 3 times in total.