Arduino with SIM808 EVB-v3.2 not working

Hi everyone,

I bought SIM808EVB-v3.2 module (https://fr.aliexpress.com/item/SIM808-instead-of-SIM908-module-GSM-GPRS-GPS-Development-Board-IPX-SMA-with-GPS-Antenna-for/32647682188.html?spm=2114.13010608.0.0.WrgmgQ) and I'm trying to use it with the Arduino UNO.

I've inserted my simcard into the SIM808 and I've connected the following :

TXD => Pin 0 on Arduino
RXD => Pin 1 on Arduino
GND => GND
V_IN => 5V on Arduino

Here is a picture of the wiring : https://www.hostingpics.net/viewer.php?id=552320IMG3367.jpg

After that, I've powered my Arduino and my SIM808 module.

I've also downloaded the SIMCom library from GitHub - itead/ITEADLIB_Arduino_SIMCom: GSM GPRS GPS Bluetooth for SIM800/808/900/908 Shield Library and, in the file GSM.cpp, I've changed :

#define _GSM_TXPIN_ 2
#define _GSM_RXPIN_ 3

to :

#define _GSM_TXPIN_ 1
#define _GSM_RXPIN_ 0

Then, I've uploaded the example of simple GSM/GPRS read to the Arduino :

#include "SIM900.h"
#include <SoftwareSerial.h>
//#include "inetGSM.h"
//#include "sms.h"
//#include "call.h"

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.open-electronics.org
//this code is based on the example of Arduino Labs.

//Simple sketch to communicate with SIM900 through AT commands.

//InetGSM inet;
//CallGSM call;
//SMSGSM sms;

int numdata;
char inSerial[40];
int i=0;


void setup()
{
     //Serial connection.
     Serial.begin(9600);
     Serial.println("GSM Shield testing.");
     //Start configuration of shield with baudrate.
     //For http uses is raccomanded to use 4800 or slower.
     if (gsm.begin(9600))
          Serial.println("\nstatus=READY");
     else Serial.println("\nstatus=IDLE");
};

void loop()
{
     //Read for new byte on serial hardware,
     //and write them on NewSoftSerial.
     serialhwread();
     //Read for new byte on NewSoftSerial.
     serialswread();
};

void serialhwread()
{
     i=0;
     if (Serial.available() > 0) {
          while (Serial.available() > 0) {
               inSerial=(Serial.read());
               delay(10);
               i++;
          }

          inSerial='\0';
          if(!strcmp(inSerial,"/END")) {
               Serial.println("_");
               inSerial[0]=0x1a;
               inSerial[1]='\0';
               gsm.SimpleWriteln(inSerial);
          }
          //Send a saved AT command using serial port.
          if(!strcmp(inSerial,"TEST")) {
               Serial.println("SIGNAL QUALITY");
               gsm.SimpleWriteln("AT+CSQ");
          } else {
               Serial.println(inSerial);
               gsm.SimpleWriteln(inSerial);
          }
          inSerial[0]='\0';
     }
}

void serialswread()
{
     gsm.SimpleRead();
}
}

Unfortunately, after the upload, I get a "DB:NO RESP" error message from the IDE serial console.

GSM Shield testing.
ATT: OK
RIC:
Shield testing

ATT: OK
RIC:
Shield testing

DB:ELSE
DB:NO RESP
DB:NO RESP
DB:NO RESP
Trying to force the baud-rate to 9600

1200
2400
4800
9600
19200
38400
57600
115200
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp

status=IDLE

I've tried to change values in the file GSM.cpp to :

#define _GSM_TXPIN_ 0
#define _GSM_RXPIN_ 1

but it still not work.

So, can someone please help me ?

Thank you :slight_smile:

Like everyone else, you can NOT do SoftwareSerial on the hardware serial pins while also using the pins for hardware serial.

Hi PaulS,

In fact, you're right, SoftwareSerial can't be used on the hardware serial pins while also using the pins for hardware serial !

This changes made my SIM808 GPS code work :

TXD => Pin 0 Pin 2 on Arduino
RXD => Pin 1 Pin 3 on Arduino
GND => GND
V_IN => 5V on Arduino

And here is my new GPS code that work now :

#include <SoftwareSerial.h>
#define DEBUG true
SoftwareSerial mySerial(2,3); 
        
void setup(){
  Serial.begin(9600);
  mySerial.begin(9600); 
  getgps();
}

void loop(){
   sendData( "AT+CGNSINF",1000,DEBUG);   
}

void getgps(void){
   sendData( "AT+CGNSPWR=1",1000,DEBUG); 
   sendData( "AT+CGPSINF=0",1000,DEBUG); 
}

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

So now, I've an other problem with my SIM808 GSM code.

Serial.println("AT");
delay(50);
Serial.println("AT+CMGF=1");
delay(50);
Serial.println("AT+CMEE=2");
delay(50);
Serial.println("AT+CMGS=\"+336xxxxxxxx\"");
delay(50);
Serial.println("HELLO WORLD");
delay(50);
Serial.println((char)26);

Indeed, I've inserted my simcard in the SIM808 and when I try to send an SMS with it, some AT commands return errors :

AT
OK

AT+CMGF=1
CME ERROR: 10 (SIM not inserted)

AT+CMEE=2
OK

AT+CMGS="+336xxxxxxxx"
The error is like 'bad value' or something like that

Potentially, I have a clue thinking that my SIM808 module is not properly powered because only V_IN is wired to +5V on Arduino and there is an other space for li-ion battery 3.5V-4V which is not wired (see https://www.hostingpics.net/viewer.php?id=552320IMG3367.jpg)

So, do you think that this additional battery is needed to power the module and made my SIM808 recognize my simcard ?

Thanks :wink:

check out page 22 and also,does your sim card have 4 digit pin on it? have you removed it?

Page 22 doesn't tell that an additional Li-ion battery is necessary to power the SIM808 module.

My question is : Is a battery required in addition to the 5v pin connection to the arduino ?

Yes, my simcard have 4 digit pin on it but, when I try to enter it with "AT+CPIN", an error message is raised telling me that "sim is not inserted".

That's why I think that I've a problem with power supply ...