Currently I am experiencing difficulty using my new A6 GSM module with blynk. I know that the apn,user and pass is correct because it works perfectly with my SIM 900A module.
Below you can see that I receive the “Connect GPRS failed” message
#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_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>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
const char auth[] = "****************************";
// Your GPRS credentials
// Leave empty, if missing user or pass
const char apn[] = "internet";
const char user[] = "";
const char pass[] = "";
// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial3
// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(2, 3); // RX, TX
TinyGsm modem(SerialAT);
void setup()
{
// Set console baud rate
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();
String modemInfo = modem.getModemInfo();
Serial.print("Modem: ");
Serial.println(modemInfo);
// Unlock your SIM card with a PIN
//modem.simUnlock("1234");
Blynk.begin(auth, modem, apn, user, pass);
}
void loop()
{
Blynk.run();
}
I’m trying to find a solution to this problem, I checked the GPRS module with a sketch
#include <SoftwareSerial.h>
SoftwareSerial GSM_Serial(2, 3); // RX, TX
void setup(){
// Скорость консоли 9600
//
// выберете NL & CR
// NL новая строка
// CR возврат каретки
Serial.begin(9600);
// Скорость GSM модема
// в предидущем скетче мы узнали на какой скоросте работаем
// ставим сюда эту скорость в моем случае 115200
// Можно тупо подобрать на какой скоросте работает модем
// меняя скорость в этой строчке GSM_Serial.begin(115200);
// Установили скорость, залили скетчь. Отправили в сериал AT он ответит OK если скорость верна.
GSM_Serial.begin(9600);
}
void loop() {
// Если есть что то от модема, то выводим в монитор
if (GSM_Serial.available())
Serial.write(GSM_Serial.read());
// Если что то ввели в мониторе, то шлем на GSM
if (Serial.available())
GSM_Serial.write(Serial.read());
}
Checking
Checking GPRS AT + CGATT?
Result :+ CGATT: 1
Check external IP AT + CIFSR
The result: Error
So, I need to enable GPRS connection AT + CGACT = 1,1
The result is: ok
Check external IP AT + CIFSR
Result: 10.226.113.192
We test the connection to the server AT + CIPSTART = "TCP", "blynk-cloud.com", 80
Result: CONNECT OK
It turns out that the module works, but does not automatically connect to GPRS, but this is only an assumption.
Good afternoon!
I tried other examples, namely TinyGSM \ examples \ AllFunctions and as in the previous times there is an error when trying to connect to APN, but it is not clear why they are trying connect to APN when there is already an Internet connection
@Felix It turns out Goouuu Tech IOT-GA6 is not the same as AiThinker A6. Unfortunately IOT-GA6 is not supported yet.
There are some hints that IOT-GA6 firmware may be updated to match A6… But no one confirmed that up to my knowledge.