BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Arduino mega + sim800l evb =(PROBLEM CONECTION)

Hello, how are you all
I have problems connecting an evb sim800L with arduino mega, to Blynk
the truth is that I have seen and read several comments and I can not connect, I leave information on how to connect it, because it does not allow me to advance in my project

You connect it properly and program it properly and it will work properly… but that’s about as detailed as can get without knowing much more about how you connect and program yours… that and I don’t have one to test… and don’t think GSM works as well in North America anymore?

Have you specifically searched this forum for the keyword sim800L? - https://community.blynk.cc/search?q=sim800L

Hello! Thank You, I’m fine… :wink:
Now, as we are past that: can we get some more (any?) details?

Probably not…

1 Like

hello I live in Morocco, North Africa,
and the truth is that it did everything necessary to connect this and I do not achieve it, I have a mega file, and an ev8 sim800l, it works with 5v, the error message is


/ _) / / _ _____ / / __
/ _ / / // / _ / '/
/ / / _, / // / / _
/ __ / v0.5.2 in Arduino Mega

[16307] Modem init …
[26536] Unable to start
Starting the modem …

I have the CORRECT APN
I have the PIn unlocking the SIM card
I have correctly connected RX and TX
and this is the code that I am occupying:
ªª


/ _) / / _ _ _ _ /
/ _ / _ / / // / _ / '/
/ / / _, / // / / _
/ __ / v0.5.2 in Arduino Mega

[16307] Modem init …
[26536] Unable to start
Starting the modem …
ºº

Blockquote


"" / * Comment this to disable impressions and save space * /
#define BLYNK_PRINT Series

#define TINY_GSM_MODEM_SIM800

// The default heartbeat interval for GSM is 60
// If you want to override this value, delete the comment and set this option:
#define BLYNK_HEARTBEAT 30

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

char auth [] = "767872b1e87147149a0cd56650b41d24";
char apn [] = "www.iamgprs1.ma";
user char [] = "";
char pass [] = "";

// Hardware series in Mega, Leonardo, Micro
// #define SerialAT Serial1

// o Serial Software in One, Nano
#include <SoftwareSerial.h>
SoftwareSerial SerialAT (7, 8); // RX, TX

Modem TinyGsm (SerialAT);

WidgetLED led1 (V1);

BlynkTimer timer;

// V1 LED Widget flashes
void blinkLedWidget ()
{
if (led1.getValue ()) {
led1.off ();
Serial.println ("LED on V1: off");
} else {
led1.on ();
Serial.println ("LED on V1: activated");
}
}

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

delay (10);

// Set the baud rate of the GSM module
SerialAT.begin (115200);
delay (3000);

// The restart takes a long time
// To ignore it, call init () instead of restart ()
Serial.println ("Starting the modem ...");
modem.restart ();

// Unlock your SIM card with a PIN
modem.simUnlock ("7758");
delay (2000);

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

timer.setInterval (1000L, blinkLedWidget);
}

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

if someone can help me
I thank you now, your comments
=)

Seems a bit high for software serial to produce good results.
Also, are toy connected Rx to Tx and vice versa?

Pete.

https://geekelectronics.io/wp-content/uploads/2017/10/GSM-MODULE-SIM800-5V.jpg

hi Peter, not the truth is that it runs to 5 v you can see it here, exchange position the RX and TX and it does not connect
= (

If that was a reply to my comment then I don’t think you understoood what I was saying.
If you used hardware serial then a baud rate of 115200 baud is fine, but when you use software serial the library isn’t really able to handle such high baud rates successfully.
When you use an Arduino with an ESP to give Wi-Fi connectivity then the maximum reccomended software serial baud rate is 9600.

Note that you have to have both devices talking to each other at the same baud rate, so the rate used in the sketch must match the SIM800 baud rate - which will be set using an AT command.

Pete.

The max I was able to achieve to establish stable connection was around 38kbps with soft serial and my (already burnt) SIM900. It simply will not run at 115kbps. The other question is, why bother with Software Serial having Arduino Mega? You need to use one of the remaining UARTS (all three are for You to serve), and then even 250kbps is a safe speed (although not necessary for this connection)

MARVIN, THANK YOU
for your comment
the truth is that, it is difficult for me to know what you are saying but, you could tell me exactly what I have to put in the code for the, mega and where to make the connections

1 * I have changed to: SerialAT.begin (38400);
2 * in which pin do I connect RX and TX?
3 * and as I write this correctly:


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

 // or Software Serial on One, Nano
 #include <SoftwareSerial.h>
// SoftwareSerial SerialAT (7, 8); // RX, TX

could you help me please
I am an enthusiastic beginner who wants to connect his sim800l and I do not achieve it.
thanks

If you’re going to use hardware serial on the Mega (a great approach) then you connect as follows:

Arduino TX1 (18) to SIM800 Rx
Arduino RX1(19) to SIM800 Tx

However, you MUST still use the same Baud rate on both the Mega UART1 and the SIM800.

Pete.

This is the basic example with set HARDWARE serial for Mega:

#define BLYNK_PRINT Serial

// Select your modem:
#define TINY_GSM_MODEM_SIM800
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>

char auth[] = "YourAuthToken";

// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[]  = "YourAPN";
char user[] = "";
char pass[] = "";


#define SerialAT Serial1 //Connect SIM_RX to 18, SIM_TX to 19 of MEGA

TinyGsm modem(SerialAT);

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

  delay(10);

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

  // 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();
}

Thank Marvin and Peter
Now I connect something, but it turns out that the SIM is lost.
already change places pin 18 and 19
I do not know what else to do?..
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.2 on Arduino Mega

[9710] Modem init…
[30000] SIM is missing

#define BLYNK_PRINT Serial

#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>


char auth[] = "secret";
char apn[]  = "www.iamgprs1.ma";
char user[] = "";
char pass[] = "";

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

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

TinyGsm modem(SerialAT);

WidgetLED led1(V1);

BlynkTimer timer;

// V1 LED Widget is blinking
void blinkLedWidget()
{
  if (led1.getValue()) {
    led1.off();
    Serial.println("LED on V1: off");
  } else {
    led1.on();
    Serial.println("LED on V1: on");
  }
}

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

  delay(10);

  // Set GSM module baud rate
  SerialAT.begin(38400);
  delay(3000);

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

  // Unlock your SIM card with a PIN
  modem.simUnlock("7758");
  delay(2000);

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

  timer.setInterval(1000L, blinkLedWidget);
}

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

@Cesar_Molina_Rocher hi. Did you read the readme? The link is right in the example sketch :wink:

Yes, I read everything
I have credit on the SIM card
the Apn is correct
the internet works on a phone,
One question, is it necessary to change the Baud rate 115200 to a lower one?

I answered already that question:

Then again: With Serial1 and MEGA it will work at 115200, and even higher. NO NEED TO change that. BUT AGAIN (what @PeteKnight stated earlier) BOTH MUST be at the same baudrate!

How are you powering this board? connecting to USB or Arduino 5V regulator might simply not work. use separate 5V 2A power supply It might work with 1A too, but SIMCOM recommends to use 2A

IF all fails, try to use some other code (there are some helpful for debugging in TinyGSM examples)

I had the same communication problem. I changed the power supply to 12v 5A and the problem was solved.