No response from AT commands on Leonardo GPRS GSM IOT Board-V1.2

edited June 19 in Arduino & Crowduino

Hello everyone! I have a problem: every AT command I execute does not give me any response. Maybe I should update firmware? If yes, how I can update that? (I have found no information on official site of Elecrow)

code:
`#define DEBUG 1

define CHECK Serial.println("✓");

void setup()
{
//GSM.begin(9600);
Serial.begin(11520);
Serial1.begin(11520);
while(!Serial);
Serial.println(" -- Program start -- ");
Serial.println("Serial initialization... ✓");
Serial.print("Serial1 initialization... ");
while(!Serial1.availableForWrite());
CHECK
Serial.println("AT commands initialization... ");
sendData("AT",2000);
delay(3000);
Serial.println("HTTP initialization... ");
sendData("AT+HTTPINIT",2000);
Serial.println("HTTP parameters setting... ");
sendData("AT+HTTPPARA=\"CID\", 1",2000);
sendData("AT+HTTPPARA=\"URL\", \"http://www.iforce2d.net/test.php/\"",2000);
sendData("AT+HTTPPARA?",2000);

Serial.println(" -- Get start -- ");
sendData("AT+HTTPACTION=0",2000);
sendData("AT+HTTPACTION=0",2000);
sendData("AT+HTTPACTION=0",2000);
}

void loop() {

}

void sendData(String command, const int timeout) //Send command function
{
String response = "";
Serial1.println(command);
long int time = millis();
while( (time+timeout) > millis()){
while(Serial1.available()){
response += (char)Serial1.read();
}
}
if(DEBUG){
Serial.println();
Serial.print(response);
CHECK
Serial.println();
}
}`

Result:
https://drive.google.com/file/d/11NSHc2rh2g88NbX3J7AfxqycwbjimwdP/view?usp=sharing

Sign In or Register to comment.