Edgent example for TTGO T-Call GSM board?

Hi @vshymanskyy I have a project where I’d like to use Blynk.Air as a way to update an ESP32 TTGO T-Call board connected via GSM.

I’m a bit lost about where to start integrating TinyGSM into the ESP32 Edgent example sketch, and was wondering if you had any Edgent GSM examples in the pipeline before I went any further?

I guess you might get a few others asking the same thing, as the Blynk website currently says…

image

Thanks in advance!

Pete.

1 Like

Yes actually we have this already.
I’ll be re-testing and releasing this soon.
But this will be based on static token provisioning (and it somewhat relies on Static Token Management improvements, which are not ready yet).

3 Likes

Thanks, glad I asked!

I’m not worried about static token provisioning, I’d prefer that anyway, it’s the remote firmware updating via Blynk.Air that I’m interested in.

Pete.

1 Like

There are multiple flavours of TTGO T-Call. Which one are you using?

Didn’t realise there were multiple flavours.

Mine’s the one that says “BLYNK_V1.3” on the front.
It has a SIM800L modem and ESP32 WROVER-B chip.

PIn definitions are:

#define LED_GPIO             13
#define LED_ON               HIGH
#define LED_OFF              LOW

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

Does this help?

Pete.

Ok, thanks. I’ll be testing with this one then.

2 Likes

I also have working TTGO ESP32 WROVER / Simcom 7000G hardware (and various other Simcom 7080G-based stand alone modem only hardware) that connects to the cloud via both TinyGSM and and also the Blynk with the current Blynk library successfully now. I am perfectly willing to test on those boards and report back if you want to provide that Edgent GSM example (like the ESP32 one) that connects similarly to the way base Blynk library for GSM does, even in an unfished / untested form. I have already looked into modifying the BlynkSimpleEsp32.h and BlynkSimpleESP32_SSL.h ESP Wifi / Wifi SSL source to try and make such a Edgent GSM implementation, by essentially spoofing a successful Wifi connection and setting the Blynk state to Mode_Running and perhaps the Wifi status to WL_Connected when the Edgent.begin() call is made in the sketch, but I am not confident that my approach is valid. With even a partial example of a GSM example for Edgent that shows the approach, I am pretty sure I can make it work. Thank you in advance.

Hi all, I am interested into this too. Actually doing some testing with T-Call 1.4 and as per Pete mentioned, It would be fantastic to upload OTA firmware via GPRS on those remote locations where the is no high bandwidth connection.

Any update?

1 Like

Following…

Hello, I am interested in this. I have a ttgo esp32 sim7000g unit. I could not use it with blynk. Please take care of this device. It has a lot of features, such as GPS, support for 2g, 3g, 4g, and a memory card. All of this is combined in one device. I also want to allocate a code for it with blynk examples.

1 Like

@vshymanskyy Can we please get example code of Edgent with esp32 and GSM for OTA firmware updates? I cannot find anything in the documentation.

We are looking to use the SIM7600.

Thank you!
David

1 Like

I tried to implement this function myself, and failed. here is my findings;

In order to start the updated process you need three libraries; first of course the Update library provided by esp32 core, second; an http client library to perform the GET request from the provided OverTheAirUrl and to pass a stream object to the Update library that stream shall contain the body of http response and the body length in Bytes should be known in advance and also been passed to the update library, the third is a communication client to be used by the http client and to handle the network layer.

First issue; the HttpClient library used at edgent example is provided by esp32 core library and only uses by default wifi as the communication client, that’s why we don’t see any communication client declared in the example, also the library does not accept any communication client in its constructor, the wifi client is declared by the library itself inside the constructor.
So; we need an http client that accepts a communication client within its constructor, I found those two libraries and tested them with no success.

  1. ArduinoHttpClient library.
    this library is also used in TyniGsm example
  2. HttpClient library.

