Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auzure Iot MQTT SSL TLS 1.2 on SIM800 - needs "+SSLOPT=1,1" #428

Closed
better-adapted opened this issue Jul 31, 2020 · 7 comments
Closed

Auzure Iot MQTT SSL TLS 1.2 on SIM800 - needs "+SSLOPT=1,1" #428

better-adapted opened this issue Jul 31, 2020 · 7 comments

Comments

@better-adapted
Copy link

better-adapted commented Jul 31, 2020

This problem occurred on a

  • TTGO T-Call V1.3 ESP32 will a SIM800L
  • TinyGSM v0.10.7
  • Running MQTT code adapted from the example - for secure MQTT on TLS 1.2
  • TinyGsmClientSecure client(modem); Secure verison used
  • Azure Iot MQTT TLS 1.2 Hub

Testing to a CloudMQTT on a SSL port - all good working fine - but then i could not establish a connection to an Azure IoT MQTT server uing TLS1.2

in modemConnect() I have had to add
if (ssl)
{
sendAT(GF("+SSLOPT=1,1"));
rsp = waitResponse();
if (rsp != 1) {
return false;
}
}

just before
sendAT(GF("+CIPSSL="), ssl);

After that it worked great - its been on solid for 3 days now - good work

the star I just gave you brought you up to 1000 - no fireworks?

Should I raise a pull request for this - not sure if this is the exact place to put the patch - perhaps it would be better in setup code?

@better-adapted better-adapted changed the title Auzure Iot MQTT SSL on SIM800 - needs "+SSLOPT=1,1" Auzure Iot MQTT SSL TLS 1.2 on SIM800 - needs "+SSLOPT=1,1" Jul 31, 2020
@SRGDamia1
Copy link
Collaborator

Woah. I hadn't even noticed there were that many stars!

I added the code to the SIM800. Activate it by setting the pre-processor flag TINY_GSM_SSL_CLIENT_AUTHENTICATION. Look ok?

@better-adapted
Copy link
Author

yes that sounds good

@better-adapted
Copy link
Author

cheers i will be using it next week

@gsvitak
Copy link

gsvitak commented Oct 26, 2020

@better-adapted thanks for your post..

do you have a full sample to share? Maybe a Gist?

@better-adapted
Copy link
Author

I think it is now in the master - you can check my fork too

@kedzior-io
Copy link

@better-adapted
Hey, I'm struggling to get this working with Azure IOT Hub. Seems like you have it working.

Here is what I have:
https://github.com/kedzior-io/esp32-sim800l-tinygsm-azure-iot-hub-mqtt-ssl/blob/master/mqtt-azure.ino

Here is the error I'm getting:
kedzior-io/esp32-sim800l-tinygsm-azure-iot-hub-mqtt-ssl#1

Here is the device I'm using:
https://github.com/Xinyuan-LilyGO/LilyGo-T-Call-SIM800

Any idea?
Thanks!

@volant0098
Copy link

Thanks for share your trying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants