Page 1 of 1

GPRS Client on arduino

Posted: 22. Jan 2020, 18:58
by lcorrea
Hi, I´m trying to use pushsafer on arduino with sim800L module.

I have a gprs connection active, but I´m not sure how I have to declare the push safer on my sketch.

On Pushsafer example on ESP8266WiFi, we have the WIFI client declared:

/*WiFiClientSecure client;*/
WiFiClient client;

then:
Pushsafer pushsafer(PushsaferKey, client);

but on gprs I have not this...

How can I proceed?

Thanks in advance!

Re: GPRS Client on arduino

Posted: 23. Jan 2020, 22:08
by admin
instead the WiFi Client as client you have to use the GSMClient as client wit GPRS access.

https://www.arduino.cc/en/Tutorial/GSMToolsTestGPRS

Re: GPRS Client on arduino

Posted: 26. Jan 2020, 16:53
by salvq123
See example I use and just works

Code: Select all

.....
#include <Pushsafer.h>
#define PushsaferKey "your_key"
.....
GSMClient     gsmClient;            // Used for the TCP socket connection
Pushsafer pushsafer(PushsaferKey, gsmClient);
.....

pushNotification("GSM", "Reconnect");

void pushNotification(char* title, char* message) {

  struct PushSaferInput input;
  input.message = message;
  input.title = title;
  input.sound = "";
  input.vibration = "1";
  input.icon = "2";
  input.iconcolor = "#FFCCCC";
  input.priority = "1";
  input.device = "a";
  input.url = "";
  input.urlTitle = "";
  input.picture = "";
  input.picture2 = "";
  input.picture3 = "";
  input.time2live = "";
  input.retry = "";
  input.expire = "";
  input.answer = "";

  pushsafer.sendEvent(input);
}

Re: GPRS Client on arduino

Posted: 26. Jan 2020, 21:24
by admin
8-) great!