Xinyuan-LilyGO / LilyGO-T-SIM7000G

LilyGO T-SIM7000G
https://pt.aliexpress.com/item/4000542688096.html
283 stars 123 forks source link

Connect MQTT securely Port 8883 #224

Open droidblastnz opened 1 year ago

droidblastnz commented 1 year ago

I see SIM7500_SIM7600_SIM7800 Series_MQTT(S)_Application Note_V3.00.pdf mentions the use of port 8883 over 1883.

Tiny_GSM doesnt seem to support this function - boolean mqttConnect() and there is not examples of how to achieve this.

Anyone had success and/or can share some code? Using a SIM7600G

nivoc commented 1 year ago

Tiny_GSM has a TLS-Mode but you have to set the right "define".

Use:

define TINY_GSM_MODEM_SIM7000SSL

Instead of

define TINY_GSM_MODEM_SIM7000

And than TinyGsmClientSecure client(modem);

Instead of TinyGsmClient client(modem);