Importing Google IoT core certificate to SIM868

Hello Community,

This is an important and critical topic, and there are not many documentations out there.

I am trying to connect SIM868 to my google IoT core, and I am able to send the CONNECT packet which is recognized by the IoT core, but the connection is closed immediately after.

But I skipped one step included on GCP IoT: https://cloud.google.com/iot/docs/how-tos/mqtt-bridge#downloading_mqtt_server_certificates

They say you need to " Downloading MQTT server certificates" onto your device for the IoT core to allow the communication. I thought that by simply having the CIPSSL=1 would work, but it doesn’t.

I did follow the instructions on the SIM800 Series SSL and FS document about assigning a SSL certificate, which goes as follows:

AT+FSCREATE=C:\USER\HENRY_SSL.CRT OK
Create certificate file on FS.
AT+FSWRITE=C:\USER\HENRY_SSL.CRT,0,1196,10 > OK
Write file to FS.
AT+SSLSETCERT=“C:\USER\HENRY_SSL.CRT”,"********" OK +SSLSETCERT: 0
Import certificate file Import succeed

However, the AT+SSLSETCERT step it always returns 1. I am not sure what the password should be. Or what is that I am doing wrong. I assigned the .cert file both insise the /user and also outside directory, still no luck.

@RaviPujar I saw on another post that you were attempting this. Any luck?

Anyone else on the community?

Thank you!

Update: I was able to set the certificate. In order to assign the certificate, make sure you create the certificate directly on “C:” and when you select it, just put the file name and no password. i.e ** AT+SSLSETCERT=sample.crt** and it returned 0, meaning it worked.

BUT I cannot confirm what I wrote into the file is correct.

The issue is when you do AT+FSWRITE=sample.crt,0,450,10 for example, and the only way to write is by copying and pasting in the command line after >.

Writing it goes fine, but the problem is I cannot confirm that what was copied, it was paste corerctly because the crt file that I get for Google IoT core it has symbols inside the file, and sometimes those symbols are not translated correctly into ASCII characters.

Any ideas?

Update.

I used QCOM software (made by quectel) to send a file via the serial interface to SIM868.

Simply after you do AT+FSWRITE=sample.crt,0,450,10

once the “>” appears, there is a tab where you select the file from your PC, and click send file. Make sure to specify the timeout long enough so you have time to locate and select your certification. Once is send, you will be able to see its written inside the memory.