I have an AI Thinker A7 module connected to n Arduino Mega 2560 R3. I have loaded a sample sketch that I found in this community
#define BLYNK_PRINT Serial
#define TINY_GSM_MODEM_A7 //gsm A7
// 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>
#include <SimpleTimer.h>
const char auth[] = "blah blah blah"; //auth token blynk
const char apn[] = "blah blah blah"; //apn mobile
const char user[] = "";
const char pass[] = "";
// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial1
// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(6,7); // RX, TX
TinyGsm modem(SerialAT);
// Select your pin with physical button
const int Relay1 = 13; //relay pin 13 arduino
WidgetLED led3(V3); //v3 in wiget blynk
SimpleTimer timer;
// V3 LED Widget represents the physical button state
boolean btnState = false;
void buttonLedWidget()
{
// Read button
boolean isPressed = (digitalRead(Relay1) == LOW);
// If state has changed...
if (isPressed != btnState) {
if (isPressed) {
led3.off();
} else {
led3.on();
}
btnState = isPressed;
}
}
void setup()
{
// Debug console
Serial.begin(19200);
// Set GSM module baud rate
SerialAT.begin(19200);
delay(3000);
// Restart takes quite some time
// To skip it, call init() instead of restart()
modem.restart();
// Unlock your SIM card with a PIN
//modem.simUnlock("1234");
Blynk.begin(auth, modem, apn, user, pass);
// Setup physical button pin (active low)
pinMode(Relay1, INPUT_PULLUP);
timer.setInterval(500L, buttonLedWidget);
}
void loop()
{
Blynk.run();
timer.run();
}
I also used the AT Debug tool to verify that I had the correct baud rate…
I attempt to connect to the cloud and everything goes great until I keep getting booted for Invalid Auth Token. I have verified, refreshed and re-tried a couple of Auth Tokens with the same results.
I searched the forum and found mostly info pertaining to wifi or blutooth boards. Nothing related to Invalid Auth Tokens and A7. So, I am at a loss and looking for help. I am not sure if it has to do with the library or something I have missed? I tried using the same sim card with a SIM800l without success. I am able to connect an Electron to Blynk cloud with the same sim card.
LOL no it contains a real token and a real APN. The reason I cannont enter it in your link is because it is HTML and there is no provision to type it in.
Ok well I figured out what you are talking about by copying the link in a new browser and replacing TOKEN with the token. Now I can see when I created the project, etc
Your A7 must be connecting to a different server. In the app move the slider at the login page and change blynk-cloud.com to the IP and you should be good to go.
You might need to ping from the A7 to be sure you have the correct IP address and you might also need to create a new account on that particular Blynk server.
Well I tried the custom IP and got the same results. The thing that I dont understand is that it is trying to connect to port 8442 in the serial monitor regardless if I use BLYNK or CUSTOM in the slider yet when I choose CUSTOM I am given the option of port 8443. If I change that to 8442 the app complains about the server being busy.