Hi, I am trying to test BlynkClient using a Quectel M95 GSM. The board that I am using is called " SOS Arduino Compatible M95 GSM / GPRS Shield" . The link for datasheet is as follows “https://www.rapidonline.com/sos-arduino-compatible-m95-gsm-gprs-shield-75-0548”.
When I connect it to my Arduino mega, upload my codes, the module is unable to connect to the network. I have having the following error.
AT
AT
AT&FZE0
AT+CPIN?
AT+CPIN?
ATI
[25704]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.6.0 on Arduino Mega
[25712] Modem init...
AT
AT
AT&FZE0
AT+CPIN?
AT+CPIN?
[25843] Connecting to network...
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+COPS?
[30947] Network: O2
[30947] Connecting to giffgaff ...
AT+QIDEACT
AT+QIFGCNT=0
AT+QICSGP=1,"giffgaff","giffgaff",""
AT+QIREGAPP="giffgaff","giffgaff",""
AT+QIACT
AT+QIMUX=1
[33511] Connect GPRS failed
```cpp
My Codes are as follows:
#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_SIM900
// #define TINY_GSM_MODEM_SIM808
// #define TINY_GSM_MODEM_SIM868
// #define TINY_GSM_MODEM_SIM7000
// #define TINY_GSM_MODEM_UBLOX
#define TINY_GSM_MODEM_M95
// #define TINY_GSM_MODEM_BG96
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_MC60
// #define TINY_GSM_MODEM_MC60E
// #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 Serial1
// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial
// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(2, 3); // RX, TX
// Your GPRS credentials
// Leave empty, if missing user or pass
const char apn[] = "giffgaff";
const char user[] = "giffgaff";
const char pass[] = "";
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
const char auth[] = "d08173506d7e4eab8869802b54656aae";
TinyGsm modem(SerialAT);
void setup()
{
digitalWrite(10,HIGH);
// Set console baud rate
SerialMon.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()
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("1234");
Blynk.begin(auth, modem, apn, user, pass);
}
void loop()
{
Blynk.run();
}