BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

I want to ai thinker a6 and a7 gsm-gprs-gps module support please

I want to ai thinker a6 and a7 gsm-gprs-gps module support please

Yes, it is one of the popular module series now, so it is on our roadmap.
We will add it, if it works fine.

Thanks… i am waiting

1 Like

I am also very interested in A7 hardware documentation.
If available, please send to tjanssen@chello.nl
The Netherlands

A6 and A7 are in alpha testing, please check latest examples of TinyGSM

@ellemoo I don’t know exactly what you are looking for but here is a link to the data sheet.

http://smart-prototyping.com/image/data/9_Modules/101756%20Wireless%20A6C/A6_A7_A6C_datasheet-EN.pdf

Hello vhymanskyy, mpo881

Thanks for your information, as a result I made some progress.
After pushing the red power button, I got the following A7 responce:

^CINIT: 1, 0, 0

^CINIT: 2, 32, 41891

^STN: 37

^CINIT: 4, 8192, 37

^CINIT: 8, 2048, 1

^CINIT: 16, 0, 1638420

^CINIT: 32, 0, 0

+CREG: 0

on a pc terminal program.
But sending an AT command did not resulted in a OK reply, as a Siemens TC35 does.
With a scoop I checked the A7 URXD pin voltage levels and saw a signal between 0 and 2.5 V,
I hope you have an idea.
Thanks

@ellemoo see if you find anything useful here. He pretty well covers the A7
https://www.youtube.com/watch?v=H7eBurjWC0k&t=4s

Let me know how it goes

Thanks

Hi Pusent,
I test gprs using blynk it working,Hope to help you
Can you see code below.

#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[] = "xxxxxxxxxxxxxxxxx"; //auth token blynk
const char apn[]  = "v-internet"; //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(11, 12); // 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();
}

Hallo,
I watched the video and my test setup looked more or less the same. Except I use a COM1 RS232 convector in staid of an USB convertor… I powered the A7 module via USB connected to a 2 amp wall adapter and the RS232 convertor with 3.3 volt. After pressing the red power button on the shield I got the following responce on a terminal program on a Windows PC.
^CINIT: 1, 0, 0
^CINIT: 2, 32, 41891
^STN: 37
^CINIT: 4, 8192, 37
+CREG: 3
^CINIT: 8, 2048, 1
^CINIT: 16, 0, 1638420
^CINIT: 32, 0, 0
+CREG: 0
+CTZV:17/04/03,10:52:28,+02
+CREG: 5
+CTZV:17/04/03,10:53:36,+02
+CIEV: “MESSAGE”,1
+CMT: ,28
I got no responce after AT enter(=crlf) inputs.
Sending an SMS test massage via mobile phone resulted in:
0791135604880101040B911316817090F00000714030213553800AD4F29C0EA297E5F533 that looks good. I think.
Sending a second SMS message resulted in rubbish:
< À< <Àü <À<<8<À<<8À<ÀÀüüÀü<8 ðÀ üÀü<8 ðÀüÀÀ <8 À ÀÀüÀ<üÀ üÀÀüÀ<üÀ À <8<À ÀÀÀÀ<
À< ÿ< À< <Àü <ÀÀ<<À<ø<<8À ÀÀ À<À<<À<À<üÀ<< p <<À<8ÀÀ <8 À< À< ü À< <Àü <üÀ<
My problem: A7 does not response in AT inputs, if even does not give an error message
I have a working system with a Siemens TC35 GSM module and a separate GPS receiver controlled by a PIC microprocessor. A7 has both in one and is smaller…

1 Like

I’m testing long term stability of my device (Arduino Pro Micro + A6 GSM/GPRS module + DS18B20 temperature sensor), but I have some problem with A6 module and Blynk.
It works, but only some limited time from few hours to about 20 hours, then blynk goes offline.
I read data from serial port, when it happened. ATmega sending data in loop:

AT+CIPCLOSE=255
AT+CIPCLOSE=255
AT+CIPSTART="TCP","blynk-cloud.com",8442
loop
AT+CIPSEND=255,37
AT+CIPCLOSE=255
AT+CIPCLOSE=255
AT+CIPSTART="TCP","blynk-cloud.com",8442
AT+CIPSEND=255,37
AT+CIPCLOSE=255
AT+CIPCLOSE=255
AT+CIPSTART="TCP","blynk-cloud.com",8442
AT+CIPSEND=255,37
AT+CIPCLOSE=255
AT+CIPCLOSE=255
AT+CIPSTART="TCP","blynk-cloud.com",8442
AT+CIPSEND=255,37
AT+CIPCLOSE=255
AT+CIPCLOSE=255
AT+CIPSTART="TCP","blynk-cloud.com",8442
AT+CIPSEND=255,37
...

