Unable to Connect a Client to MQTT Server

one of my projects, I am using the EG95-E module to send the data to the AWS server Through the MQTT protocol.
I am unable to connect a client to the MQTT server. I tried to connect with the MQTT server but I am getting +QMTCONN: 0,1( Connection Refused: Unacceptable Protocol Version ) and +QMTSTAT:0,3.
I tried multiple times but i am getting same response from the Module. Can any one tell how to solve this issue.
AT+QMTCONN=0,“Test”
OK
+QMTCONN: 0,1
+QMTSTAT: 0,3

Do you need to connect to AWS servers over SSL?
I recommend you try the MQtt.fx tool for debugging first

Thank you for Quick Replay,

I tried with MQTT.FX tool. I am able to connect with the AWS server and subscribe,publish are also working fine.
I tried with Aurdino code through Wifi AWS server is connected, and sent data to the server.
I am sending the AT commands manually to EG95, at that time I am unable to connect with the MQTT client.
AT+QMTCONN=0,“Test”
OK
+QMTCONN: 0,1 (Connection Refused: Unacceptable Protocol Version )
+QMTSTAT: 0,3
We are getting above error
Is there any firmware update Required on the EG95 or any specific protocol version we need to add.
Please let us know.

Do you connect to MQTT server through AWS domain name?
AT+QMTOPEN=<>
If using a domain name, I suggest you configure DNS and try again
AT+QIDNSCFG=<>

AT+QICSGP=1,1,“airtelgprs.com”,"","",1
OK
AT+CGDCONT?
+CGDCONT: 1,“IP”,“airtelgprs.com”,“0.0.0.0”,0,0,0,0
OK
AT+QIACT=1
OK
AT+QIACT?
+QIACT: 1,1,1,“100.64.106.82”
OK
AT+CFUN=1
OK
AT+QICSGP=1
+QICSGP: 1,“airtelgprs.com”,"","",1
OK
AT+QIDNSCFG=1,“8.8.8.8”,“8.8.4.4”
OK
AT+QMTOPEN=0,“xxxxxxxxxxxx-xxx.xxx.xx-west-2.amazonaws.com”,8883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,“AWS_TEST”
OK

+QMTCONN: 0,1(Connection Refused: Unacceptable Protocol Version )
+QMTSTAT: 0,3

I configured the DNS But still same error. I am unable to connect with MQTT.Can any please help me how to solve the above error.

I suggest you refer to the attached document
BG96_MQTT_Attach_AWS_IoTCore_Application_Note.pdf (504.2 KB)

Thanks for the quick replay.

I tested as per the document you shared earlier. But I am unable to connect the MQTT client.I don’t know how to connect with the MQTT client.This is the priority task for me on my project. can any one tell me how to connect with the mqtt client.Please find the below log for testing of Mqtt connection.

AT
OK
AT+CPIN?
+CPIN: READY
OK
AT+CREG?
+CREG: 0,1
OK
AT+CGATT?
+CGATT: 1
OK
AT+QCFG=“nwscanmode”,0
OK
AT+QCFG=“iotopmode”,1
ERROR
AT+QCFG=“iotopmode”,0
ERROR
AT+QFDEL="*"
OK
AT+QFUPL=“cacert.pem”,1206,5000
CONNECT
+QFUPL: 1206,5a63
OK
AT+QFUPL=“client.pem”,1224,5000
CONNECT
+QFUPL: 1224,d7a
OK
AT+QFUPL=“user_key.pem”,1679,5000
CONNECT
+QFUPL: 1679,243e
OK
AT+QFLST
+QFLST: “UFS:user_key.pem”,1679

+QFLST: “UFS:cacert.pem”,1206

