Who's willing to try Blynk with GSM modules?

@vshymanskyy, Dear Volodymyr,
I am using the icomsat 1.1 SIM900 GSM with arduino Mega. I tried the tests with AT_Debug.ino, and I did not succeed. I thought it was my SIM900.

Serial Monitor appears:

Autodetecting baud rate
Trying baud rate 115200… fail
Trying baud rate 9600… fail
Trying baud rate 57600… fail
Trying baud rate 19200… fail
Trying baud rate 74400… fail
Trying baud rate 74880… fail


Module does not respond!
Check your Serial wiring
Check the module is correctly powered and turned on

but I tried sending sms with another code and it worked. Do you know if you have any problems with icomsat 1.1 SIM900 GSM.
Follows the code used for sms.

#include <SoftwareSerial.h>

SoftwareSerial gsm(50, 3);

void setup()
{
  gsm.begin(9600);
  Serial.begin(9600);

  Serial.println("Type 'a' and hit Enter to send the test sms");
  Serial.println("Note: Enter only the letter without the single quotation marks.");
}

void loop() // run over and over
{
  char comando = Serial.read();

  if (comando == 'a') {
    enviaSMS();
  }

}

void enviaSMS() {
  gsm.print("AT+CMGF=1\r"); // Sets sms as text mode
  delay(500);
  gsm.println("AT+CMGS=\"+551499326984\"\r"); // Send command + destination phone number
  delay(500);
  gsm.println("Teste arduino\r"); // Text for the message
  delay(500);
  gsm.println((char)26);// End the commands and send the sms
  delay(500);
  Serial.println("SMS Sent with success");
}

Hi all, here is the new release:

Be sure to completely remove old versions of libraries, and use those from release package.
Thx.

@vshymanskyy
I have two sim900A sheilds .Does this supported hardware for Blynk??

Yes, should work

I’m in. How about the A6 and the A7 with GSM and GPS?

@vshymanskyy Hi I have the same shield Adafruit Fona 808 GSM/GPRS module. Please inform when the platform is ready for testing thanks a lot.

Any sim 900 or 800 series should work!
A6, A7, M590E - in future I hope, when we test it.

I will! I have used a SIM800 module with Arduino. I would like to use it with Blynk too!

Just try it-it isalready released.

But at least for me doesn’t work now (the BLYNK example)… Some strange things happens there. Were able to successfully run WebClient example though.

I already bought a sim800l module. I started compiling the sketch that already comes ready inside the “Boards_GSM” folder of the blynk library called “SIM800_SIM900” and a compilation error occurred (I’m using Arduino Mega):

Exit status 1
No matching function for call to ‘TinyGsm :: GsmClient :: GsmClient (HardwareSerial &)’

Does anyone know how to fix this?

PS:The code:

//#define BLYNK_DEBUG
#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

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

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[]  = "YourAPN";
char user[] = "";
char pass[] = "";

// Hardware Serial on Mega, Leonardo, Micro
#define GsmSerial Serial1

// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial GsmSerial(2, 3); // RX, TX

TinyGsmClient gsm(GsmSerial);

void setup()
{
  // Set console baud rate
  Serial.begin(115200);
  delay(10);

  // Set GSM module baud rate
  GsmSerial.begin(115200);
  delay(3000);

  // Restart takes quite some time
  // You can skip it in many cases
  Serial.println("Restarting modem...");
  gsm.restart();

  Blynk.begin(auth, gsm, apn, user, pass);
}

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

I get ‘gsm’ was not declared in scope against the below

gsm.restart();

I’ve just deleted it and it seems to compile ok. will see if it works…

Try the BlynkClient from TinyGSM lib example. It compiles (it is slightly different) but for me it doesn’t work either. It can’t connect with internet after calling AT+CSTT=... I’m working on it by myself, but as for now - no joy.

ok, it compiled… it uploaded to the board… and I have a steady blink every 3 seconds on my linksprite sim900 shield which implies it found a network and joined the APN, but the Blynk app is saying the Arduino Uno is offline. How best do I go about troubleshooting this ?

Please check this out: http://tiny.cc/tiny-gsm-readme

  • try WebClient example.

Thanks Marvin 7 for the advice. I tried the BlinkClient but I did not succeed in compiling either. Apparently it will have to be created from the outside the library examples.

No, the example indicated compiles fine! What board?
And check Blynk lib in library repository in Arduino IDE. I don’t know why, but it informed me about awaiting updates and among other there was a Blynk library. Updating this way helped.

Thank you again, I got it wrong, sorry. My board is Mega and module SIM800L. I updated the Blynk library inside the Arduino IDE and I compiled and received the error similar to that of Evan_Urue on ‘gsm was not declared’ in gsm.restart. I commented on this line and compiled it successfully. I’ll test tomorrow to see if it will work in the module.

@Shaymon_Alvarez , @Evan_Unrue - please change this to:

modem.restart();

Sorry I don’t know how it went through our regular build checks.

Ok, after certain problems with making SIM900 to work with Blynk, now I want to share some experience:

  1. Yes, IT DOES WORK! And this is very good information for everyone who (like me) is trying to monitor isolated destinations.

  2. Use latest available library (Our developer @vshymanskyy is still improving it. The latest available is at https://github.com/vshymanskyy/TinyGSM

  3. I have used (modified for needs) example from TinyGsm library branch (BlynkClient). The one from Blynk branch have (or had?) some errors (compile error). Keep in mind the above note from @vshymanskyy, regarding modem.restart()

  4. Handling PIN-LOCKED SIM is supported too, just call: modem.simUnlock("xxxx"); after modem.restart();

  5. When using SoftwareSerial library, do not use (defaulted) BaudRate of 115200. It does not work correctly. I lowered it to 38400 and seems to be OK now.

  6. Remember - IT IS GSM, and usually there are limited data packet. Keep it in mind when choosing updating interval (usually there is no need to update data every 1sec)

  7. I’m still testing new connection method, but using simple project results in quite stable connection, although for 3 hours running time i had 5 reconnection attempts to Blynk server.

Good Luck! :slight_smile:

3 Likes