I’ve now managed to simulate the command sequences using Tera Term Web 3.1 a Terminal program which is able to do the communication with my arduino.
I also tried Term V19b -> does not receive and transmit anything, also hterm or hyperterminal do not transfer any data with the arduino when the GPRS shield is installed. - I do not understand why?
But I’ve still the problem to transmit the data from arduino code to the server.
The sample from the garden exits the CIPSEND this way:
GPRS_Serial.print("\r\n");
delay(300);
GPRS_Serial.print("\r\n");
delay(300);
GPRS_Serial.print(0x26);
delay(300); //Send End Of Line Character to send all the data and close connection
The print(0x26) should send the CTRL-Z commando to the modem.
It seems, as if this codelines do not work for me. - I now have found an ASCII table at http://www.cs.tut.fi/~jkorpela/chars/c0.html which lists CTRL-Z as dezimal 26 and hex 1A. I tried to send (0x1A) too, but it didn’t work too.
This is the code, what’s wrong with it? Why isn’t the data sent?
[code] GPRS_Serial.flush();
GPRS_Serial.println(“AT+CIPSEND”); //Start data through TCP connection
Serial.println(“AT+CIPSEND Sent!”);
if(GPRS_Serial_wait_for_bytes(1,100) == 0)
{
Serial.println(“Timeout”);
goto loop_start;
}
else
{
Serial.print(“Received:”);
while(GPRS_Serial.available()!=0)
{
Serial.print((unsigned char)GPRS_Serial.read());
}
Serial.print("\n");
}
GPRS_Serial.flush();
delay(500);
GPRS_Serial.print(“PUT /data/data.php?d=GPRS;1;2;3;4\r\n”);
Serial.println(“PUT /data/data.php?d=GPRS;1;2;3;4 Sent!”);
delay(300);
GPRS_Serial.print(“Host: myhost.at\r\n”);
Serial.print(“Host: myhost.at Sent!”);
delay(300);
delay(300);
GPRS_Serial.print("\r\n");
Serial.print(“CR-LF Sent!”);
delay(300);
GPRS_Serial.print("\r\n");
Serial.print(“CR-LF Sent!”);
delay(300);
// STRG-Z = dez 26, hex: 1A http://www.cs.tut.fi/~jkorpela/chars/c0.html
GPRS_Serial.print(0x1A); // STRG-Z
Serial.print(“STRG-Z Sent!”);
delay(50);[/code]
Wolfgang