TCP conecction with A7 GSM/GPRS/GPS

Hello there, im a student trying to get a project done over here, ive tried a lot of things on this one, but its been imposible to solve it. im working to A7 Aithinker company, and had been able to send/recibe sms and calls, but then im triying to send a GET request to a web page, mine by the way, and it just doesnt work.

The connection is done:


but then when i try to get the document i need this happens:

GET /css/about-us.css HTTP/1.1
Connection: keep-alive
+CIPRCV:431,HTTP/1.1 302 Found
Content-Type: text/html; charset=UTF-8
Content-Length: 211
Location: HTTP://
Cache-Control: no-cache
Connection: Close
302 Found

302 Found

The document has moved here

it hapens the same with every webpage i try, and by the way ive tried to set a server on my computer, unloked the port, and when i try to connec to it from my A7 it connects!!! and the port that is listening says: > New Client:
but then i try to send info, and it just colapse COMMAND NO RESPONSE

I really need help over here, im a young developer still is one of the big homies willing to help this pour soul?

What is wrong with this code for A7 Elecrow shield ?

/* * Created by Island * Modified by keen * Date: 17/03/2017 */

define S1debug true

define S_debug true

void setup() { Serial1.begin(115200); // the GPRS baud rate Serial.begin(115200); // the GPRS baud rate


void loop() { /* * After start up the program, you can using terminal to connect the serial of gprs shield, * If you input 't' in the terminal, the program will execute SendTextMessage(), it will show how to send a sms message, * If input 'd' in the terminal, it will execute DialVoiceCall(), etc. */ delay(500); if (Serial.available()){ switch({ case 't': SendTextMessage(); break; case 'd': DialVoiceCall(); break; case 'h': SubmitHttpRequest(); break; case 'q': GetSignalQuality(); break; } } RecData(); }

/* * SendTextMessage() * This function is to send a sms message */ void SendTextMessage() { SendData("",2000,S1debug); SendData("AT+CMGF=1",2000,S1debug);//Because we want to send the SMS in text mode delay(100); SendData("AT+CMGS=+46706015317",2000,S1debug);//send sms message, be careful need to add a country code before the cellphone number delay(100); SendData("GSM test message!",2000,S1debug);//the content of the message delay(100); Serial1.println((char)26);//the ASCII code of the ctrl+z is 26 delay(100); }

/* * DialVoiceCall * This function is to dial a voice call */ void DialVoiceCall() { SendData("AT+SNFS=0",2000,S1debug); delay(100); SendData("ATD+86137xxxxxx",2000,S1debug);// "ATD+86137xxxxxxxx"dial the number delay(100); }

/* * SubmitHttpRequest() * This function is submit a HTTP request * attention:the time of delay is very important, it must be set enough */ void SubmitHttpRequest(){ SendData("AT+CREG?",1000,S1debug); //Query network registration delay(100);

SendData("AT+CGATT=1",2000,S1debug); delay(100);

SendData("AT+CGDCONT=1,\"IP\",\"CMNET\"",2000,S1debug);//setting PDP parameter delay(100);

SendData("AT+CGACT=1,1",2000,S1debug); //Activate PDP, open Internet service delay(100);

SendData("AT+CIPSTART=\"TCP\",\"\",80",5000,S1debug); //Establish TCP connection delay(100);

SendData("AT+CIPSEND=10,\"asdfg12345\"",2000,S1debug); //Send string "asdfg12345" and the length of string is 10 delay(100);

SendData("AT+CIPCLOSE",2000,S1debug); //Close TCP delay(100); }

void GetSignalQuality(){ Serial_Print("Getting the sinal quality...",S_debug); SendData("AT+CSQ",1000,S1debug); Serial_Print("Tips:+CSQ: XX,QQ : It means the Signal Quality poorly when the XX less then 10!",S_debug); }

void SendData(String command, const int timeout, boolean debug){ String response = ""; Serial1.println(command); delay(5); if(debug){ long int time = millis(); while( (time+timeout) > millis()){ while(Serial1.available()){ response += char(; } } Serial.print(response); } }

void Serial_Print(String data, boolean debug){ if(debug){ Serial.println(data); } }

void RecData(){ String response = ""; while(Serial1.available()){ response += char(; } Serial.print(response); }

Similar problem with Ai_Thinker A9G (V02.02.20180825R);

Using AT+GETHTTP command to send/receive data from my php server, receiving only a part of response header with 200 code but can not get body of server response.


OK HTTP/1.1 200 OK Server: nginx/1.16.0 Date: Wed, 08 Ja

How can I retrieve full header and body response of the server?

Note: Normally server return echo of the value -json- and print on screen.