Connect and Publish Data to Google Cloud IOT Core using SIM800 MQTT TCP

Hello Sir!
I have followed your tutorial “MQTT Protocol tutorial using SIM900/SIM800 modules - MQTT over TCP” and it is working perfectly fine with my STM32L47RG board and SIM800. Can you please guide me about procedure to connect to google cloud iot core. What changes are to be done with my existing code of CloudMQTT.
Thanks in advance:)


You can take a look at the STM32 discovery board example which shows Google IOT cloud connection using Quectel module. You can use the same library and port it to SIM800.
I think its

1 Like

Sir , I have gone through this already it is NOT supportable for my STM32 version L47RG6 . So I am focusing more on creating packets for GCP just like you did in your tutorial.

GCP is complicated. You have to try to port this library to work on your MCU. The library should be compatible, STM32L47xx are very powerful MCU. And that library is also based on STM32L4xx series discovery boards.

1 Like

I have tried implementing that library for my board but my version is not included in it. I have created connect packet for GCP. I am receiving SEND OK response from modem. Where do I check my connect acknowledgement CONNACK response. I think problem is with my connect packet. Is this method will work for pushing data to cloud?

First thing you need to be successful is to use PC based socket test applications, Form the packets, get correct responses and then try the same with the GSM modules. I still havent experimented with TLS based connections on modules using TCP. So i cant say how exactly the responses will be. I am not sure whether the module decrypts the data before giving on terminal .

The code is very much compatible. Might need some minor tweaking. They are standard HAL libraries.
I am trying to use them for my upcoming board, but that will only start after 30 days.