Add SSL example
This commit is contained in:
@@ -25,6 +25,9 @@
|
|||||||
// Uncomment this if you want to see all AT commands
|
// Uncomment this if you want to see all AT commands
|
||||||
//#define DUMP_AT_COMMANDS
|
//#define DUMP_AT_COMMANDS
|
||||||
|
|
||||||
|
// Uncomment this if you want to use SSL
|
||||||
|
//#define USE_SSL
|
||||||
|
|
||||||
// Set serial for debug console (to the Serial Monitor, default speed 115200)
|
// Set serial for debug console (to the Serial Monitor, default speed 115200)
|
||||||
#define SerialMon Serial
|
#define SerialMon Serial
|
||||||
|
|
||||||
@@ -45,7 +48,6 @@ const char pass[] = "";
|
|||||||
// Server details
|
// Server details
|
||||||
const char server[] = "vsh.pp.ua";
|
const char server[] = "vsh.pp.ua";
|
||||||
const char resource[] = "/TinyGSM/logo.txt";
|
const char resource[] = "/TinyGSM/logo.txt";
|
||||||
const int port = 80;
|
|
||||||
|
|
||||||
#ifdef DUMP_AT_COMMANDS
|
#ifdef DUMP_AT_COMMANDS
|
||||||
#include <StreamDebugger.h>
|
#include <StreamDebugger.h>
|
||||||
@@ -55,7 +57,13 @@ const int port = 80;
|
|||||||
TinyGsm modem(SerialAT);
|
TinyGsm modem(SerialAT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TinyGsmClient client(modem);
|
#ifdef USE_SSL
|
||||||
|
TinyGsmClientSecure client(modem);
|
||||||
|
const int port = 443;
|
||||||
|
#else
|
||||||
|
TinyGsmClient client(modem);
|
||||||
|
const int port = 80;
|
||||||
|
#endif
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
// Set console baud rate
|
// Set console baud rate
|
||||||
|
Reference in New Issue
Block a user