+QFLST: “UFS:client.pem”,1224
OK
AT+QICSGP=1,1,“airtelgprs.com”,"","",0
OK
AT+QIACT=1
ERROR
AT+QIACT=?
+QIACT: (1-16)
OK
AT+QICSGP=1,1,“airtelgprs.com”,"","",1
OK
AT+QIACT=1
ERROR
AT+QIACT?
OK
AT+QIACT=1
ERROR
AT+QSSLCFG=“cacert”,2,“cacert.pem”
OK
AT+QSSLCFG=“clientcert”,2,“client.pem”
OK
AT+QSSLCFG=“clientkey”,2,“user_key.pem”
OK
AT+QSSLCFG=“seclevel”,2,2
OK
AT+QSSLCFG=“sslversion”,2,4
OK
AT+QSSLCFG=“ciphersuite”,2,0xFFFF
OK
AT+QSSLCFG=“ignorelocaltime”,2,1
OK
AT+QMTCFG=“SSL”, 0, 1, 2
OK
AT+QMTCFG=“version”,0,4
OK
AT+QIACT=1
OK
AT+QIDNSCFG=1,“8.8.8.8”,“8.8.4.4”
OK
AT+QMTOPEN=0,“xxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.amazonaws.com”,8883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,“xxxxxxxxxx”
OK
+QMTCONN: 0,1
+QMTSTAT: 0,3

Please tell me is there any configurations missing on the above log file.

[xxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.amazonaws.com](http://xxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.amazonaws.com Can this domain name be parsed successfully?
AT+QIDNSGIP=1," xxxxxxxxxxxx-xxx.xxx.xx-xxxx-x.amazonaws.com"

Thank you for Quick response.

I tried the above command still same error. The MQTT is not connect with client.

AT+QIDNSCFG=1,“8.8.8.8”,“8.8.4.4”
OK
AT+QIDNSGIP=1,“a1jdqnbvy5dt1m-ats.iot.us-west-2.amazonaws.com
OK
+QIURC: “dnsgip”,0,5,60
+QIURC: “dnsgip”,“44.235.167.60”
+QIURC: “dnsgip”,“52.35.54.133”
+QIURC: “dnsgip”,“54.200.4.34”
+QIURC: “dnsgip”,“52.38.75.204”
+QIURC: “dnsgip”,“52.42.195.122”
AT+QMTOPEN=0,“a1jdqnbvy5dt1m-ats.iot.us-west-2.amazonaws.com”,8883
OK
+QMTOPEN: 0,-1
AT+QMTOPEN=1,“a1jdqnbvy5dt1m-ats.iot.us-west-2.amazonaws.com”,8883
OK
+QMTOPEN: 1,0
AT+QMTCONN=1,“TestIoThings”
OK
+QMTCONN: 1,1
+QMTSTAT: 1,3

i am unable to found the exact problem. Can you please tell me the why always the connection is not happening with MQTT client.

I tried with public MQTT broker. The connection is established and subscribe the topic and publish the data also working fine.
At the time of using AWS server the MQTT client is not Connected.
Is there any firmware upgrade is needed.If you have updated firmware files Please share.

Thanks

AT
OK
AT+CPIN?
+CPIN: READY

OK
AT+CREG?
+CREG: 0,1

OK
AT+CGATT?
+CGATT: 1

OK
AT+QMTCFG=“recv/mode”,1,1,1
OK
AT+QMTCFG=“pdpcid”,1,1,1
OK
AT+QMTOPEN=0,“broker.hivemq.com”,1883
OK

+QMTOPEN: 0,0

+QMTSTAT: 0,1
AT+QMTOPEN=0,“broker.hivemq.com”,1883
OK

+QMTOPEN: 0,0
AT+QMTCONN=0,“635394af302d4366bce82e54d5a687d1”
OK

+QMTCONN: 0,0,0
AT+QMTSUB=0,1,“EG95_ARGUS”,2
OK

+QMTSUB: 0,1,0,2
AT+QMTPUBEX=0,1,1,0,“EG95_ARGUS”,12

123456788888
OK
88889
+QMTRECV: 0,51,“EG95_ARGUS”,12,“123456788888”

+QMTPUBEX: 0,1,0
Above is the log for public MQTT broker.