but A6 replies:

ERROR
ERROR
ERROR
....

After ATmega328 reset, it sends AT+RST=1 and A6 module “wakes-up” and establishes connection again and library does the all other good job.

Serial dump
AT+RST=1
ATE0
...
ATE0
AT&FZE0
AT+CMEE=0
AT+CPIN?
AT+CPIN?
AT+CPIN?
ATE0
AT&FZE0
AT+CMEE=0
AT+CPIN?
AT+CPIN?
AT+CREG?
...
AT+CREG?
AT+COPS?
AT+CIPSHUT
AT+CGDCONT=1,"IP","internet"
AT+CSTT="internet","",""
AT+CGACT=1,1
AT+CGATT=1
AT+CIPMUX=1
AT+CIPCLOSE=255
AT+CIPCLOSE=255
AT+CIPSTART="TCP","blynk-cloud.com",8442
AT+CIPSEND=255,37
AT+CIPCLOSE=255
AT+CIPCLOSE=255
AT+CIPSTART="TCP","blynk-cloud.com",8442
AT+CIPSEND=0,37 65d8c01e4e2c453abxxxxxxxxxxxxxxx
AT+CIPSEND=0,106 ever 0.4.7 h-beat 60 buff-in 256 dev Arduino Pro cpu ATmega328P con SIM800 build Apr 28 2017 12:45:19 
AT+CIPSEND=0,16  vw 0 21.625
AT+CIPSEND=0,16  vw 0 21.625

Code is based on sample from @vshymanskyy TinyGSM lib with some modifications- SerialAT port changed to Serial (hw port of ATmega328), added DS sensor reading and blynk value updating functions

All programm CODE
// Deleted few unused code lines
// 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_A6

#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>

#include <OneWire.h>            // For DS18B20 1-Wire thermometer
#include <DallasTemperature.h>  // For DS18B20 1-Wire thermometer

// You should get Auth Token in the Blynk App.
const char auth[] = "65d8c01e4e2c453ab1xxxxxxxxxxxxx";

// Your GPRS credentials Leave empty, if missing user or pass
const char apn[]  = "internet.lmt.lv";
const char user[] = "";
const char pass[] = "";

// Hardware Serial on Mega, Leonardo or Software Serial on Uno, Nano, Micro
#define SerialAT Serial

TinyGsm modem(SerialAT);      // Lib GPRS modem

BlynkTimer timer;             // Used for regular Temperature reading

#define ONE_WIRE_BUS 2        // Data wire GPIO 2 on the Arduino
OneWire oneWire(ONE_WIRE_BUS);  // Setup a oneWire

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

#define LED 13
boolean stat;   // test blynk led every sensor reading update

void UpdateSensorReadings()       // F() - Reading T and update to Blynk
{
  sensors.requestTemperatures();
  float t = sensors.getTempCByIndex(0);
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V0, t);
  // if the LED is off turn it on and vice-versa:
  if (stat == LOW) {
      stat = HIGH;
    } else {
      stat = LOW;
    }
  digitalWrite(LED, stat);  //blink LED
}

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

  Blynk.begin(auth, modem, apn, user, pass);

  // Start up the library
  sensors.begin();

  // Setup a function to be called every second
  timer.setInterval(5000L, UpdateSensorReadings);

   pinMode(LED, OUTPUT);
}

void loop()
{
  Blynk.run();
  timer.run();
}

If anyone wants to know - it uses only about 2MB/day to update blynk temperature measurements every 5 seconds.

I’m very interested in blynk project but my programming skills could be better :smiley: and it could take very long time to understand what TinyGSM lib does :smiley:

I can try with Mega2560 and Serial1 port, but I don’t think it really matters.
Maybe anyone can look at this lib and tell, where make changes to properly handle the error sequence from A6 and reset it?

Any help, any ideas would be appreciated to make blynk and TinyGSM even better!

I am also facing the same issue, did found the problem? could you please share your hardware connection details ?
awaiting for your reply :slight_smile:

Facing the same problem have you discovered any solution ?