SIM 900A cannot Connect to Blynk Cloud

//#define TINY_GSM_MODEM_SIM800
#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_BG96
//#define TINY_GSM_MODEM_XBEE

// 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 <BlynkSimpleTinyGSM.h>

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

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

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

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

TinyGsm modem(SerialAT);

int ledPin = 13;

void setup()
{
  // 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.restart();

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

  Blynk.begin(auth, modem, apn, user, pass,"blynk-cloud.com");
  
  pinMode (13, OUTPUT);
}

void loop()
{
  Blynk.run();
  digitalWrite(13, LOW);
  delay(1000);   
  digitalWrite(13, HIGH);
  delay(1000);  
  digitalWrite(13, LOW);
  delay(1000);  
}


Initializing modem...
[11049] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on Arduino Uno

[11144] Modem init...
[15545] Connecting to network...
[19854] Network: CELCOM STAY IN STAY SAFE
[19854] Connecting to celcom3g ...
[85098] Connected to GPRS
[85367] Connecting to blynk-cloud.com:80
[160817] Connecting to blynk-cloud.com:80
[165818] Connecting to blynk-cloud.com:80
[170819] Connecting to blynk-cloud.com:80
[175820] Connecting to blynk-cloud.com:80
[180824] Connecting to blynk-cloud.com:80
[185822] Connecting to blynk-cloud.com:80
[190823] Connecting to blynk-cloud.com:80

Can someone help me i cannot connect to blynk Cloud…
please someone help

So what serial port we can use?
Sorry we are beginner for arduino

hello sir…Now we connect to internet and GPRS …but we have problem with connectiong to blynk

[122525] Connecting to blynk-cloud.com:80
[198531] Connecting to blynk-cloud.com:80

sir do have any solution for this problems?

What does your updated code and full serial output look like?

Pete.

*************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

// Select your modem:
//#define TINY_GSM_MODEM_SIM800
#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_BG96
//#define TINY_GSM_MODEM_XBEE

// 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 <BlynkSimpleTinyGSM.h>

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

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

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

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

TinyGsm modem(SerialAT);



void setup()
{
  // Debug console
  Serial.begin(115200);
  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,"blynk-cloud.com", 8080);
 

  
  
}

void loop()
{
  Blynk.run();
 
  

}

is this correct or not?

Pete.

Pete.

//#define TINY_GSM_MODEM_SIM800
#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_BG96
//#define TINY_GSM_MODEM_XBEE

// 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 <BlynkSimpleTinyGSM.h>

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

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

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

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

TinyGsm modem(SerialAT);

int ledPin = 13;

void setup()
{
  // 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.restart();

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

  Blynk.begin(auth, modem, apn, user, pass,"blynk-cloud.com");
  
  pinMode (13, OUTPUT);
}

void loop()
{
  Blynk.run();
  digitalWrite(13, LOW);
  delay(1000);   
  digitalWrite(13, HIGH);
  delay(1000);  
  digitalWrite(13, LOW);
  delay(1000);  
}


Initializing modem...
[11049] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on Arduino Uno

[11144] Modem init...
[15545] Connecting to network...
[19854] Network: CELCOM STAY IN STAY SAFE
[19854] Connecting to celcom3g ...
[85098] Connected to GPRS
[85367] Connecting to blynk-cloud.com:80
[160817] Connecting to blynk-cloud.com:80
[165818] Connecting to blynk-cloud.com:80
[170819] Connecting to blynk-cloud.com:80
[175820] Connecting to blynk-cloud.com:80
[180824] Connecting to blynk-cloud.com:80
[185822] Connecting to blynk-cloud.com:80
[190823] Connecting to blynk-cloud.com:80

Now sir i have settle about baud rate…so now blynk cloud connot connect, do you have any solution about this?

You could try specifying port 8080 in your Blynk.begin statement, and maybe using the IP address of the Blynk cloud server where your project resides rather than blynk-cloud.com
You’ll usieially get the IP address by pinging blynk-cloud.com from your PC and this can be checked by pasting this into the browser address bar:

IP Address/auth code/project

Pete.

Please don’t post the same thing in multiple topics.
I’be moved your previous posts on this subject into this new topic to keep it all in one place.

Pete.

sir … i can connect…but only for a moment ,after that cloud reconnect…and i have try Ip address. also like that only 1 minute connect .after that reconnect…

So what does your current code and serial monitor output look like, and what happens when you add Blynk debugging to your sketch?:

Pete.

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

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

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

TinyGsm modem(SerialAT);

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

  delay(10);

  // Set GSM module baud rate
  SerialAT.begin(9600);
  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,"blynk-cloud.com",80);
  
}

void loop()
{
  Blynk.run();

}
Initializing modem...
[11049] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on Arduino Uno

[11144] Modem init...
[15545] Connecting to network...
[19854] Network: CELCOM STAY IN STAY SAFE
[19854] Connecting to celcom3g ...
[85098] Connected to GPRS
[185822] Connecting to blynk-cloud.com:80
[185602] Ready (ping; 1237ms).
[190823] Connecting to blynk-cloud.com:80
[191823] Connecting to blynk-cloud.com:80

That’s quite a long ping time.
What do you see with debugging on?

Have you tried this from a location that has a better mobile phone signal, or with a SIM card from a different carrier?

Pete.