GSM module not establising connection

Thread Starter

Tarek1266

Joined Oct 18, 2019
59
Hi everyone,

I am working on a GSM module (SIM800L). I tried to power it using arduino and connecting it to RX and TX pins using the following code but without any response coming on my phone number. I also tried to power it using LM2596 (DC-DC buck converter). I attached the photo of the used converter. I also tried to use the module in the open air to ensure that the module network is fine but it also does not work. In all cases mentioned, the module blinks every one second which in turns indicate that the module is not establishing a network connection. Hope any one could help.
Regards,
the code used :

GSM module for Ardunio:
#include <SoftwareSerial.h>

//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
 
  //Begin serial communication with Arduino and SIM800L
  mySerial.begin(9600);

  Serial.println("Initializing...");
  delay(1000);

  mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
  updateSerial();

  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  updateSerial();
  mySerial.println("AT+CMGS=\"+ZZxxxxxxxxxx\"");//change ZZ with country code and xxxxxxxxxxx with phone number to sms
  updateSerial();
  mySerial.print("Last Minute Engineers | lastminuteengineers.com"); //text content
  updateSerial();
  mySerial.write(26);
}

void loop()
{
}

void updateSerial()
{
  delay(500);
  while (Serial.available())
  {
    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
  while(mySerial.available())
  {
    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
  }
}
 

Attachments

sagor

Joined Mar 10, 2019
909
I assume you connected the RX of the module to the TX of the Arduino and same for TX of module to RX of Arduino?
Is the unit 5V tolerant, or is it a 3.3V? I found on one site:
" Maximum voltage on UART in this module is 2.8V. Higher voltage will kill the module. "
That means if you connected directly to Arduino, you may have blown the UART in the module. Other sites state it is "5V tolerant", which means it should withstand 5V, but any voltage spike may still damage it. Safest is to use a level converter on the UART lines.
Also, some modules must NOT be powered by 5V, Vcc is supposed to be between 3.7 and 4.2V (not even 3.3V)
 

Thread Starter

Tarek1266

Joined Oct 18, 2019
59
I have ofcourse connected the Tx and Rx of the module with Rx and Tx of the arduino, repectively.
Actually, I used a tutorial that uses a direct connection to the arduino. Note that this is actually our setup .kindly see the following link :
https://store.fut-electronics.com/p...-built-in-antenna?_pos=4&_sid=d897b42ba&_ss=r
I have already give it a clean supply of 5Vdc and up to 3 ampere current capability. But it still blinks every second.
I tried AT commands it sees networks but it does not connect to them.
 

pleriche

Joined Oct 29, 2017
84
I wasted a lot of time 2 or 3 years ago with a SIM800L which wouldn't connect, and likewise, I tried various power options. In the end I realised the problem: the SIM800L is 2G only and I was using a SIM card with a network (Three UK) which only supports 3/4G. A similar 3G module is more like £30. Very disappointing as Three offered a free modest data allowance which would have been ideal for an IoT application simply needing to post small amounts of data. If that's your requirement, you could consider using LORALAN, or cheap 433MHz modules communicating with a local base station.
 

pekka123

Joined May 18, 2017
21
Tarek1266
You must first to found RX and TX wires, which is which? It depends. It better to look. Take wires out of circuit and measures with a voltmeter. That wire which gives 3.3V is TX wire and the other which doesn't give any voltage is RX. You can test the modem putting a resistor (about 330 ohms) to 3.3V and a led (cathode to TX) anode to 330 R. Then you can test sending a message to the modem. If the led blinks, you have found the right TX wire. The other is RX wire. You must have a valid SIM card. It is better to use 300 baud that it better to see the blink. If you have an oscilloscope, it it much easier.
 

graybeard

Joined Apr 10, 2012
99
I have read that AT&T has shut down their 2G GSM network in the US and will be shutting their 3G GSM network in February. The other. T-mobile and Verizon will e shutting theirs in 2022. What's happening in the rest of the world?
 

gdamorakis

Joined Jan 13, 2016
1
I have ofcourse connected the Tx and Rx of the module with Rx and Tx of the arduino, repectively.
Actually, I used a tutorial that uses a direct connection to the arduino. Note that this is actually our setup .kindly see the following link :
https://store.fut-electronics.com/p...-built-in-antenna?_pos=4&_sid=d897b42ba&_ss=r
I have already give it a clean supply of 5Vdc and up to 3 ampere current capability. But it still blinks every second.
I tried AT commands it sees networks but it does not connect to them.
1st Ensure that you have 2G GSM coverage.

2nd Remove PIN from SIM (use a mobile phone to do this). You can activate it later using AT commands through Arduino.

3rd Sometimes, the various PSU though thy are adequate to provide the needed Voltage/Current, do not provide them fast enough when the GSM module needs it. I have read somewhere that it is better to power the module by Lipo batteries.

For the module’s registration on a mobile provider (blink every 3 seconds) there is no need any connection to Arduino. But if arduino communicates with the module you can send (through Serial Monitor) the: AT+COPS=? (enter) (Check or Configure Operator Selection) to have the available mobile providers as a feedback from the module, even if it is not registered.

I use this module, occasionally, for educational purposes. I use laboratory PSU to power it. I face frequent disconnecting conditions, especially on incoming calls (during ringing), or when I try to send an SMS.
 

timm27

Joined Dec 11, 2020
13
In most of Europe - including the UK - there are many 2G Networks still operating, but the focus in on machine-to machine communications mostly using SMS. However, if there is a network that is active the device will find it and will at least try to register on-to the network. So you need to check what bands the device supports and whether there is local service on that band. The next thing you will need to check is whether the SIM in your device is valid on the local network and has credit needed for a connection.

The SIM800C supports the US 850/1900 and the 3GPP 900/1800 MHz bands. I think you may need to select the operating band and the network operator identity to help; the device find and connect to the band available in your location. If you have an old 'unlocked' 2G GSM handset you could put your SIM into that to check there is a local network.

SimCom have a lot of product data on their website. www.simcom.com/product/SIM800C. You will need to register for an account, to be able to download anything.
 

pleriche

Joined Oct 29, 2017
84
Whether or not you have a 2G network available, the module should at least responf "OK" to the first AT command, and your code should reflect that to the Arduino. Can you confirm that with the Arduino serial monitor running (at 9600 baud), you first see the
"Initializing..." message then the "OK". That will not only positively confirm that you have TX connected to the module's RX and vice versa, and also that you haven't blown up the module's serial interface with a 5V signal it's not able to cope with.
 
Top