vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.91k stars 708 forks source link

how to add ssl/tls to TinyGsmClient object. #713

Open narangmayank opened 1 year ago

narangmayank commented 1 year ago

I want to connect to secure MQTT broker and that requires me to set the certificates, Earlier I was using Wi-Fi to connect my esp32 to broker with WiFiClientSecure library but now I am planning to achieve the same thing with GSM.

I found this library easy to use and I have setted up the modem quicly, just checking the SSL/TLS part now.

For reference, I am using TTGO SIM7600 module and arduino-esp32 framework.

any help will be much appreciated.

SRGDamia1 commented 1 year ago

https://github.com/vshymanskyy/TinyGSM/blob/master/examples/HttpsClient/HttpsClient.ino

narangmayank commented 1 year ago

I have gone through the example code but couldn't figure out where to set the https certificates.

cezarg1410 commented 1 year ago

If You still use esp32, You can achieve that with that library https://github.com/govorox/SSLClient Combined with tinygsm and Your mqtt client

narangmayank commented 1 year ago

Yeah, that works fine. do you know any alternative method/library by any chance?