Cannot communicate with SIM800C GSM / GPRS module

Hi,

I have just bought and started to test my SIM800C module, but it doesn’t send the sms, and it doesn’t give me any feedback in the serial monitor.

Equipment:

  • Arduino Mega
  • External powersupply for the module with 5v output(laptop charger)
  • SIM800C GSM / GPRS module

My setup:

Code:

//#define BLYNK_PRINT Serial
//#define TINY_GSM_MODEM_M590
#define TINY_GSM_MODEM_SIM800
#include <TinyGsmClient.h>
//#include <BlynkSimpleSIM800.h>
 
char apn[] = "internet.no"; //TDC Norway standard = "internet.no"
char user[] = ""; //TDC Norway standard = ""
char pass[] = ""; //TDC Norway standard = “”
 
#define SerialAT Serial1
TinyGsm modem(SerialAT);
 
void setup() {
  // initialize both serial ports:
  Serial.begin(9600);  // Debug console
  delay(10);
  SerialAT.begin(2400);  // Modem
  delay(3000);
 
  Serial.println("Initializing modem..");
  modem.restart();
  Serial.println("...... done.");
  //SerialAT.println("AT+IPR=19200");    // Tell the SIM900 not to autobaud
  //SerialAT.print("AT+CMGF=1\r");
  //char buffer[4];
  //sprintf (buffer, "AT+CMGS=+4700000000%dThis is the text message.%d",0xd, 0x1a);
  //SerialAT.print(buffer);
  //SerialAT.print("AT+CMGS=\"+4700000000\"\rdfgdfg" + 0x1a);
  SerialAT.write("AT+CMGF=1\r"); //sending SMS in text mode
  SerialAT.write("AT+CMGS=\"+4700000000\"\r"); // phone number
  delay(1000);
  SerialAT.write("Hello how are you?\r"); // message
  delay(1000);
  delay(1000);
  SerialAT.write(0x1A); // Ctrl-Z EOF
}
 
void loop() {
 
 
  // read from port 1, send to port 0:
  if (SerialAT.available()) {
    int inByte = SerialAT.read();
    Serial.write(inByte);
  }
 
  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    SerialAT.write(inByte);
  }
}

Output from the serial monitor:

Questions:

  1. Why doesnt it send any SMS?
  2. Why doesnt it give me any Serial Monitor feedback?
  3. Should i connect to the module this way?
    Arduino TX1 18 → SIM800C RXD
    Arduino RX1 19 → SIM800C TXD
  4. Is Arduino TX1 (18) og RX1 (19) the same as Serial1 on Arduino Mega?
  5. Should i use \r or \n or both when talking to the SIM800C module?

Thanks in advance. :slight_smile:

reposted in correct sub-forum: Cannot communicate with SIM800C GSM / GPRS module - Networking, Protocols, and Devices - Arduino Forum

Do not use arduino TX1 18 / RX1 19.

Try use arduino TX0 1 to sim800 TXD and arduino RX0 0 to sim800 RXD
Also i always use external serial terminal software for manual testing with AT commands.