Skip to main content
Arduino

Return to Answer

As pointed out in the comment, there was code which wrote back the GSM response to the serial interface. The GSM module would not know what to do with this response. This scenario is for where the user does not use a Serial Monitor because the GSM module would be connected to that serial port.
Source Link

I have only worked with the SIMCOM series of GSM modules like the SIM900 and the SIM808. Here is a sample of the kind of code you should be looking at using. It will send one "AT" to the GSM module and then it will spit out the result in the serial monitor.

void setup()
{
 Serial.begin(115200);
 int bytesSent = Serial.write("AT\r\n"); //send "AT" and send the end of line characters to signify end of the command
 }
 void loop()
{
 if (Serial.available() > 0) {
 // read the incoming byte:
 incomingByte = Serial.read();
 // say what you got:
 Serial.print("I received: ");
 Serial.println(incomingByte);
 }
}

I have only worked with the SIMCOM series of GSM modules like the SIM900 and the SIM808. Here is a sample of the kind of code you should be looking at using. It will send one "AT" to the GSM module and then it will spit out the result in the serial monitor.

void setup()
{
 Serial.begin(115200);
 int bytesSent = Serial.write("AT\r\n"); //send "AT" and send the end of line characters to signify end of the command
 }
 void loop()
{
 if (Serial.available() > 0) {
 // read the incoming byte:
 incomingByte = Serial.read();
 // say what you got:
 Serial.print("I received: ");
 Serial.println(incomingByte);
 }
}

I have only worked with the SIMCOM series of GSM modules like the SIM900 and the SIM808. Here is a sample of the kind of code you should be looking at using. It will send one "AT" to the GSM module and then it will spit out the result in the serial monitor.

void setup()
{
 Serial.begin(115200);
 int bytesSent = Serial.write("AT\r\n"); //send "AT" and send the end of line characters to signify end of the command
 }
 void loop()
{
 if (Serial.available() > 0) {
 // read the incoming byte:
 incomingByte = Serial.read();
 }
}
Source Link

I have only worked with the SIMCOM series of GSM modules like the SIM900 and the SIM808. Here is a sample of the kind of code you should be looking at using. It will send one "AT" to the GSM module and then it will spit out the result in the serial monitor.

void setup()
{
 Serial.begin(115200);
 int bytesSent = Serial.write("AT\r\n"); //send "AT" and send the end of line characters to signify end of the command
 }
 void loop()
{
 if (Serial.available() > 0) {
 // read the incoming byte:
 incomingByte = Serial.read();
 // say what you got:
 Serial.print("I received: ");
 Serial.println(incomingByte);
 }
}

AltStyle によって変換されたページ (->オリジナル) /