I want to connect my Arduino to Blynk App by using a cellular Shield. This cellular shield is composed of a GSM/GPRS module Ublox SaraG350 and a SIM card.
Thanks to the AT commands, I know that the module is okay but the connection to the Internet is always failing.
Here is my code :
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
//#define BLYNK_HEARTBEAT 30
// Select your modem:
//#define TINY_GSM_MODEM_SIM800
// #define TINY_GSM_MODEM_SIM808
// #define TINY_GSM_MODEM_SIM900
#define TINY_GSM_MODEM_UBLOX
// #define TINY_GSM_MODEM_BG96
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>
// Set serial for debug console (to the Serial Monitor, default speed 115200)
#define SerialMon Serial
// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial1
// or Software Serial on Uno, Nano
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(8, 9); // RX, TX
// Your GPRS credentials
// Leave empty, if missing user or pass
const char apn[] = "Orange";
const char user[] = "";
const char pass[] = "";
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
const char auth[] = "The Auth key";
TinyGsm modem(SerialAT);
void setup()
{
// Set console baud rate
SerialMon.begin(38400);
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()
SerialMon.println("Initializing modem...");
modem.restart();
String modemInfo = modem.getModemInfo();
SerialMon.print("Modem: ");
SerialMon.println(modemInfo);
// Unlock your SIM card with a PIN
modem.simUnlock("0000");
Blynk.begin(auth, modem, apn, user, pass);
}
void loop()
{
Blynk.run();
}
Here is the error I get :
Hope you can help me !