How to integrate mDash Platform with TinyGSM

Is it possible to use GPRS connectivity instead of Wifi for connecting a device (ESP32) with the mDash platform? In the mDash.h header there is no reference to Wifi.h, and so I am wondering whether the underlying calls use the Client.h classes? If so, is it possible, to set these up using TinyGSM so that the mDash device code can access the platform over GSM? Since there’s no access to the actual mDash.cpp file, its hard to understand how to proceed.

As of now I have tried simply setting up the TinyGSM library, for the Quectel M66 module, and ensured that GSM and GPRS connectivity was established. However, at the point when mDashBegin() is called I get a runtime error:
1970-01-01 00:00:39 I log.c:18:mg_log_set Setting log level to 1
assertion “Invalid mbox” failed: file “/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c”, line 374, function: tcpip_send_msg_wait_sem
abort() was called at PC 0x400ec04f on core 1

I would love to hear anyone’s suggestions, or criticism if I am approaching this issue incorrectly.

To anyone else who may have this issue, here’s what I have gathered so far.

The reason why the program was crashing was because mDash’s internal library accesses the TCP/IP stack of ESP32, which can be initialized by giving Wifi.begin(). Once, this statement was added, the program no longer crashed, and provided that the ESP32 didn’t connect to the last previously connected network, mDash will keep displaying DNS timeout errors.

So, mDash uses the internal lwIP TCP/IP stack of ESP32, and trying to use TinyGSM to configure this will require some reworking of the inner libraries (since as far as I know TinyGSM offloads the TCP/IP stack to the GSM module). However, the creator of TinyGSM itself suggests to use the PPP mode of the GSM since ESP32 has the lwIP library (Link).

Basically, in the early days PPP mode was used between modems and computers to establish a dial-up connection, and it is a standard set of protocols and commands that both the sender and receiver agree to. I do suggest you read about the basics of PPP mode. ESP32 has provided the PPP functionality, under the NETIF library. Do note, you will need to send the required AT commands to establish communication and configure the GSM module in PPP mode.

In the same post he has shared a very basic library (Link), which we had used and confirmed that mDash was finally able to connect over GPRS. Do note that this library needs some basic AT commands to be added in the PPPoS.cpp file.

Hope this helps someone!

1 Like