Both of two libraries failed to get a success response code from Blynk server, the first one always return -1 from its .get(path) function, the second also returns -1 from its .get(hostName, path) function.
Second issue; both of this two libraries returns the response body as a String not Stream object which is required by the Update.writeStream() function, I would tried to solve this if I’ve got a success response code on GET request at first.

  1. Arduino-SIM800L-driver library.
    this third library interfaces directly with SIM800L, I didn’t test it. instead I tried working with SIM800 AT commands as follows:

based on this guide, I managed to get a success response code (200) from Postman echo service, also managed to return the response body as a stream object directly from the SIM800 serial connection, But failed to replicate that with the OverTheAirUrl, the AT+HTTPACTION=0 command always return this: +HTTPACTION: 0,602,0 which means I performed your http action 0 (= GET) and got an http response code # 602 with size 0, some times i get 601 or 603. all this are not a standard http response codes, my best guess is that SIM800 didn’t receive any response at all, on the other hand with Postman echo URL I get +HTTPACTION: 0,200,xx where xx is the response size and the followed command (AT+HTTPREAD) returns the response body.

hope that helps someone…
Ibrahim.

2 Likes

I’ve not done any testing with this for over a year, and nothing with Blynk.Air, but I did manage to get a setup that works for HTTP updates over a GSM connection.
I was putting the firmware files onto my own HTTP server and using port forwarding and a DDNS server to make then publicly visible.

I used the TinyGsmClient.h and BlynkSimpleTinyGSM.h and I think I had to use an older version of the ESP32 core, but I can’t find my notes on it at the moment.

Relevant snippets of code are:

TinyGsm modem(SerialAT);
TinyGsmClient client(modem);
  HTTPClient httpClient;
  httpClient.begin(upgrade_path);
  int httpCode = httpClient.GET();
  if( httpCode == 200 ) 
  {
    // handle the upgrade here....

This was based on this post from @mikekgr

Pete.

Hi Pete,
Both @mikekgr post and your snippet uses HTTPClient library. No way for this library to manage any HTTP request over GSM, even the constructor here:

Do not refer to any communication method, because it uses esp32’s wifi - as obvious from library’s src file here:
the .begin() function used here boils down to another .begin() that takes a WiFiClient as input parameter.
Yes the board was connected to Blynk over GSM, but the Update should have been performed over wifi.

I think that’s why an earlier version of the ESP32 client was used.
My OTA updates weren’t being done over WiFi when using this code, I can guarantee that.

The modem client is used in the httpClient.begin command in both my code and Mike’s…

httpClient.begin( client, fwVersionURL );

Pete.

1 Like

well, unfortunately I tried this call and got a compilation error:
no matching function for call to 'HTTPClient::begin(TinyGsmClient&, String&)'
I will try to rollback to older esp32 cores later.

Thanks…

Hello! Something new about GSM connection?

HI SIR , I NEED SAMPLE CONNECTING CODE FOR TTGO ESP32 WROVER-B BOARD
WITH NEW BLYNK 2.0, there is no code for new blynk2.0 with TTGO -ESP32 GSM/GPRS BOARD. PLEASE UPDATE ASAP. aimstec24@gmail.com

@AIMSTEC24 it doesn’t work like that!
Blynk’s main priorities are to service their white label customers, and to follow a planned development path.

@vshymanskyy is a Ukrainian, living in the Ukraine, and he and his family have suffered some significant personal and financial losses as a result of the Russian invasion. Adding GSM examples for Edgent are probably fairly low on his list of priorities at the moment.

Pete.

2 Likes

SIM900 works good on NodeMCU at Blynk application with following codes;

#include <BlynkSimpleEsp8266.h>
#include <ESP8266WiFi.h>
#include <SoftwareSerial.h>
SoftwareSerial SIM900(5, 4);

void setup ()
 {
//with other setup codes like ssid, pass etc
  SIM900.begin(4800);
  delay(1000);
}

But the above codes for SIM900 do not respond in Edgent example! Is there any solution to this issue?

Regards