-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
TLS with mqtt #9
Comments
https://gist.github.com/Thalhammer/b60ccbe7d8777debd2ce43796791ce17 This is what I had as a not yet commited example. Not sure if it worked back than but it might be a good starting point. |
thanks! I will try it out, I'm trying to make it work with google cloud iot |
https://cloud.google.com/iot/docs/how-tos/mqtt-bridge#using_a_long-term_mqtt_domain Store CA list - SSL_Store from PEMs[2] CIPHER = "ECDHE-ECDSA-AES128-GCM-SHA256 sni_Name = mqtt.2030.ltsapis.goog Create JVT mqtt.password from your google private key If not have Qualcomm API bugs, MQTT will ok |
thank you! By JVT you mean JWT(JSON web token)? |
yes, sorry |
Giving an update to the situation: -Tried to connect to AWS cloud and wasn't successfull, converted the certificates with sharkssl and tried different combinations but nothing seems to work. The mqtt client connects but when it gets to the connect callback it gives "QAPI_NET_MQTT_CONNECT_FAILED_E", it looks like some sort of timeout operation happens. -Tried with AT commands without success too. Can't determine the causes, thought it was because of RTC not being up to date but concluded it's not, probably some bug with ssl and mqtt. So at this point im considering changing to another module. |
that`s mean:
Amazon-MQTT is very easy with ThreadX |
@mocasrhey How did you convert the certs ? I might look into it but I never found the tool to convert the certs into the required format. |
windows - 2 click - details - copy to file - export wizard .... to pem |
@Wiz-IO I know how to convert to pem, but the simcom modules use a different file format which is somehow property to their ssl stack. |
AWS - MQTT module API MQTT SSL basic config.... connect ... enjoy ps: basic ( qapi ) format is pem (text) |
They use sharkssl, you need to convert the CA file to binary format, the client certificate and private key combine into one binary file too. I downloaded the tool here: https://realtimelogic.com/downloads/sharkssl/ you then go into the bin folder and you have the tools to do that. |
yes i noticed that too, i used that function too but still nothing |
Forgot to mention, when i atribute more than 1 cipher the module crashes at "qapi_Net_MQTT_Connect()" function and reboots. |
crash is from other as NULL ssl_cfg.cipher[] max is 8, can be cleared ( example for Azure not need ) - tested... |
yes, even with only 2 ciphers it crashes. |
UPDATE 2
Seems like that the error in my code is that the certificates aren't being stored on the variables, will try to fix that. @Wiz-IO, @Thalhammer, thank you for your support, you guys are amazing 👍 |
👍 enjoy :) |
Hello guys I have an ESP32 LilyGo T-Call SIM800 Series module with GSM and I want to send messages from it to GCP's IoT Core, for this I have used two TinyGSM libraries and I take this code extract from the related post since I have tried to do almost exactly the same thing, with the same results
the return returned is: Settings incorrect or missing a cyper for SSL Thank you in advance in case any of those present in these post have managed to solve it @Wiz-IO I can have a more complete view of this piece of code or some further explanation, it is that especially in the final (begining in mqtt.secured()) part I do not know where the value of the variables comes from, many many tanks already: |
As anyone been successful using TLS on mqtt?
The text was updated successfully, but these errors were encountered: