Skip to content

Commit

Permalink
Testing updates for BG95SSL
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <[email protected]>
  • Loading branch information
SRGDamia1 committed May 17, 2024
1 parent 4858785 commit 74734ef
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build_examples_platformio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion examples/AllFunctions/AllFunctions.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions examples/WebClient/WebClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/TinyGsmClientBG95SSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 7 additions & 3 deletions tools/Diagnostics/Diagnostics.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions tools/test_build/test_build.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -90,6 +91,7 @@ void loop() {
}

client.stop();
#endif

#if defined(TINY_GSM_MODEM_HAS_SSL)
// modem.addCertificate(); // not yet impemented
Expand Down

0 comments on commit 74734ef

Please sign in to comment.