mirror of
https://github.com/vshymanskyy/TinyGSM.git
synced 2026-05-15 04:06:10 +00:00
Testing updates for BG95SSL
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
@@ -40,6 +40,13 @@ jobs:
|
||||
TINY_GSM_MODEM_XBEE,
|
||||
TINY_GSM_MODEM_SEQUANS_MONARCH,
|
||||
]
|
||||
exclude:
|
||||
- modem: TINY_GSM_MODEM_BG95SSL
|
||||
example: examples/BlynkClient
|
||||
- modem: TINY_GSM_MODEM_BG95SSL
|
||||
example: examples/FileDownload
|
||||
- modem: TINY_GSM_MODEM_BG95SSL
|
||||
example: examples/MqttClient
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
@@ -225,7 +225,8 @@ void loop() {
|
||||
DBG("Phone number (USSD):", ussd_phone_num);
|
||||
#endif
|
||||
|
||||
#if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP
|
||||
#if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP && \
|
||||
not defined(TINY_GSM_MODEM_BG95SSL)
|
||||
TinyGsmClient client(modem, 0);
|
||||
const int port = 80;
|
||||
DBG("Connecting to", server);
|
||||
|
||||
@@ -117,6 +117,10 @@ TinyGsm modem(debugger);
|
||||
TinyGsm modem(SerialAT);
|
||||
#endif
|
||||
|
||||
#if defined(TINY_GSM_MODEM_HAS_SSL)
|
||||
#define USE_SSL
|
||||
#endif
|
||||
|
||||
#ifdef USE_SSL
|
||||
TinyGsmClientSecure client(modem);
|
||||
const int port = 443;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "TinyGsmModem.tpp"
|
||||
#include "TinyGsmSMS.tpp"
|
||||
#include "TinyGsmTCP.tpp"
|
||||
#include "TinyGsmSSL.tpp"
|
||||
#include "TinyGsmTemperature.tpp"
|
||||
#include "TinyGsmTime.tpp"
|
||||
#include "TinyGsmNTP.tpp"
|
||||
|
||||
@@ -115,9 +115,13 @@ TinyGsm modem(debugger);
|
||||
TinyGsm modem(SerialAT);
|
||||
#endif
|
||||
|
||||
#ifdef USE_SSL&& defined TINY_GSM_MODEM_HAS_SSL
|
||||
TinyGsmClientSecure client(modem);
|
||||
const int port = 443;
|
||||
#if defined(TINY_GSM_MODEM_HAS_SSL)
|
||||
#define USE_SSL
|
||||
#endif
|
||||
|
||||
#ifdef USE_SSL
|
||||
TinyGsmClientSecure client(modem);
|
||||
const int port = 443;
|
||||
#else
|
||||
TinyGsmClient client(modem);
|
||||
const int port = 80;
|
||||
|
||||
@@ -63,6 +63,7 @@ void loop() {
|
||||
modem.networkDisconnect();
|
||||
#endif
|
||||
|
||||
#if not defined(TINY_GSM_MODEM_BG95SSL) // no insecure client
|
||||
// Test TCP functions
|
||||
modem.maintain();
|
||||
TinyGsmClient client;
|
||||
@@ -90,6 +91,7 @@ void loop() {
|
||||
}
|
||||
|
||||
client.stop();
|
||||
#endif
|
||||
|
||||
#if defined(TINY_GSM_MODEM_HAS_SSL)
|
||||
// modem.addCertificate(); // not yet impemented
|
||||
|
||||
Reference in New Issue
Block a user