+QMTOPEN: 0,-1 error

Hello. I have an issue with AT+QMTOPEN command. When I send it I got +QMTOPEN: 0,-1
Here is log below



[2020-02-19_15:43:40]+COPS: 0,0,“vodafone TR”,0


[2020-02-19_15:43:43]+QFLST: “cert.pem”,1224
[2020-02-19_15:43:43]+QFLST: “key.pem”,1675
[2020-02-19_15:43:43]+QFLST: “root.pem”,1188









[2020-02-19_15:44:08]+QSSLCFG: “ignorelocaltime”,1,1


[2020-02-19_15:44:24]+QMTOPEN: 0,-1

Dear Sir,
Thanks for your inquiry in Quectel forum.
About your issue, please make sure the MQTT server you used is normal, you can try to change another server to have a try. And, you also can double check whether the certificate you used is correct, and whether the network is normal now. Thanks!

Dear Sir,
I mean that whether the network of your server is normal, and other client whether can connect to server normally.
The CSQ is not bad, and it is no need to choose the operator. You can try to connect the TCP server to confirm whether the network you used is normal. Thanks!

I couldnt setup even TCP server. It gives me same error. I tried setup new aws certificates. I tried to use QNavigator. Noting fixed my problem. Can you give me full at ommand for mqtt normal or with ssl? Or Do you know any video link about it? Like tell how to set aws pem files. Mine at command set didnt work

Dear Sir,
Please check the following document about how to test MQTT with SSL. Hopefully it is useful to you. Thanks!
GSM MQTT AT Logs.pdf (51.5 KB)
Please note, it is just an example, the certificate file and the server address should use your’s. Thanks!

Should I add \ r at the end of lines?

like this picture before send

It is better not add such character at the lend of lines. Thanks!

I fixed the problem. Thx. I read these 3 files that in memory. Private_key wasnt correct. One “-” were missing. Thx again for helping.

Got it. Thanks for your updating. Thanks!

Hi alikemalaldogan,
I am also facing the same issue. Did you add \r at the end of line in certificate

Sivanantham A

@sivanantham if you send using with terminal via uart with At commands it, you shouldnt add . if you send from a c code you should add \r. Also check with file commands what you added. When you show text file as hex file you will see \r mean 0x0A. If you need help you can add me linkedn.

Hi alikemalaldogan,

Thank you for your input. I tried with \r on each line for one iteration then \n on each line for 2nd iteration and \r\n on 3rd iteration. But I ended up getting same error. I am able to see the files through FWDL command. I am using EG25G module

@sivanantham Do you work with AT commands using with a kind of terminal program? or are you trying to write a code? if you use terminal you cannot change key with add \r\n. Open your key file and try to show them as hex file. You will see 0A datas at the and of the lines. Also try file at commands to read key that you added inside of EG96. Copy keys that response of AT+QFREAD=" "(for BG96) and paste it somewhere which you can see as hex format. They should be %100 equal each other.

HI alikemalaldogan,
Thanks for the response.I am writing in C code I will Check and come back on this I was reading the Key files back using AT+QFDWL file and it looks fine

HI alikemalaldogan,
Now the issue was resolved. I was sending one of the configuration in other commands. Thanks for your comment to add \r in the certificate

Sivanantham A

No problem. I am happy to help to fix your problem.

HI @alikemalaldogan
I’m using the EC25 module.
But… When I tried connecting to Amazon, I also can see return message +QMTOPEN:0-1…

And I use the AT command.

Hello @Maker_i
Check certificate and keys inside of module with AT commands.
And close it with AT+QFCLOSE=filename
these at commands should be true İf I remember it correctly . It should be wrong. You should also check end line things of keys and certificate.

I tried the test this AT command, AT+QFDWL=“private.pem.key”
When the download file from aws server and the download file from EC25 module compare ,the end line things is different.

when I upload EC25 the private file using AT command, the end line is 0x0d 0x0a(hex value).


But aws has just 0A. It worked for me.

I took this error too many time when I fixed certificates and keys it is fixed. The others problems I dont know I am sory.