Issues with T-Call ESP32 SIM800L

So i recently just started testing my new T-Call ESP32 SIM800L but no matter how much i format the default GSM Blynk sketch i never get it to compile without error.
Right now the sketch is giving me the 'Blynk' was not declared in this scope error.
Here is my sketch in its entirety.

• T-Call ESP32 SIM800L
• Smartphone OS (Android)
• Blynk cloud


#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space



// GPRS credentials, if any
const char apn[]  = "glosecure";
const char gprsUser[] = "secure";
const char gprsPass[] = "secure";

// SIM card PIN (leave empty, if not defined)
const char simPIN[]   = ""; 

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

// TTGO T-Call pins
#define MODEM_RST            5
#define MODEM_PWKEY          4
#define MODEM_POWER_ON       23
#define MODEM_TX             27
#define MODEM_RX             26
#define I2C_SDA              21
#define I2C_SCL              22



// Set serial for debug console (to Serial Monitor, default speed 115200)
#define SerialMon Serial
// Set serial for AT commands (to SIM800 module)
#define SerialAT Serial1

// Configure TinyGSM library
#define TINY_GSM_MODEM_SIM800      // Modem is SIM800
#define TINY_GSM_RX_BUFFER   1024  // Set RX buffer to 1Kb


#include <Wire.h>
#include <TinyGsmClient.h>

#ifdef DUMP_AT_COMMANDS
  #include <StreamDebugger.h>
  StreamDebugger debugger(SerialAT, SerialMon);
  TinyGsm modem(debugger);
#else
  TinyGsm modem(SerialAT);
#endif

// I2C for SIM800 (to keep it running when powered from battery)
TwoWire I2CPower = TwoWire(0);

// TinyGSM Client for Internet connection
TinyGsmClient client(modem);


void setup()
{
  // Set console baud rate
  SerialMon.begin(115200);
  

    // Set modem reset, enable, power pins
  pinMode(MODEM_PWKEY, OUTPUT);
  pinMode(MODEM_RST, OUTPUT);
  pinMode(MODEM_POWER_ON, OUTPUT);
  digitalWrite(MODEM_PWKEY, LOW);
  digitalWrite(MODEM_RST, HIGH);
  digitalWrite(MODEM_POWER_ON, HIGH);

  // Set GSM module baud rate and UART pins
  SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX);
  delay(3000);

  // Restart SIM800 module, it takes quite some time
  // To skip it, call init() instead of restart()
  SerialMon.println("Initializing modem...");
  modem.restart();
  // use modem.init() if you don't need the complete restart

  // Unlock your SIM card with a PIN if needed
  if (strlen(simPIN) && modem.getSimStatus() != 3 ) {
    modem.simUnlock(simPIN);

  

   String modemInfo = modem.getModemInfo();
  SerialMon.print("Modem Info: ");
  SerialMon.println(modemInfo);
  Blynk.begin(auth, modem, apn, gprsUser, gprsPass);
 }
}
void loop()
{
  Blynk.run();
 SerialMon.print("Connecting to APN: ");
  SerialMon.print(apn);
  if (!modem.gprsConnect(apn, gprsUser, gprsPass)) {
    SerialMon.println(" fail");
  }
  else {
    SerialMon.println(" OK");
  
 }
}

You must not have any Blynk library included.

1 Like

Yep, as @daveblynk has spotted you probably need to add #include <BlynkSimpleTinyGSM.h> to your sketch.

Pete.

Yes, @daveblynk’s suggestion removed the error.
Here’s what my serial monitor looks like now… what do you make of it?

iv:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Initializing modem...
[5649] Connecting to 0.0.0.0
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1442 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x40088471 on core 1

Backtrace: 0x4008bff0:0x3ffb1d30 0x4008c221:0x3ffb1d50 0x40088471:0x3ffb1d70 0x400fc022:0x3ffb1db0 0x400fc222:0x3ffb1dd0 0x400ee688:0x3ffb1df0 0x400ee6f1:0x3ffb1e10 0x400eb88e:0x3ffb1e30 0x400ea718:0x3ffb1e50 0x400edf0c:0x3ffb1e90 0x400d3c82:0x3ffb1eb0 0x400d367a:0x3ffb1f00 0x400d2785:0x3ffb1f30 0x400d2f8e:0x3ffb1f60 0x400d31c4:0x3ffb1f90 0x400d4ef1:0x3ffb1fb0 0x40088785:0x3ffb1fd0

At a guess, I’d say that it can’t resolve your APN.

Pete.

Okay then. I’d have to search for the apn that will work.

I peered more into the problem and found out that the default sim800L library did not work with Blynk, at least not for me. Was lucky enough to find a repo that worked out of the box. find it here

I think you probably mean ‘sketch’ rather than ‘library’.

Pete.

did you manage to get it right? because i am battling with the same issue now

Use either one of these 2 libraries designed for TTGO-TCALL

Check the previous posts here such as