SIM800L cannot init

Hi!

Sorry, I RE-SEAR-CH a lot but I couldn’t find any solution. Tried a lot of code and wiring but my SIM800L “Cannot init…”

Serial output:

[1059] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on NodeMCU

[1106] Modem init...
[11328] Cannot init

The module is blinking each 3 sec aprox. which means that sim card is working and connected.

My Hardware: NodeMCU + SIM800L + LM2596
USB charger is 5V 2.4A and LM2596 delivers 4.1V to SIM800L

Code:

#define BLYNK_PRINT Serial

// Select your modem:
#define TINY_GSM_MODEM_SIM800

// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
//#define BLYNK_HEARTBEAT 30

#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "XXXXXXXX";

// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[]  = "gprs.oi.com.br";
char user[] = "oi";
char pass[] = "oi";

// Hardware Serial on Mega, Leonardo, Micro
//#define SerialAT Serial1

// or Software Serial on Uno, Nano
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(13, 15); // RX, TX

TinyGsm modem(SerialAT);

void setup()
{
  // Debug console
  Serial.begin(9600);

  delay(10);

  // Set GSM module baud rate
  SerialAT.begin(115200);
  delay(1000);

  // Restart takes quite some time
  // To skip it, call init() instead of restart()
  Serial.println("Initializing modem...");
  //modem.restart();

  // Unlock your SIM card with a PIN
  //modem.simUnlock("1234");

  Blynk.begin(auth, modem, apn, user, pass);
}

void loop()
{
  Blynk.run();
}

I’m struggling for 3 weeks in this project. :cry:
Any idea??

Nice :stuck_out_tongue_winking_eye:

Well, that might mean it is connected to your Cell provider at least…

But is that enough for full operation?

You will also want to confirm that you are crossing the RX (on ESP) to TX (on shield) and vice versa.

This seems a little fast for Software Serial… yes, I know it should work in theory, but generally communication with Blynk Server over serial “shields” work better at 9600 (of course you will need to program your SIM800 for the same rate.

1 Like

BTW, are you using the correct SoftwareSerial Library for ESP8266… and supported pins? I have never used SWS on ESP, but I understand it is a bit different then on Arduino.

1 Like

The ESP8266 does have one and a half serial ports. The ‘half a port’ is Tx only, which makes it ideal for serial debug via an FTDI adapter.

Obviously wired software updates (as opposed to OTA) still use the primary serial port, so the SIM800 would need to be disconnected to allow new firmware to be uploaded via the primary UART.

More here:

Pete.

1 Like

Gentlemen, I’m proud to have your answers! Thank you!

I’ll try your tips. Anyway, an Arduino nano is on its way.

Thanks!

Hi!

My Arduino Nano has arrived and… still “Cannot init…”

Yes.

Yes, I crossed. I cross all the time.

Reduced to 9600. Still not working.

Now I’m trying on an Arduino Nano.

Both sim cards are working on phones, apns are double-checked, tried different kinds of power sources, always taking care not to over power (V and A).
Still nothing.
Should it be the SIM800L??

Thanks!

I have no idea why an Arduino Nano would be a better choice of MCU in this case than an ESP. If anything, I would have thought a Mega would have been a better choice as you’d have multiple UARTS.

It’s also worth remembering that not all SIM cards will work well with modules like the SIM800 as it still relies on the firmware of the SIM800 to work with the SIM card. I had a UK GifGaf SIM card that refused to work with a SIM900 and eventually had to buy a different brand of SIM to get it to work, despite the GifGaf card working in my phone.

The best way to test it is to connect an FTDI adapter to the SIM800 and talk to it direct from your PC’s serial monitor with AT commands to diagnose what’s happening.
There are also SIM800 test scripts out there that can be used to diagnose what’s happening with the module.

Pete.

1 Like

Hi!
Some progress after changing SIM800L
Now I can test AT commands and even put a simple Blynk project online. Hardware is OK!

Still issues with the bigger project. During setup with GPS and DS18B20, the SIM800L “cannot init…”.
GPS and temperature sensor were working great in a NodeMCU project, so I discarted any hardware or wiring problem.

void setup() 
{
    delay(3000);
    // Debug console
    Serial.begin(9600);
    delay(10);
    // Set GSM module baud rate
    SerialAT.begin(9600);
    delay(3000);
    
    // Restart takes quite some time
    // To skip it, call init() instead of restart()
    Serial.println("Initializing modem...");
    //modem.init();
    // Unlock your SIM card with a PIN
    //modem.simUnlock("1234");
    delay(10000);
    
    Serial.println("Initializind GPS...");
    ss.begin(GPSBaud);
    delay(3000);
    gpstimer.setInterval(5000L, checkGPS); // every 5s check if GPS is connected, only really needs to be done once
    
    //Blynk.begin(auth, ssid, pass); //for Wi-FI
    Blynk.begin(auth, modem, apn, user, pass); //for GSM
     
    DS18B20.begin();
    timer.setInterval(5000L, getSendData); // every 5s reades temperature
}```

Any idea?
Thanks!

Don’t you need the modem.init(); that’s commented out?

It seems obvious, but no. It works commented out indeed.
Thanks!

Hi!
More progress!
New problems…

[13295] Modem init...
[14359] Connecting to network...
[14371] Network: 72410
[14371] Connecting to zap.vivo.com.br ...
[22358] Connected to GPRS
[22368] Connecting to blynk-cloud.com:80
[30317] Ready (ping: 5948ms).
30.81
30.81
[36319] Connecting to blynk-cloud.com:80
30.81
[41960] Connecting to blynk-cloud.com:80
30.75
[45971] Connecting to blynk-cloud.com:80

Connection is unstable. Already changed sim cards (different operators) but behavior didn’t change.
Any clue?
Thanks!

Bad network connection ~6 seconds ping!!!)… not much we can do from here :stuck_out_tongue_winking_eye:

1 Like

:cry:
Should I expect a better performance from a GPRS connection? That one of the best operators… Sometimes I get 1s pings.

Any chance of having a SMS/Blynk integration?
Sould I go for a 3G module?

Thanks in advance
:cry:

Still very high (I was getting 200-350 ms usually with GPRS, if I recall). The GSM signal is strong enough?

I’m not sure if Tiny GSM supports 3G connection/modules. It’s been awhile since last time I was using GSM connection.

I gave up from SIM800L and put a 3G wifi router. That was A LOT easier (though 50 bucks more expensive)
Thanks!

2 Likes

how did you solve the issue of “cannot init…”. am using sim800l and i have solved the power issues but it cannot int…

1 Like

Have you been through al the issues discussed here, and the usual stuff too?
Providing sufficient power to the SIM800 (that can draw a couple of amps)
Tx to Rx and Rx to Tx
Communicating at the correct baud rate
If you’re using SoftwareSerial on an Arduino then not exceeding 9600 baud
Not using the same serial port for debugging and SiM800 comms

This might help you to understand some of those issues better…

Pete.

1 Like

hey did u find any solution?? pls let me know