MQTT client that works with Google IOT cloud



We are today using paho and this MQTT wrapper: developed by @dfrey and others to connect to our own mosquitto broker with TLS encryption.

But I’m now trying to connect to google’s mqtt bridge with TLS and JWT. But I get a socket error when trying to connect. Not sure how to investigate this further but I think this may be a clue?

Is there a known issue connecting to gcloud with sierra (WP85) and this wrapper or have someone made it work?


Hi @nilsarve,
If you are still looking for a solution, you could try this option:

Hope this helps


Looks great. Will check it out. :grinning:


Hi @NhonChu,
Did some testing today but could not connect to Google cloud platform.

First of all is there a type here?
Had to make it

openssl genrsa -out rsa_private.pem 2048

for google to accept my public key.

But when running

gmqtt session start
i get Failed:

Any help would be greatly appreciated!


Hi @nilsarve,

Thank you for reporting the typo (2048 instead of 2018) for the key generation.

Your device passed the SSL authentication steps, however for some reason the server rejects your mqtt connection request. Could you check these points :

  • is the device communication has been allowed ?

  • have you uploaded the public key certificate to Google IoT Core ? And have the app to selected the private key?



Did not build a system image but used the path option. Maybe I should try building a system image?


Thanks for the info.
You don’t need to build a system image, just the app.
I’ll try on WP85 and will let you know.


Hi @nilsarve,
I found the issue (side effect of memory optimization). It has been fixed, please retrieve the new mqttGeneric.h file and recompile all components.
Let me know if this solves your connection issue.


Thanks @NhonChu!
That solved it! :smiley:


Hi @nilsarve,
Great :ok_hand::grinning:
Thank you for reporting this.