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?
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?
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
@nilsarve How is this MQTT with Google IOT Cloud working for you? Did you notice any changes in your data costs not having to deal with the LWM2M registration?
@dbeckwith The google cloud solution consumed alot of data as the overhead is a bit rich so we send our data to a mosquitto broker and forward data to google iot cloud from our server.
Yes both solutions use TLS but google uses a long topic name but on top of that I have measured 403 bytes of overhead on every publish while I have measured this to 225 bytes on every publish to my mosquitto broker.
Might not sound like much but if you publish like every other minute every day 24/7 then you have alot of data. If you send big payloads but not so often it might not be a big issue.
@nilsarve Thank you for the example. I feel I’m still missing something on my part. Isn’t the certificates file device specific? If so how do you do produce units if the the certificates file is part of the build?
If you use the same certificate on all clients this will work but if you want to have a uniqe certificate then maybe you could use the config tree to store the certificate?