Skip to content

Instantly share code, notes, and snippets.

@mohammedhanine
Created October 14, 2016 12:20
Show Gist options
  • Save mohammedhanine/a362dd01ed4059a85e825c351a7d3625 to your computer and use it in GitHub Desktop.
Save mohammedhanine/a362dd01ed4059a85e825c351a7d3625 to your computer and use it in GitHub Desktop.
void setup()
{
Serial.begin(115200);
delay(200);
Serial.println("AT");
delay(1000);
Serial.print("AT+CREG=0");
delay(2000);
Serial.print("AT+CGATT=1");
delay(2000);
Serial.print("AT+CGDCONT=1,\"IP\",\"freedompop.foggmobile.com\"");
delay(2000);
Serial.print("AT+CGACT=1,1");
delay(2000);
Serial.print("AT+CIPSTART=\"TCP\",\"163.172.37.175\",4444");
delay(2000);
Serial.print("AT+CIPSEND");
delay(2000);
Serial.write("GSM A7 test message!");
delay(5000);
Serial.println (char(26));//the ASCII code of the ctrl+z is 26
}
void loop()
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment